query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
function writeLog Fungsi ini akan menangani penulisan log. | protected function writeLog(string $type, string $description)
{
$log = new \app\models\Log();
$log->log_type = $type;
$log->log_description = $description;
$log->created_by = $_SESSION['USER']['id'];
$log->created_at = date('Y-m-d H:i:s');
$log->remote_ip = $_SERVER['REMOTE_ADDR'];
$log->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function write()\n {\n echo 'database log write...';\n }",
"private function writelog() {\r\n\r\n $dir = APP_PATH . 'tmp/log';\r\n //IF 'tmp/log' is file, delete it.\r\n if (is_file($dir)) {\r\n unlink(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/log' is not exists, create it as folder.\r\n if (!dir_exists($dir)) {\r\n __mkdirs(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/log' is exists as folder, the create logs under it.\r\n if (dir_exists($dir) && is_dir($dir)) {\r\n $date = date(\"Y-m-d H:i:s\", time());\r\n $arr = array('-', ':');\r\n $date = trim(str_replace($arr, '', $date));\r\n $cnt = $this->spArgs('msg');\r\n $str = $date . '\\t' . $cnt;\r\n file_put_contents(APP_PATH . 'tmp/log/log_' . $date . '.log', $str, FILE_APPEND);\r\n }\r\n return TRUE;\r\n }",
"public function writeLog()\n {\n $redis = self::getClient();\n $redis ->lPush('admin_log',$this->data);\n }",
"public function writeLog(\\Log $log)\n {\n \n // similarly add other logger type classes to write \n // logs using different methods\n }",
"function writeLog($string){\n}",
"public static function log_save()\n {\n if (empty(self::$log) or self::$configuration['core']['log_threshold'] < 1) {\n return;\n }\n\n // Filename of the log\n $filename = self::log_directory().date('Y-m-d').'.log'.EXT;\n\n if (! is_file($filename)) {\n // Write the SYSPATH checking header\n file_put_contents($filename,\n '<?php defined(\\'SYSPATH\\') or die(\\'No direct script access.\\'); ?>'.PHP_EOL.PHP_EOL);\n\n // Prevent external writes\n chmod($filename, 0644);\n }\n\n // Messages to write\n $messages = array();\n\n do {\n // Load the next mess\n list($date, $type, $text) = array_shift(self::$log);\n\n // Add a new message line\n $messages[] = $date.' --- '.$type.': '.$text;\n } while (! empty(self::$log));\n\n // Write messages to log file\n file_put_contents($filename, implode(PHP_EOL, $messages).PHP_EOL, FILE_APPEND);\n }",
"function writeLog(){\n\t\t$logContainer=new LogContainer();\n\t\t$ret = $this->writeLogFromLogContainer($logContainer);\n\t\t//special delivery for v9\n\t\t$old_appid=$logContainer->getAppid();\n\t\tif(substr($old_appid, 0,3)==\"v9-\" && !($old_appid == \"v9-v9\")){\n\t\t\trequire_once APP_ROOT.\"/v9_transforms.php\";\n\t\t\t$logContainer->setAppid(\"v9-v9\");\n\t\t\t$ret = $this->writeLogFromLogContainer($logContainer);\n\t\t}\n\t\treturn $ret;\n\t}",
"function write_log($log) {\n $orderLog = new Logger('order');\n $orderLog->pushHandler(new StreamHandler(storage_path('logs/frontend.log')), Logger::INFO);\n $orderLog->info('OrderLog', $log);\n}",
"function WriteLog($s) {\r\n}",
"function writelog($type) {\n\n\n // ==============================================================\n // Specify the global variables.\n // ==============================================================\n global $message;\n global $open_log_file;\n global $log_file;\n\n\n // ==============================================================\n // We check if we have to write to the logfile.\n // ==============================================================\n if($type == 'l' || $type == 'b') {\n\n\n // ============================================================\n // We check if logging is enabled.\n // ============================================================\n if($log_file == 1) {\n\n\n // ==========================================================\n // Specify the html tags which have to be removed.\n // ==========================================================\n $pattern = array(\"<strong>\", \"</strong>\");\n\n\n // ==========================================================\n // Remove html tags from the message.\n // ==========================================================\n $log_message = str_replace(\"<br>\", \"\\n\", $message);\n $log_message = str_replace($pattern, \"\", $log_message);\n\n\n // ==========================================================\n // Writing to the logfile.\n // ==========================================================\n if (!fwrite($open_log_file, $log_message)) {\n echo \"Cannot write to the logfile !<br>\\n\";\n }\n }\n }\n\n\n // ==============================================================\n // We check if we have to write to the screen.\n // ==============================================================\n if($type == 's' || $type == 'b') {\n\n\n // ============================================================\n // Writing to the screen.\n // ============================================================\n echo $message.\"\\n\";\n }\n}",
"public static function writeLog($data){\n\n $directory_path = WINEAC_DIR_PATH.self::DIRECTORY_LOGS;\n $file_path = WINEAC_DIR_PATH.self::DIRECTORY_LOGS.self::DIRECTORY_SEPARATOR.self::LOGS_FILE;\n\n if (!file_exists($directory_path)) {\n mkdir($directory_path, 0777, true);\n }\n\n if(!file_exists($file_path)){\n fopen($file_path , 'w');\n }\n\n if(is_array($data)) {\n $data = json_encode($data);\n }\n $file = fopen($file_path ,\"a\");\n fwrite($file, \"\\n\" . date('Y-m-d h:i:s') . \" :: \" . $data);\n fclose($file);\n\n }",
"public function write()\n {\n $r=false;\n \n if(!empty($this->buffer))\n {\n foreach($this->buffer as $entry)\n {\n if(empty($this->logs[$entry['log']]))\n {\n $log_file=LOG_LOCATION.'/'.$entry['log'].'.log';\n\n $this->logs[$entry['log']]=fopen($log_file,'a');\n }\n\n if($entry['level']==LOG_LEVEL_ERROR)\n {\n $level_string='ERROR';\n }\n elseif($entry['level']==LOG_LEVEL_WARNING)\n {\n $level_string='WARNING';\n }\n elseif($entry['level']==LOG_LEVEL_NOTICE)\n {\n $level_string='NOTICE';\n }\n else\n {\n $level_string='UNKNOWN';\n }\n\n $log_config=&$this->system->config('log');\n\n $out=date($log_config['timestamp_format']).'|'.$level_string.' - '.$entry['message'].\"\\n\";\n\n if(!empty($this->logs[$entry['log']])&&fwrite($this->logs[$entry['log']],$out))\n {\n $r=true;\n }\n\n if(!$r)\n {\n throw new A_Exception('Could not write to file \"'.$log_file.'\"');\n }\n }\n\n if($r)\n {\n $this->buffer=array();\n }\n }\n }",
"function atkWriteLog($text)\n{\n\tif (atkconfig(\"debug\") > 0 && atkconfig(\"debuglog\"))\n\t{\n\t\tatkWriteToFile($text, atkconfig(\"debuglog\"));\n\t}\n}",
"static public function write($log , $state = 1){\n\t$finename = \"log/\" . date(self::$_config['filepattern']) . \".log\";\n\t$fp = fopen($finename , \"a\");\n\t$message = \"\";\n\tswitch($state){\n\tcase 1:\n\t $message = \"[info]\\t\";\n\t\tbreak;\n\tcase 2:\n\t $message = \"[warning]\\t\";\n\t\tbreak;\n\tcase 3:\n\t $message = \"[error]\\t\";\n\t\tbreak;\n\t}\n\t$message = $message . \" \" . date(\"H:i:s\") .' ' . $log . PHP_EOL;\n\tfwrite($fp , $message);\n\tfclose($fp);\t\n }",
"function application_log($title,$info){\n if(!is_dir(ROOTPATH.'/Log/'.date('Y-m-d',time()).'/')){\n if(!is_dir(ROOTPATH.'/Log/')){\n mkdir(ROOTPATH.'/Log/');\n }\n mkdir(ROOTPATH.'/Log/'.date('Y-m-d',time()).'/');\n }\n $filename=ROOTPATH.'/Log/'.date('Y-m-d',time()).'/DbLog.txt';\n $handle=fopen($filename,\"a+\");\n fwrite($handle,\"$title:$info\\n\");\n fclose($handle);\n}",
"public static function write()\n\t{\n\t\t// Set the log threshold\n\t\t$threshold = Config::item('log.threshold');\n\n\t\t// Don't log if there is nothing to log to\n\t\tif ($threshold < 1 OR count(self::$messages) === 0) return;\n\n\t\t// Set the log filename\n\t\t$filename = self::$log_directory.date('Y-m-d').'.log'.EXT;\n\n\t\t// Compile the messages\n\t\t$messages = '';\n\t\tforeach(self::$messages as $type => $data)\n\t\t{\n\t\t\tif (array_search($type, self::$types) > $threshold)\n\t\t\t\tcontinue;\n\n\t\t\tforeach($data as $date => $text)\n\t\t\t{\n\t\t\t\tlist($date, $message) = $text;\n\t\t\t\t$messages .= $date.' -- '.$type.': '.$message.\"\\r\\n\";\n\t\t\t}\n\t\t}\n\n\t\t// No point in logging nothing\n\t\tif ($messages == '')\n\t\t\treturn;\n\n\t\t// Create the log file if it doesn't exist yet\n\t\tif ( ! file_exists($filename))\n\t\t{\n\t\t\ttouch($filename);\n\t\t\tchmod($filename, 0644);\n\n\t\t\t// Add our PHP header to the log file to prevent URL access\n\t\t\t$messages = \"<?php defined('SYSPATH') or die('No direct script access.'); ?>\\r\\n\\r\\n\".$messages;\n\t\t}\n\n\t\t// Append the messages to the log\n\t\tfile_put_contents($filename, $messages, FILE_APPEND) or trigger_error\n\t\t(\n\t\t\t'The log file could not be written to. Please correct the permissions and refresh the page.',\n\t\t\tE_USER_ERROR\n\t\t);\n\t}",
"function dmailer_log($writeMode,$logMsg){\n\t\tglobal $TYPO3_CONF_VARS;\n\t\n\t\t$content = time().' => '.$logMsg.chr(10);\n\t\t$logfilePath = 'typo3temp/tx_directmail_dmailer_log.txt';\n\n\t\t$fp = fopen(PATH_site.$logfilePath,$writeMode);\n\t\tif ($fp) {\n\t\t\tfwrite($fp,$content);\n\t\t\tfclose($fp);\n\t\t}\t\t\t\n\t}",
"function writeLog($logmsg)\n{\n global $conf;\n if (! $conf['enable_logging']) {return;}\n if ($conf['logfile']==\"syslog\") {\n syslog(LOG_INFO,$logmsg);\n } else {\n if (!($fp=fopen($conf['logfile'], \"a\"))) {\n return;\n }\n $now=date(\"Y-d-m H:i:s\");\n fputs($fp, \"$now $logmsg\\n\");\n fclose($fp);\n }\n}",
"private function saveLog($traza) {\r\n $nombreFichero = \"trazas\" . date(\"dmY\") . \".log\";\r\n $fichero = fopen($nombreFichero, \"a\");\r\n fwrite($fichero, $traza);\r\n fclose($fichero);\r\n }",
"function write_log($text,$level=null) {\r\n\t\tif ($level === null) {\r\n\t\t\t$level = 'DEBUG';\r\n\t\t}\r\n\t\t$caller = getCaller();\r\n\t\t$filename = 'Phlex.log';\r\n\t\t$text = date(DATE_RFC2822) . ' [ '.$level.' ] '.$caller . \" - \" . $text . PHP_EOL;\r\n\t\tif (!file_exists($filename)) { touch($filename); chmod($filename, 0666); }\r\n\t\tif (filesize($filename) > 2*1024*1024) {\r\n\t\t\t$filename2 = \"$filename.old\";\r\n\t\t\tif (file_exists($filename2)) unlink($filename2);\r\n\t\t\trename($filename, $filename2);\r\n\t\t\ttouch($filename); chmod($filename,0666);\r\n\t\t}\r\n\t\tif (!is_writable($filename)) die;\r\n\t\tif (!$handle = fopen($filename, 'a+')) die;\r\n\t\tif (fwrite($handle, $text) === FALSE) die;\r\n\t\tfclose($handle);\r\n\t}",
"function WriteLogEss($log) {\r\n//echo $log.'<br/>';\r\n/*\r\n $datum=Date('d.m.Y H:i:s');\r\n $tmp = '/tmp/logESS.txt';\r\n $text = $datum . '-'.$log.chr(10);\r\n $fp = fopen($tmp, 'a');\r\n fwrite($fp, $text);\r\n fclose($fp);\r\n*/\r\n}",
"function logge($message, $type=INFO, $dateiName=\"\", $methodName=\"\") {\n\n $str = date(\"Y.m.d H:i:s\") . \" \" . $type;\n\n if ($dateiName !=\"\" || $methodName != \"\") {\n $str .= \"(\";\n if ($dateiName != \"\") {\n $str .= \"File: \" . $dateiName . \" \";\n }\n if ($methodName != \"\") {\n $str .= \"Methode: \" . $methodName;\n }\n $str .= \")\";\n }\n $str .= \": \" . $message . \"\\n\\r\";\n\n if (isset($_ENV[\"LOGFILE\"]) && $_ENV[\"LOGFILE\"] != '') {\n $fd = fopen($_ENV[\"LOGFILE\"], \"a\");\n\n fwrite($fd, $str);\n fclose($fd);\n } else {\n echo \"LOGFILE ist nicht bekannt, um Meldungen in die Log-Datei zu schreiben.<br>\\n\";\n echo $str;\n }\n\n}",
"function log1($msg)\n{\n if(WRITE_LOG == false)\n return;\n date_default_timezone_set('Europe/Vienna');\n $now = date(\"Y-m-d H:i:s\");\n $line = sprintf(\"%s => %s\\r\\n\", $now, $msg);\n file_put_contents(LOG_FILE, $line, FILE_APPEND);\n}",
"public function write()\n {\n echo 'file log write...';\n }",
"public function writeLog() {\n // After writing log messages, empty the log.\n $this->purgeLog();\n }",
"public function saveLog() {\n\n\t\t# Get log file path\n\t\tif(isset(Sky::$config) && isset(Sky::$config[\"locations\"][\"logs\"]))\n\t\t\t$filePath = Sky::$config[\"locations\"][\"logs\"] . \"errorLog_\" . @date(\"d.m\") . \".txt\";\n\n\t\t# If we need to show\n\t\tif(!empty(Sky::$config['development']['traceExceptions']) && Sky::$config['development']['traceExceptions'] == \"screen\")\n\t\t\techo Sky::getType() == Sky::INIT_TYPE_CONSOLE ? \"$this\\n\" : \"<pre>$this</pre>\";\n\n\t\t# Check key\n\t\tif(!empty(Sky::$config['development']['noLog']))\n\t\t\treturn;\n\n\t\t# Try to create file if not exists\n\t\tif(!isset($filePath) || (!file_exists($filePath) && !touch($filePath)) || !is_writable($filePath))\n\t\t\treturn;\n\n\t\t# Log\n\t\terror_log($this->__toString(), 3, $filePath);\n\n\t}",
"function writeToLogFile($fileName, $logData)\r\n\t{\r\n\t\t$fileBasePath = \"D:/Program/xampp/htdocs/secure/ROOT/catalog/logs/\";\t\t\r\n\t\t$filePath = $fileBasePath . $fileName;\r\n\t\t\r\n\t\t$fileObj = fopen($filePath, \"a\");\r\n\t\tfwrite($fileObj, $logData);\r\n\t\tfclose($fileObj);\r\n\t}",
"function write_log( $log )\n {\n if ( is_array( $log ) || is_object( $log ) ) {\n error_log( print_r( $log, true ) );\n } else {\n error_log( $log );\n }\n }",
"function logToFile($file,$level,$msg) { \n\t\t// Connectie met DB\n\t\t$db_conn = new SafeMySQL(array('db'=>DB_LOGS));\t\n\t\t$pdo = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_LOGS.\";charset=utf8\", DB_USER, DB_PASS); \t\n\n\t\t$user = (isset($_SESSION[SES_NAME]['user_email'])) ? htmlentities($_SESSION[SES_NAME]['user_email'], ENT_QUOTES, 'UTF-8') : '---';\n\t\t$env = APP_ENV;\t\t\n\t\t$year = date(\"Y\");\n\t\t$date = date(\"Y-m-d\");\n\t\t$path = ROOT_PATH;\n $path .= \"/Src/Logs/\".$year.\"/\";\n\t\t// Bestaat de folder niet maak deze dan aan\n\t\tif(!file_exists($path)){\n\t\t\tmkdir($path);\n\t\t}\n\t\t\n $filename = $path.$date.'.log';\n // Open file\n\t\t$fileContent = @file_get_contents($filename);\n\t\t\t\n\t\t$datum = date(\"D Y-m-d H:i:s\");\n\t\t\t// Log level\n\t\t\tif($level === 1){\n\t\t\t\t$level = \"CRITICAL\";\n\t\t\t} elseif($level === 2){\n\t\t\t\t$level = \"WARNING\";\n\t\t\t} else {\n\t\t\t\t$level = \"NOTICE\";\n\t\t\t}\n\t\t\t\n $str = \"[{$datum}] [{$level}] [{$user}] [{$env}] [{$file}] {$msg}\".PHP_EOL; \n // Schrijf string naar file\n file_put_contents($filename, $str . $fileContent);\n\t\t\n\t\t$query_arr = array(\n\t\t\t'datum' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t'filename' \t\t\t=> $file,\n\t\t\t'criteria_level' \t=> $level,\n\t\t\t'msg'\t\t\t\t=> $msg\n\t\t);\t\t\n\t\t//var_dump($db_conn->query(\"SHOW TABLES\"));\n\t\t\n\t\tif(!$db_conn->query(\"SHOW TABLES LIKE 'beheer_log_\".$year.\"'\")){\n\t\t\t$db_conn->query(\"CREATE TABLE `beheer_log_\".$year.\"` (\n\t\t\t\t\t\t\t`id` INT(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t`datum` DATETIME DEFAULT NULL,\n\t\t\t\t\t\t\t`filename` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`criteria_level` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`msg` VARCHAR(5000) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t\t\t\t) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\");\n\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\n\t\n\t\t// Insert in DB\n\t\t} else {\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\t\t\n\t\t}\t\t\t\t\t\n\t\t\t\t\n\t}",
"function setLog($proceso,$sucursal,$usuario){\n $data = array(\n 'proceso_id' => $proceso,\n 'sucursal_id' => $sucursal,\n 'id_usuario' => $usuario\n );\n $this->db->insert(self::sys_procesos_log,$data);\n }",
"function update_log($msg)\r\n\t{\r\n\t\tglobal $LEA_REP;\r\n\r\n\t\t$rep = $LEA_REP.'log/';\r\n\r\n\t\tif(file_exists($rep.$this->id_usager.'.log')){\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"Fichier log de : \".$this->civilite.\" \".$this->nom.\" \".$this->prenom.\" du profil : \".$this->profil.\"\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t}\r\n\r\n\t\tfwrite($fp, $msg);\r\n\t}",
"function write_log($cadena){\n\t\t\t$arch = fopen(\"../../logs/deletes\".\".txt\", \"a+\"); //date(\"Y-m-d\"). define hora en archivo\n\t\t\n\t\t\tfwrite($arch, \"[\".date(\"Y-m-d H:i:s\").\" \".$_SERVER['REMOTE_ADDR'].\" \".\" - Elimino produccion ] \".$cadena.\"\\n\");\n\t\t\tfclose($arch);\n\t\t}",
"function log_to_file($stranka, $pozadavek = \"\", $message = \"\", $echo = true) {\n\tif ($echo) echo \"$stranka: $pozadavek: $message <br />\";\n\t$path = \"./log/\";\n\t$referer = (isset($_SERVER[\"HTTP_REFERER\"])) ? $_SERVER[\"HTTP_REFERER\"] : \"\";\n\t// existuje soubor s timto datem?\n\t$datum = new DateTime();\n\t$datumcas = $datum->format(\"Y-m-d H:i\");\n\t$datum = $datum->format(\"Y-m-d\");\n\t$log = fopen($path . $datum . \".log\", \"a\");\n\tif ($log) {\n\t\t$text = $datumcas . \";\" . $stranka . \";\" . $pozadavek . \";\" . $message . \";\" . \";\" . $referer . \"\\n\";\n\t\tfwrite($log, $text);\n\t\tfclose($log);\n\t}\n}",
"function writeLog($text)\n {\n $file = fopen(\"../log.txt\", \"a+\") or die(\"Unable to open file!\");\n fwrite($file, $text . \"\\n\");\n fclose($file);\n }",
"function WriteLog($log_file)\n{\n global $SPECIAL_VALUES;\n\n@\t$log_fp = fopen($log_file,\"a\");\n\n\tif (!$log_fp)\n\t\treturn;\n\t$date = gmdate(\"H:i:s d-M-y T\");\n\t$entry = $date.\":\".$SPECIAL_VALUES[\"email\"].\",\".\n\t\t\t$SPECIAL_VALUES[\"realname\"].\",\".$SPECIAL_VALUES[\"subject\"].\"\\n\";\n\tfwrite($log_fp,$entry);\n\tfclose($log_fp);\n}",
"function writeLog($cmd)\n{\n date_default_timezone_set(\"America/New_York\");\n $data = date(\"n-j-y g:i:s\");\n $comLog = \"data/comLog.txt\";// or die(\"can't make log\");\n $file = fopen($comLog, 'a');\n// fwrite($file,\"\\n\".$data->format(\"n-j-y g:i:s\").\"\\n\".$cmd);\n fwrite($file,\"\\n\".$data.\"\\n\".$cmd) or die(\"can't make log\");\n fclose($file);\n}",
"function logWrite($msg) {\n\tglobal $logfile;\n\t$fh = fopen($logfile, 'a');\n\tfwrite($fh, \"$msg\\n\");\n\tfclose($fh);\n}",
"private function add_log($log) {\n $this->log .= \" \" . $log;\n }",
"function to_log($vvod)\n{\n $date = date(\"Y_m_d\");\n $filename = \"logs/log_\".$date.\".txt\";\n $string = date(\"d.m.Y H:i:s\").\" => $vvod\".\"\\n\";\n $f = fopen($filename,\"a+\");\n fwrite($f,$string);\n fclose($f);\n}",
"function _log($message)\n{\n\tfwrite($GLOBALS['logfile'], date(\"Y-m-d H:i:s :: \", time()) . $message . \"\\n\");\n}",
"public static function writeLog( $log ) {\n\t\tif ( true === WP_DEBUG ) {\n\t\t\tif ( is_array( $log ) || is_object( $log ) ) {\n\t\t\t\terror_log( print_r( $log, true ) );\n\t\t\t} else {\n\t\t\t\terror_log( $log );\n\t\t\t}\n\t\t}\n\t}",
"function geraLog($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"log_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n chmod (getcwd().$arquivo, 0777);\n fclose($manipular);\n\n\n }",
"function saveLogsLogowanie($dane, $user, $nick, $data)\n\t{\n\t\t// mo? tak? pochodzi? formularza np. $dane = $_POST['dane'];\n\t\t\t\t\n\t\t// przypisanie zmniennej $file nazwy pliku\n\t\t$file = \"logowanie/\".date(\"m-y\").\".html\";\n\t\t// uchwyt pliku, otwarcie do dopisania na pocz?ku pliku\n\t\t$fp = fopen($file, \"a\");\n\t\t// blokada pliku do zapisu\n\t\tflock($fp, 2);\n\t\t// zapisanie danych do pliku\n\t\t\n\t\t$bro = $_SERVER['HTTP_USER_AGENT'];\n\t\t\n\t\tfwrite($fp, date(\"d-m-y H:i:s\" ). ' ' .$user.' o nicku '.$nick. ': '. $dane.', IP:' . $_SERVER['REMOTE_ADDR'].', Konto utworzono: '. $data . ' ' . \n\t\t' przegladarka: ' . $bro . ' <br>');\n\t\t// odblokowanie pliku\n\t\tflock($fp, 3);\n\t\t// zamkni?e pliku\n\t\tfclose($fp); \n\t}",
"private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }",
"function logger($str)\r\n\t\t{\r\n\t\t\t//write log\r\n\t\t\t$log = $str = '' ? PHP_EOL : '[' . date('Y-m-d H:i:s') . '] ' . $str . PHP_EOL;\r\n\t\t\tfile_put_contents('patcher.log', $log, FILE_APPEND | LOCK_EX);\r\n\t\t}",
"function gen_log($username, $message)\r\n{\r\n\t$log = \"LOG - IP address: \".$_SERVER['REMOTE_ADDR'].' -- Date: '.date(\"F j,Y,g:i a\") .PHP_EOL .\r\n \"User: \" .$username .\" -- Action:\" .$message . PHP_EOL .\"----------------------\" .PHP_EOL;\r\n\tfile_put_contents('/home/alexander/github/lpa_ecomms_web/log/lpalog.log',$log,FILE_APPEND);\r\n}",
"public function log($log) {\n //$this->log = $log;\n }",
"function WriteLog($functionName,$content)\r\n{\r\n\t// $myFile = LOG_FILE;\r\n\t// $fh = fopen($myFile, 'a') or die(\"can't open file\");\r\n\t// $stringData = $today.\" \\t\".$functionName.\"\\t\".$content.\"\\n\\n\";\r\n\t// fwrite($fh, $stringData);\r\n\t// fclose($fh);\r\n}",
"function CDFLog()\n\t{\n\t\t// ** Aktivierung der Logfunktionalitaet **\n\t\t// ########################################\n\t\t$this->m_enable = true;\n\t\t// ########################################\n\t\tif ($this->m_enable)\n\t\t{\t\t\t\n\t\t\t// Basispfad der Logdateien\n\t\t\t$this->m_base = \"./\";\n\t\t\t// Unterordner der Logdateien\n\t\t\t$this->m_sub = \"Logfiles/\";\n\t\t\t// Dateiname der Logdatei: YYYY_MM_DD_PHP.log\n\t\t\t$this->m_fileNameTemplate = \"20%02u_%02u_%02u_PHP.log\";\n\t\t\t// Die Verwaltungsroutine fuer die automatische Loeschung\n\t\t\t// Aelterer Dateien geht davon aus, dass der Dateiname\n\t\t\t// mit dem Datumsstempel beginnt.\n\t\t\t$this->m_fileNameTemplateMatch = \"^20[0-9]{2}_[0-9]{2}_[0-9]{2}_PHP.log\";\n\t\t\t// Aktuellen Dateiname der Logdatei erstellen\n\t\t\t$t = time();\n\t\t\t$ltm = localtime($t, 1);\n\t\t\t$this->m_fileName = sprintf($this->m_fileNameTemplate, \n\t\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t\t// Loeschen von Dateien die aelter sind als m_eraseFilesCount Logtage\n\t\t\t$this->m_eraseFilesEnable = true;\n\t\t\t// Anzahl zu haltender Logdateien (in Tagen)\n\t\t\t$this->m_eraseFilesCount = 5;\n\t\t\t// Zeichenfolge fuer einen Zeilenumbruch\n\t\t\t$this->m_crLf = \"\\r\\n\";\n\t\t\t// Automatische Einfuegung eines Zeitstempels vor jedem Logeintrag\n\t\t\t$this->m_withTimestamp = true;\n\t\t\t// Pruefen ob der Logpfad existiert.\n\t\t\tif (!is_dir($this->m_base . $this->m_sub))\n\t\t\t{\t\n\t\t\t\tif (!mkdir($this->m_base . $this->m_sub))\n\t\t\t\t{\n\t\t\t\t\t// Logsystem wegen Fehlschlag abstellen\n\t\t\t\t\t$this->m_enable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Pruefung fuer eraseFile durchfuehren\n\t\t\t$this->logCheckOnWorkDate();\n\t\t}\n\t}",
"function logger($msg)\n{\n\n $filename = $_SERVER['DOCUMENT_ROOT'].'/Utils/Logs/log.txt';\n $msg = date(\"[d/m] h:i:sa\") . \": \". $msg . \"\\n\";\n\n file_put_contents( $filename, $msg, FILE_APPEND);\n}",
"private static function writeToLogFile($message)\n {\n file_put_contents(Config::get('log_file'), utf8_encode(date(Config::get('time_format')) . ' ' . $message . \"\\n\"), FILE_APPEND);\n }",
"function write_log($str) {\n $logs = '/var/www/html/mchuob/callback_logs/callback_' . date('Y-m-d') . '.txt';\n $time = \"log_time=\" . date('Y-m-d H:i:s') . \"&\";\n $q = '\"';\n $replace = $q . \"&\" . $q;\n $update_str = $q . $time . $str . $q;\n $update_str = str_replace('&', $replace, $update_str);\n $output_file = fopen($logs, 'a+');\n fwrite($output_file, $update_str . \"\\n\");\n fclose($output_file);\n}",
"function debuglog($numero,$texto,$errfile, $errline){\n global $conn;\n\n\n if(DEBUG==1) {\n\n ## VARIAVEIS DE CONFIG\n if (!isset($_SESSION['user'])) {\n $userdata = array(\n 'id' => '',\n 'nome' => '',\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'useragent' => $_SERVER['HTTP_USER_AGENT']\n );\n\n foreach($userdata as $k=>$v) {\n $log[$k]=$v;\n }\n\n } else {\n\n foreach($_SESSION['user'] as $k=>$v) {\n $log[$k]=$v;\n }\n\n }\n\n # se DEBUG_LOG nao for vazio vai gravar no arquivo de log\n if (DEBUG_LOG<>'') {\n $ddf = fopen(DEBUG_LOG,'a');\n fwrite($ddf,\"\".date(\"r\").\": [$numero] $texto $errfile $errline \\r\\n [$log[id]]$log[nome] - $log[ip], $log[useragent] \\r\\n\\r\\n\");\n fclose($ddf);\n }\n\n }\n\n}",
"static public function saveLog(){\n\t\tdebug::debug(\"saveLog \");\n\t\t\n\t\t$save=SaveLogManager::singleton();\n\t\treturn $save->writeLog();\n\t}",
"function wlog($value,$level=4)\n{\n $currentLevel=4;\n if ($currentLevel>=$level){\n file_put_contents(\"all.log\",\"\\n\",FILE_APPEND);\n\t\tfile_put_contents('all.log',$value,FILE_APPEND);\n\t}\n}",
"public static function SaveLog( $message='' ) {\n\t\tself::$_log = '#' . date('Y-m-d H:i:s') . '#' . $message . \"\\n\";\n\t}",
"function write_log($message, $logfile='log/session.log') {\n\n \n // Get time of request\n\tif( ($time = $_SERVER['REQUEST_TIME']) == '') {\n\t\t$time = time();\n\t}\n \n // Get IP address\n\tif( ($remote_addr = $_SERVER['REMOTE_ADDR']) == '') {\n\t\t$remote_addr = \"REMOTE_ADDR_UNKNOWN\";\n\t}\n \n // Format the date and time\n\t$date = date(\"Y-m-d H:i:s\", $time);\n \n // Append to the log file\n\tif($fd = @fopen($logfile, \"a\")) {\n\t\t$result = fputcsv($fd, array($date, $remote_addr, $message));\n\t\tfclose($fd);\n\t}\n}",
"function writeLog($string,$err=false) {\n\t\t$text = '['.date('y-m-d H:i:s').']';\n\t\t$text .= '['.TRANSACTIONID.']';\n\t\t$text .= $err ? '[ERROR]' : '';\n\t\t$text .= $string.\"\\n\";\n\t\t\n\t\t$file = './log/'.date('y-m-d').'.log';\n\t\tfor ($i = 0; $i < 5; $i++) { #Retry 5 times if files system busy\n\t\t\tif (file_put_contents($file,$text,FILE_APPEND))\n\t\t\t\tbreak;\n\t\t\tusleep(1000);\n\t\t}\n\t\t\n\t\tif (!$err) #Write error to error log file\n\t\t\treturn;\n\t\t$file = './log/'.date('y-m-d').'-error.log';\n\t\tfor ($i = 0; $i < 5; $i++) { #Retry 5 times if files system busy\n\t\t\tif (file_put_contents($file,$text,FILE_APPEND))\n\t\t\t\tbreak;\n\t\t\tusleep(1000);\n\t\t}\n\t}",
"function write_log($msg) {\n global $transaction_ID;\n $todays_date = date(\"Y-m-d H:i:s\");\n $file = fopen(\"process.log\",\"a\");\n fputs($file,$todays_date. \" [\".$transaction_ID.\"] \". $msg.\"\\n\");\n fclose($file);\n}",
"function writeToLog($data, $title = '') {\n\t$log = \"\\n------------------------\\n\";\n\t$log .= date(\"Y.m.d G:i:s\") . \"\\n\";\n\t$log .= (strlen($title) > 0 ? $title : 'DEBUG') . \"\\n\";\n\t$log .= print_r($data, 1);\n\t$log .= \"\\n------------------------\\n\";\n\tfile_put_contents(getcwd() . '/hook.log', $log, FILE_APPEND);\n\treturn true;\n\t}",
"function writeLog( $file, $text, $path = 'tmp/logs/' ) {\n\n global $settings; ## Not a perfect solution\n\n if ( $settings[ 'debugging' ] == 'disabled' ) return false; ## Logging is disabled!\n if ( is_writable( $path ) ) return file_put_contents( $path . $file . \".log\", \"[\" . date( \"j.n.Y-G:i\" ) . \"] {$text}\\n\", FILE_APPEND );\n return false;\n\n }",
"public function writeLog($msg)\n {\n $logline = PHP_EOL . \"[\" . date('r') . \"]: \" . $msg;\n file_put_contents($this->config['log_file'], $logline, FILE_APPEND);\n }",
"function log($content=\"\",$loglevel = \"\") {\n\t// si esta desactivado, salimos\n\t//echo \"Veamos: \" .$this->LogFile. \" y \" .$this->LogLevel.\"<br>\"; // DEBUG\n\n\tif (!$this->LogLevel) return;\n\t \n\t// abrimos el fichero\n\t$file = fopen($this->LogFile,\"a\");\n\t$cn = \"<log date='\" . date(\"j-m-Y G:i:s\") . \"'>$content</log>\\n\";\n\t\n\tfputs($file, $cn);\n\t//Cerramos fichero\n\tfclose($file);\n }",
"function hlog($msg,$logfile,$setperm=false,$sethost=false,$levelstr=NULL)\n{\n\n\t\tdate_default_timezone_set(DEFAULT_TIME_ZONE);\n\t\t$today = date(\"Y-m-d\");\n\n\t\tif($sethost)\n\t\t{\n\t\t\t$hostname = gethostname();\n\t\t\t$logfile = $logfile.'_'.$hostname;\n\t\t}\n\n\t\t$filename = VBOXLITE_LOG_LOCATION.$logfile.'_'.$today.'.csv';\n\n\t\tif (file_exists($filename)){\n\t\t\tif($setperm)\n\t\t\t{\n\t\t\t\tchmod($filename,0777);\n\t\t\t}\n\t\t}\n\n\t\t$fd = fopen($filename, \"a\");\n\t\t$timestamp = round(microtime(true));\n\n\t\tif(!empty($levelstr))\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.\"[\".$levelstr.\"]\".LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}else\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}\n\t\tfclose($fd);\n}",
"function write_log($log_file, $log_message)\t{\n\t\t$mylogfile = fopen($log_file, \"a\") or die(\"Unable to open file!\");\n\t\tfwrite($mylogfile, date('Y-m-d H:i:s') . \" IP:\" . str_pad(get_client_ip(),15) . \" \" . $log_message . \"\\n\");\n\t\tfclose($mylogfile);\n\t}",
"function write(){\n\n\n\t\t// Create the logger\n\t\t$logger = new Logger('my_logger');\n\t\t// Now add some handlers\n\t\t$logger->pushHandler(new StreamHandler(__DIR__.'/log/my_app.log', Logger::DEBUG));\n\t\t\n\t\t$log = $logger->pushHandler(new FirePHPHandler());\n\n\n\t\treturn $log;\n\n\n }",
"function write($msg, $lvl=1){\n global $DB, $CONFIG, $USER;\n if((int)@$CONFIG->Logging->Filter_level > $lvl) return;\n \n $CONFIG->Logging->setType('Type', 'select', array('none' => 'None', 'db' => 'DB', 'file' => 'File'));\n $src='?';\n if(isset($this)) $src = get_class($this).'('.$this->ID.')';\n switch(strtolower(@$CONFIG->Logging->Type)){\n case 'db':\n $DB->log->insert(array('remote_addr' => $_SERVER['REMOTE_ADDR'],'user' => $USER->ID, 'level' => $lvl, 'source' => $src, '#!time' => 'NOW()','message' => $msg));\n break;\n case 'file':\n $r=fopen(PRIV_PATH.'/log', 'ab');\n fwrite($r, join(\"\\t\", array(date(\"Y-m-d H:i:s\"),$src,$lvl,$_SERVER['REMOTE_ADDR'],$USER->ID,str_replace(\"\\t\", '', $msg))));\n fclose($r);\n break;\n }\n }",
"function save_log($g,$p,$file) {\n\t$txt = '';\n\t$txt .= \"GET\\n\";\n\tforeach ($g as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\t$txt .= \"POST\\n\";\n\tforeach ($p as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}",
"function CreateLogRami($text) {\n $fopen = fopen(\"Rami.log\", \"a\");\n fwrite($fopen, \"[\" . date(\"h:i:s\") . \"]:$text \" . PHP_EOL . \"\");\n fclose($fopen);\n}",
"function wLog($path,$param,$sMessage) {\n \n $fp = fopen ($path.\"/\".$param.\".log\", \"a+\");\n if (fputs ($fp, $sMessage.(chr(13)))) {\n return true;\n } else {\n return false;\n }\n fclose ($fp);\n \n}",
"function dev_write_log( $handle, $message ) {\n\t$log = new WPAS_Logger( $handle );\n\t$log->add( $message );\n}",
"public function logInfo($text2log) {\n\n //echo ROOT;die;\n $rootFolder = ROOT .'/logs/';\n\n if(!is_dir($rootFolder)){\n mkdir($rootFolder,0777,true);\n }\n\n /* Log will be saved in \"Month_Year\" based folder. It will create \"Month_Year\"\n named folder and dump log date wise.\n ../log/May_2015/... # Contains web page related logs\n ../log/June_2015/... # Contains app related logs */\n\n $today = getdate();\n $date = $today['mday'];\n $dir_name = $today['month'] . '_' . $today['year'] . '/';\n\n // Check app/web named folder is exist or not\n if (!file_exists($rootFolder . $dir_name)) {\n mkdir($rootFolder . $dir_name, 0777, true);\n }\n\n $filename = $rootFolder . $dir_name . \"/log_$date.log\";\n if (!file_exists($filename)) {\n $fh = fopen($filename, 'a+'); //implicitly creates file\n fwrite($fh, '==================================================================================' . \"\\r\\n\");\n fwrite($fh, 'II Time(12 Hr) Request' . \"\\r\\n\");\n fwrite($fh, '==================================================================================' . \"\\r\\n\");\n fwrite($fh, $text2log);\n } else {\n $fh = fopen($filename, \"a+\");\n fwrite($fh, $text2log);\n }\n fclose($fh);\n }",
"function logguer($texte)\n{\n\t$log = fopen('Livraison.log', 'a');\n\tfwrite($log, date('d/m/Y H:i:s').' '.$texte);\n\tfclose($log);\n\techo str_replace(\"\\n\", '<br>', $texte);\n}",
"function addToLog ($content){\n\t\t$file = fopen ('../../data/log.txt', 'a+');\n\n\t\tfwrite ($file, $content);\n\t\tfclose ($file);\n\t}",
"public function testWrite()\n\t{\n\t\tCatapult\\Log::write(time(), \"ERROR_CODE\", \"TEST\");\n\t}",
"function stupid_log( $i, $label, $wikidata_ID ) {\n\t$log_message = sprintf( \"%d,%s,%s,%s\\n\",\n\t\t$i,\n\t\t$wikidata_ID,\n\t\t$label,\n\t\tdate('Y-m-d H:i:s')\n\t);\n\tfile_put_contents( 'log.txt', $log_message, FILE_APPEND );\n}",
"public static function write(){\n\t\treturn \\Illuminate\\Log\\Writer::write();\n\t}",
"public function _write_log($type, $result, $user = NULL, $description = NULL);",
"function logToFile($arg1=\"\", $arg2=\"\",$arg3=\"\",$arg4=\"\",$arg5=\"\",$arg6=\"\"){\n\n\t$time = date(\"Y-m-d H:i:s\");\n\t\n\t$date = date(\"Y-m-d\");\n\t\n\t$str = \" $time \\t $arg1 \\t $arg2 \\t $arg3 \\t $arg4 \\t $arg5 \\t $arg6 \\t \\n\"; \n\t\n\terror_log(\"$str\\n\", 3, 'log/test_MoveProspectAccounts_'.$date.'.log'); \n\n}",
"protected function createLogFile() {}",
"public static function writeLog(string $line, string $log)\n {\n $logPath = self::filePath($log);\n $file = @fopen($logPath, 'a');\n\n // failed to open/create file, notify\n if (!$file) {\n echo \"<b>Warning:</b> Log file '{$log}' is unwritable, check permissions of the log folder.\";\n } else {\n\n // if the file is full, do not write\n if (@filesize($logPath) < config('app')['log_max_size']) {\n fwrite($file, \"\\r\\n[\". date(config('app')['date_format']) .\"] \". $line);\n fclose($file);\n }\n }\n }",
"function appendLog($logentry)\r\n{\r\n global $phpLogMessage;\r\n $logfile = 'logarr.log';\r\n $logdir = 'assets/data/logs/';\r\n $logpath = $logdir . $logfile;\r\n $date = date(\"D d M Y H:i T \");\r\n\r\n if (file_exists($logdir)) {\r\n ini_set('error_reporting', E_ERROR);\r\n $oldContents = file_get_contents($logpath);\r\n if (file_put_contents($logpath, $oldContents . $date . \" | \" . $logentry . \"\\r\\n\") === false) {\r\n phpLog($phpLogMessage = \"Logarr ERROR: Failed writing to Logarr log file\");\r\n echo \"<script>console.log('%cERROR: Failed writing to Logarr log file.', 'color: red;');</script>\";\r\n return \"Error writing to Logarr log file\";\r\n //return $error;\r\n }\r\n } else {\r\n if (!mkdir($logdir)) {\r\n echo \"<script>console.log('%cERROR: Failed to create Logarr log directory.', 'color: red;');</script>\";\r\n phpLog($phpLogMessage = \"Logarr ERROR: Failed to create Logarr log directory\");\r\n return \"ERROR: Failed to create Logarr log directory\";\r\n } else {\r\n appendLog(\"Logarr log directory created\");\r\n appendLog($logentry);\r\n return \"Logarr log directory created\";\r\n }\r\n }\r\n}",
"public function write_to_log( $username = '', $text = '', $newline = true )\n\t{\n\t\t$text = print_r( $text, true );\n\t\tif( $newline ) $text .= \"\\n\";\n\t\t$text = str_pad( $username, 8, ' ', STR_PAD_RIGHT ).' : '.$text;\n\t\tfile_put_contents( NHS_LOG_FILE, $text, FILE_APPEND );\n\t}",
"function MCW_logfile($entry) { \n global $mcw_write_log;\n if ($mcw_write_log){ //only used during plugin development\n global $mcw_path;\n $filename = $mcw_path[\"log\"];\n if (!file_exists($filename)){\n $answer = \"file \".$filename.\" does not exist. <br>\";\n } else {\n if (!$handle = fopen($filename, \"a\")) {\n $answer = $answer. \"File \".$filename.\" cannot be opened.<br>\";\n } else {\n // Schreibe $somecontent in die geöffnete Datei.\n $somecontent = '<strong>'.date(\"F j, Y, g:i a\").'</strong> - '.$entry.'<br>'; \n if (!fwrite($handle, $somecontent)) {\n $answer = $answer. \"File \".$filename.\" is not writeable.<br>\";\n } else {\n $answer = $answer.\"done \";\n }\n }\n fclose($handle);\n }\n }\n }",
"function log($type, $log) {\n try {\n $fh = fopen($this->logFilePath, 'a');\n fwrite($fh, date($this->dateFormat) . \" - {$type} -> {$log}\" . PHP_EOL);\n fclose($fh);\n } catch(Exception $e) {\n $this->error($e->getMessage());\n }\n }",
"function log_w($path,$str)\n{\n\t$log = '';\n\tif( file_exists($path) ){\n\t\t$log = file_get_contents($path);\n\t}\n\tfile_put_contents($path,$log.date('Y-m-s H:i:s').' '.$str);\n}",
"function logThisToTxtFile($logENID,$action)\n{\n\t$detect = new Mobile_Detect();\n\t\n\t$user_browser=user_browser();\n\t$user_os=user_os();\n\t$user_ip=getRealIpAddr();\n\t\t\t\t\n\tif ($detect->isMobile())\n\t{\n\t\t// mobile content\n\t\t$device='Mobile';\n\t} \t\t\t\t\n\telse\n\t{\n\t\t// other content for desktops\n\t\t$device='Desktop';\n\t}\n\tdate_default_timezone_set('UTC');\t\n\t$logDateTime= date('Y-m-d H:i:s');\t\t\n\t$log_this = 'EN client '.$logENID.': '.$action.' on UTC '.$logDateTime.' from '.$user_ip.' using '.$device.' through browser '.$user_browser.' ,OS: '.$user_os;\n\t$filename= 'ENLog_'.date('MY').'.txt';\n \t$myfile = file_put_contents($filename, $log_this.PHP_EOL , FILE_APPEND);\t\n\n}",
"public function write(Logline $msg) {\n\t\t//syslog has no LOG_TRACE level, so we'll set it to LOG_DEBUG\n\t\tif($level === Logger::TRACE) {\n\t\t\t$level = Logger::DEBUG;\n\t\t}\n\n\t\tforeach ($facilities as $fac) {\n\t\t\t@openlog($this->ident, LOG_PID, $fac);\n\t\t\t@syslog($level, $logline);\n\t\t}\n\t}",
"function logLogin() {\n if(file_exists('../../log.txt')) {\n $ficheiro = fopen('../../log.txt', 'a') or die('fopen a');\n } else {\n $ficheiro = fopen('../../log.txt', 'w+') or die('fopen w+');\n }\n date_default_timezone_set('Europe/Lisbon');\n $data = time();\n $texto = ('Login: ' . date('d-m-Y H:i:s', $data) . ' ' . $_SESSION['nome'].\"\\n\");\n fprintf($ficheiro, $texto);\n fclose($ficheiro);\n}",
"function setLog( $msg = NULL )\n {\n if( $msg == NULL ){\n \t\t$this->logErro = \n<<<EOT\n =============== *UPLOAD* LOG =============== <br />\n Pasta destino: $this->path <br />\n \tNome do arquivo: {$this->source[ \"name\" ]} <br />\n Tamanho do arquivo: {$this->source[ \"size\" ]} bytes<br />\n Tipo de arquivo: {$this->source[ \"type\" ]} <br />\n\t\t---------------------------------------------------------------<br /><br />\nEOT;\n }else{\n \t\t$this->logErro .= $msg;\n }\n }",
"function writeLog($msg)\n\t{\n\t\t$filepath = C_DB_PATH.'/'.'log-'.date('Y-m-d').'.log';\n\t\t\n\t\tif(!file_exists(C_DB_PATH))\n\t\t{\n\t\t\t$this->makeDir(C_DB_PATH, '/');\n\t\t}\n\t\t\n\t\tif(!$fp = @fopen($filepath, \"a\"))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$message = $msg.\"\\n\";\n\t\t\n\t\tfwrite($fp, $message);\n\t\tfclose($fp);\n\t\t\n\t\t@chmod($filepath, 0666);\n\t\treturn TRUE;\n\t}",
"function _log($message) {\n file_put_contents(\n LOG_FILE, \n $message,\n FILE_APPEND\n );\n}",
"public function WriteLog($msg)\n {\n $this->parent_logger_instance->WriteLog($msg);\n }",
"function writeLog( $l, $path = '.', $file = 'logFile.txt' ) {\n\t$files = get_included_files();\n\tif ( in_array(__DIR__.DIRECTORY_SEPARATOR.'getMyTime().php', $files) ) $log = dateToReadableFormat( getMyTime() ).'\t\t\t';\n\telse if ( file_exists($path.DIRECTORY_SEPARATOR.'getMyTime().php') && require($path.DIRECTORY_SEPARATOR.'getMyTime().php') ) $log = dateToReadableFormat( getMyTime() ).'\t\t\t';\n\telse $log = 'Can\\'t find '.$path.DIRECTORY_SEPARATOR.'getMyTime().php\n';\n\t$log .= $l.'\n';\n\tfile_put_contents( $path.DIRECTORY_SEPARATOR.'help'.DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR.$file, $log, FILE_APPEND );\n}",
"public function write_log($log_file, $log_tag=\"i\", $log_msg){\n $fh = $this->open_log_file($log_file);\n\n $log_txt = \"[\".self::timestamp().\"]\";\n $log_txt .= \" \";\n $log_txt .= \"[\".$this->LOG_TAG[$log_tag].\"]\";\n $log_txt .= \" \";\n $log_txt .= $log_msg;\n $log_txt .= \"\\n\";\n\n fwrite($fh, $log_txt);\n @flush();\n fclose($fh);\n }",
"function writeLineToLog($line){\n $logFile = \"log.txt\";\n $fh = fopen($logFile, 'a') or die(\"can't open file\");\n $line .= \"\\n\";\n fwrite($fh, $line);\n fclose($fh);\n}",
"public static function write($logFile, $msg) {\r\n \t$fp = fopen($logFile, 'a');\r\n \t$log = '### '.date('d.m.Y H:i:s:'.substr(microtime(), 2, 3)).' ##############'.\"\\n\".$msg.\"\\n\\n\";\r\n \tfwrite($fp, $log);\r\n \tfclose($fp);\r\n }",
"public function log($msg)\n {\n $this->file->filePutContents($this->logFile, $this->config->x_shop_name.\" \".date('c').\" \".var_export($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }",
"function writerErrLog($errText){\n// err::writerErrLogToDatabase($errText);\n\n}",
"private function log($text){\r\n if ($this->debug){\r\n $fp = fopen('logs/BRUnit_output.txt','a');\r\n fwrite($fp, date('l jS \\of F Y h:i:s A'). ': ' . $text.\"\\n\");\r\n fclose($fp);\r\n }\r\n }",
"public function saveLog($dataitem,$logType,$message){\n\n\t\t$db = DB::getInstance();\n\t\t\n global $config;\n\n $authsaml = AuthSaml::getInstance();\n if( $authsaml->isAuth()) {\n $authAttributes = $authsaml->sAuth();\n } else {\n $authAttributes[\"saml_uid_attribute\"] = \"\";\n }\n //$dbCheck = DB_Input_Checks::getInstance();\n\n\n // If authenticated also add authID to log\n // add os, browser and html5 version to log message\n if(isset($dataitem['fileuid'])) \n {\n $logfileuid\t= $dataitem['fileuid'];\n $logvoucheruid\t= $dataitem['filevoucheruid'];\n $logtype\t= $logType;\n $logfrom\t= $dataitem['filefrom'];\n $logto\t= $dataitem['fileto'];\n $logdate\t= date($config['db_dateformat'], time());//use timestamp with timezone $dbCheck->checkString(pg_escape_string($dataitem['logdate']));\n $logfilesize\t= $dataitem['filesize'];\n $logfilename\t= $dataitem['fileoriginalname'];\n $logmessage\t= $message;\n $logauthuseruid\t= $authAttributes[\"saml_uid_attribute\"];\n } else {\n $logfileuid\t= \"\";\n $logvoucheruid\t= \"\";\n $logtype\t= $logType;\n $logfrom\t= \"\";\n $logto\t= \"\";\n $logdate\t= date($config['db_dateformat'], time());//use timestamp with timezone $dbCheck->checkString(pg_escape_string($dataitem['logdate']));\n $logfilesize\t= \"\";\n $logfilename\t= \"\";\n $logmessage\t= $message;\n $logauthuseruid\t= $authAttributes[\"saml_uid_attribute\"];\n }\n\t\t\n\t\t$pdo = $this->db->connect();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Set Errorhandling to Exception\n\t\t$statement = $pdo->prepare(\"INSERT INTO \n logs \n (\n logfileuid,\n logvoucheruid, \n logtype , \n logfrom, \n logto, \n logdate, \n logfilesize, \n logfilename, \n logmessage,\n logauthuseruid\n ) \n VALUES \n (\n :logfileuid,\n :logvoucheruid, \n :logtype , \n :logfrom, \n :logto, \n :logdate, \n :logfilesize, \n :logfilename, \n :logmessage,\n :logauthuseruid\n )\");\n\t\t\t\n\t\t\t$statement->bindParam(':logfileuid',$logfileuid);\n\t\t\t$statement->bindParam(':logvoucheruid',$logvoucheruid); \n\t\t\t$statement->bindParam(':logtype', $logtype);\n\t\t\t$statement->bindParam(':logfrom', $logfrom);\n\t\t\t$statement->bindParam(':logto', $logto);\n\t\t\t$statement->bindParam(':logdate',$logdate); \n\t\t\t$statement->bindParam(':logfilesize', $logfilesize);\n\t\t\t$statement->bindParam(':logfilename', $logfilename);\n\t\t\t$statement->bindParam(':logmessage',$logmessage);\n\t\t\t$statement->bindParam(':logauthuseruid',$logauthuseruid);\n\t\t\n\t\ttry \n\t\t{ \t\n\t\t\t$statement->execute(); \n\t\t\t return true;\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{ \n\t\t\tdisplayError(lang(\"_ERROR_CONTACT_ADMIN\"),$e->getMessage()); \n\t\t\treturn false;\n\t\t}\n }"
] | [
"0.73643374",
"0.7152471",
"0.7080219",
"0.69366467",
"0.6919771",
"0.6873614",
"0.687128",
"0.68666655",
"0.68610495",
"0.68370354",
"0.6800784",
"0.67614275",
"0.6751181",
"0.67466253",
"0.67196137",
"0.6703445",
"0.66557795",
"0.66535044",
"0.6636282",
"0.6625219",
"0.6593361",
"0.6546932",
"0.6541237",
"0.65296185",
"0.65278476",
"0.6516587",
"0.65127",
"0.65120703",
"0.6485188",
"0.64799595",
"0.6437142",
"0.64215165",
"0.64159614",
"0.6413809",
"0.64132655",
"0.64009476",
"0.63922185",
"0.6381128",
"0.63668394",
"0.63302547",
"0.6298571",
"0.62936074",
"0.6292409",
"0.62898123",
"0.62892944",
"0.62474763",
"0.623332",
"0.6221292",
"0.62156284",
"0.62145525",
"0.61945236",
"0.61870205",
"0.61820126",
"0.6178186",
"0.61758554",
"0.6172012",
"0.6164743",
"0.61646205",
"0.6157745",
"0.6152741",
"0.6144418",
"0.6134404",
"0.61255777",
"0.612312",
"0.61204714",
"0.6116958",
"0.6107972",
"0.610339",
"0.60914207",
"0.6085424",
"0.60818595",
"0.6081549",
"0.6081169",
"0.60648835",
"0.60639584",
"0.6063777",
"0.6058052",
"0.6044728",
"0.60432273",
"0.6042681",
"0.60407174",
"0.6029648",
"0.602633",
"0.6019134",
"0.601604",
"0.6013458",
"0.60065037",
"0.60049224",
"0.6004154",
"0.60037714",
"0.6000868",
"0.5999453",
"0.59963095",
"0.598474",
"0.59819394",
"0.59729177",
"0.5971375",
"0.59679765",
"0.5967326",
"0.5965943",
"0.59566295"
] | 0.0 | -1 |
function change Fungsi ini mengubah sistem | public function change(string $slug)
{
// [$system, $count] = $this->model('SystemModel')->get([
// ['sys_slug', $slug],
// ]);
// if ($count == 0) {
// Flasher::setFlash('System tidak ditemukan!', 'change', 'error');
// } else {
// unset($_SESSION['SYSTEM']);
// $_SESSION['SYSTEM'] = $system;
// }
// header('Location:' . BASE_URL);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function change();",
"function change()\n {\n }",
"public function edit_toko(){\n\t}",
"public function changeFunc() {}",
"protected function editar()\n {\n }",
"public function change()\n {\n \n $this->execute('DELETE FROM cotz_cotizaciones_catalogo WHERE id = 12');\n \n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Abierta', etiqueta='abierta' WHERE id = '7'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Ganada', etiqueta='ganada' WHERE id = '9'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Perdida', etiqueta='perdida' WHERE id = '10'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Anulada', etiqueta='anulada' WHERE id = '11'\");\n \n $this->execute(\"UPDATE cotz_cotizaciones SET estado='abierta' WHERE estado = 'aprobado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='ganada' WHERE estado = 'ganado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='perdida' WHERE estado = 'perdido'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='anulada' WHERE estado = 'anulado'\");\n }",
"public function editar()\n {\n }",
"public function modelDoEdit(){\n\t\t\t$maphongban = isset($_GET[\"maphongban\"])&&is_numeric($_GET[\"maphongban\"])?$_GET[\"maphongban\"]:0;\n\t\t\t$tenphongban = $_POST[\"tenphongban\"];\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//chuan bi truy van\n\t\t\t$query = $conn->prepare(\"update phongban set tenphongban=:ten where maphongban=:ma\");\n\t\t\t$query->execute(array(\"ten\"=>$tenphongban,\"ma\"=>$maphongban));\n\t\t}",
"function change() {\n\t\t$mainframe = JFactory::getApplication();\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die('Invalid Token');\n\t\t$option = clm_core::$load->request_string('option', '');\n\t\t$section = clm_core::$load->request_string('section', '');\n\t\t$db = JFactory::getDBO();\n\t\t$table = JTable::getInstance('saisons', 'TableCLM');\n\t\t$table->load(1);\n\t\t$pub_1 = $table->archiv;\n\t\tif ($pub_1 == \"1\") {\n\t\t\t$table->archiv = 0;\n\t\t} else {\n\t\t\t$table->archiv = 1;\n\t\t}\n\t\t$table->store();\n\t\t$table->load(2);\n\t\t$pub_2 = $table->published;\n\t\tif ($pub_2 == \"1\") {\n\t\t\t$table->published = 0;\n\t\t} else {\n\t\t\t$table->published = 1;\n\t\t}\n\t\t$table->store();\n\t\t$msg = JText::_('SAISON_MSG_STATUS');\n\t\t$this->setMessage($msg);\n\t\t$this->setRedirect('index.php?option=' . $option . '§ion=' . $section);\n\t}",
"function change($name,&$status,$period){\n global $db,$koalicia;\n $parts = explode(\" - \", $period);\n\n //vyber datumu volieb, v ktorom bola konkretna strana zvolena\n $den1_query = \"SELECT den1 from volby \n INNER JOIN vysledky on vysledky.id_volby = volby.id\n INNER JOIN strany on vysledky.id_strany = strany.id\n WHERE strany.nazov = '{$name}' AND volby.den1 LIKE '{$parts[0]}%'\";\n $stmt = $db->query($den1_query);\n $den1_res = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $den1 = $den1_res[0]['den1'];\n\n $toSet = isset($koalicia) ? 1 : 0;\n\n\n $query = \"UPDATE vysledky SET vysledky.koalicia = {$toSet} \n WHERE vysledky.id_strany in (SELECT id from strany where strany.nazov = '{$name}') \n AND vysledky.id_volby in (select id from volby where volby.den1 = '{$den1}')\";\n\n $link = \"parties.php?period=\".$parts[0].\"+-+\".$parts[1].\"&submit=zobrazit\";\n redirect($link,$db->exec($query),$status);\n}",
"public function edit() {\n\t\t\t\n\t\t}",
"function alterar($id_n1, $id_grupo, $id_menu, $publicado, $n1_perfil, $ordem, $dbhw) {\n\tglobal $esquemaadmin;\n\t$dataCol = array(\n\t\t\t\"publicado\" => $publicado,\n\t\t\t\"id_grupo\" => $id_grupo,\n\t\t\t\"ordem\" => $ordem,\n\t\t\t\"n1_perfil\" => $n1_perfil\n\t);\n\t$resultado = i3GeoAdminUpdate($dbhw,\"i3geoadmin_n1\",$dataCol,\"WHERE id_n1 = $id_n1\");\n\tif ($resultado === false) {\n\t\treturn false;\n\t}\n\treturn $id_n1;\n}",
"public function edit()\n\t{\n\t\t\n\t}",
"function edit_info()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно определить ID языка\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => \"lid='\".$this->ipsclass->input['id'].\"'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти язык по введенному ID\");\n\t\t}\n\n\t\t$final['lname'] = stripslashes($_POST['lname']);\n\n\t\tif (isset($_POST['lname']))\n\t\t{\n\t\t\t$final['lauthor'] = stripslashes($_POST['lauthor']);\n\t\t\t$final['lemail'] = stripslashes($_POST['lemail']);\n\t\t}\n\n\t\t$this->ipsclass->DB->do_update( 'languages', $final, \"lid='\".$this->ipsclass->input['id'].\"'\" );\n\n\t\t$this->rebuild_cache();\n\n\t\t$this->ipsclass->admin->done_screen(\"Языковой модуль обновлен\", \"Управление языками\", \"{$this->ipsclass->form_code}\" );\n\n\t}",
"public function onEdit($param)\n {\n if (array_key_exists('return',$param))\n {\n TSession::setValue(get_class($this).'return','config');\n }\n else\n {\n TSession::setValue(get_class($this).'return','normal');\n }\n $fer = new TFerramentas();\n $sicad = new TSicadDados();\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n try\n {\n TTransaction::open('sisacad');\n \n if (isset($param['key']))\n {\n $key = $param['key'];\n \n $object = new disciplina($key);\n $this->form->setData($object);\n \n //$items = professordisciplina::where('disciplina_id', '=', $key)->load();\n if ($this->nivel_sistema>80)\n {\n $items = professordisciplina::where('disciplina_id', '=', $key)->load();\n }\n else\n {\n $items = professordisciplina::where('disciplina_id', '=', $key)->\n where('opm_id','IN',$this->listas['lista'])->load();\n }\n \n $this->table_details->addSection('tbody');\n if ($items)\n {\n foreach($items as $item )\n {\n $this->addDetailRow($item);\n }\n \n // create add button\n $add = new TButton('clone');\n $add->setLabel('Add');\n $add->setImage('fa:plus-circle green');\n $add->addFunction('ttable_clone_previous_row(this)');\n \n // add buttons in table\n $this->table_details->addRowSet([$add]);\n }\n else\n {\n $this->onClear($param);\n }\n \n TTransaction::close(); // close transaction\n }\n }\n catch (Exception $e) // in case of exception\n {\n new TMessage('error', $e->getMessage());\n TTransaction::rollback();\n }\n }",
"public function edit()\n\t{\n\t\t//\n\t}",
"function modificarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t\r\n\t\t$parametros = $this->aParam->getArregloParametros('asignacion');\r\n\t\t//si esdel tipo matriz verifica en la primera posicion el tipo de vista\r\n\t\tif($this->esMatriz){\r\n\t\t $tipo_operacion =$parametros[0]['tipo_operacion'];\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t$tipo_operacion =$parametros['tipo_operacion'];\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipo_operacion=='asignacion'){\r\n\t\t $this->transaccion='tgv_SERVIC_MOD';\r\n } \r\n elseif($tipo_operacion=='cambiar_estado'){ \r\n\t\t $this->transaccion='tgv_SERCAMEST_MOD';\r\n\t\t $this->setParametro('operacion','operacion','varchar');// cuando finaliza los requerimientos, su valor es fin_requerimiento\r\n\t\t //$this->setParametro('id_abogado','id_abogado','int4');\r\n\t\t}\r\n\t\telseif ($tipo_operacion=='def_fechas'){ \r\n\t\t $this->transaccion='tgv_DEFFECHA_MOD';\r\n\t\t // $this->setParametro('operacion','operacion','varchar');// cuando finaliza los requerimientos, su valor es fin_requerimiento\r\n\t\t //$this->setParametro('id_abogado','id_abogado','int4');\r\n\t\t}\r\n\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_lugar_destino','id_lugar_destino','int4');\r\n\t\t$this->setParametro('id_ep','id_ep','int4');\r\n\t\t$this->setParametro('fecha_asig_fin','fecha_asig_fin','date');\r\n\t\t$this->setParametro('fecha_sol_ini','fecha_sol_ini','date');\r\n\t\t$this->setParametro('descripcion','descripcion','varchar');\r\n\t\t$this->setParametro('id_lugar_origen','id_lugar_origen','int4');\r\n\t\t$this->setParametro('cant_personas','cant_personas','int4');\r\n\t\t$this->setParametro('fecha_sol_fin','fecha_sol_fin','date');\r\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\r\n\t\t$this->setParametro('fecha_asig_ini','fecha_asig_ini','date');\r\n\t\t$this->setParametro('id_funcionario_autoriz','id_funcionario_autoriz','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}",
"public function change()\n {\n $this->query(\"update `UserRole` set `description`='Administrator of system' where `role_id`=2\");\n $this->query(\"update `UserRole` set `description`='Owner of site' where `role_id`=1\");\n $this->query(\"update `Site` set `site_name`='teamlab-srv.oft-e.com' where `id`=1\");\n $this->query(\"update `Site` set `site_name`='smartbiz24.ru' where `id`=2\");\n $this->query(\"update `Site` set `site_name`='yandex.ru' where `id`=3\");\n $this->query(\"update `Site` set `site_name`='google.com' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Witaliy' where `id`=1\");\n $this->query(\"update `User` set `first_name`='Victor' where `id`=2\");\n $this->query(\"update `User` set `first_name`='Peter' where `id`=3\");\n $this->query(\"update `User` set `first_name`='Sergey' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Igor' where `id`=5\");\n }",
"function EditDataPromosi()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$id_promosi = $_POST['id_promosi'];\n\t\t$status = $_POST['status'];\n\t\t\n\t\t//update ke tabel promosi\n\t\t$sql = \"UPDATE promosi SET status = ?, id_pegawai = ? WHERE id_promosi = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('sii', $status, $id_pegawai, $id_promosi);\n\t\tif($stmt->execute()){\n\t\t\t$_SESSION['status_operasi_promosi'] = \"berhasil_memperbaharui\";\n\t\t}else{\n\t\t\t$_SESSION['status_operasi_promosi'] = \"gagal_memperbaharui\";\n\t\t}\n\t\t$stmt->close();\n\t}",
"function change_summer($betriebsart){\n\t\tconnectsql();\n\t\t// --- Write Data to DB ---\n\t\t$sql_query = \"UPDATE poolsettings SET `summer1`=$betriebsart\";\n\t\tmysql_query($sql_query) or syslog(LOG_WARNING,\"** kein Schreiben durch $job in DB! **\". mysql_error());\n\t\t//Close Connection to MySQL\n\t\tmysql_close();\n}",
"public function change()\n {\n echo '客户要求改变一个需求' . PHP_EOL;\n }",
"public function change()\n {\n // Page de changement de mdp\n define(\"TITLE_HEAD\", \"Volunteers | Change password\");\n $this->load->view('user/change_password.php');\n }",
"public function change()\n {\n ## Alter Jenis Izin ##\n $table = $this->table('jenis_izin');\n $table\n ->changeColumn('oss_id', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ])\n ->renameColumn('oss_id', 'kode_oss');\n $table->update();\n\n ## BEGIN - Create Table data_sinc ##\n $table = $this->table('data_sinc');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('key', 'string', [\n 'default' => null,\n 'limit' => 1000,\n 'null' => false,\n ])->addIndex(['key']);\n\n $table->addColumn('keterangan', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->addColumn('parent_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['parent_id']);\n\n $table->addColumn('index', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => false,\n ])->addIndex(['index']);\n\n $table->create();\n\n ## BEGIN - Create Table data_sinc_detail ##\n $table = $this->table('data_sinc_detail');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('data_sinc_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['data_sinc_id']);\n\n $table->addColumn('data_kolom_id', 'biginteger', [\n 'default' => null,\n 'null' => false,\n ])->addIndex(['data_kolom_id']);\n\n $table->addColumn('oss_type_kolom', 'string', [\n 'default' => null,\n 'limit' => 5,\n 'null' => false,\n ])->addIndex(['oss_type_kolom']);\n\n $table->addColumn('oss_kolom', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ])->addIndex(['oss_kolom']);\n\n $table->create();\n\n ## BEGIN - Create Table nib ##\n $table = $this->table('nib');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('alamat_investasi', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->addColumn('daerah_investasi', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => true,\n ]);\n\n $table->addColumn('status_penanaman_modal', 'string', [\n 'default' => null,\n 'limit' => 2,\n 'null' => true,\n ])->addIndex(['status_penanaman_modal']);\n\n $table->addColumn('status_badan_hukum', 'string', [\n 'default' => null,\n 'limit' => 2,\n 'null' => true,\n ])->addIndex(['status_badan_hukum']);\n\n $table->addColumn('jangka_waktu', 'datetime', [\n 'default' => null,\n 'null' => true,\n ]);\n\n $table->addColumn('oss_id', 'string', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ])->addIndex(['oss_id']);\n\n $table->addColumn('nib', 'string', [\n 'default' => null,\n 'limit' => 14,\n 'null' => false,\n ])->addIndex(['nib']);\n\n $table->create();\n }",
"public function editPriceMoney(){\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public function Edit()\n\t{\n\t\t\n\t}",
"public function modificacionLibro() {\n\t\t\t$idlibros = $this->input->post('idlibro'); \n\t\t\t$titulo = $this->input->post('titulo'); \n\t\t\t$precio = $this->input->post('precio'); \n\n\t\t\t//validar si datos informados\n\t\t\tif (empty($titulo) || empty($precio) || empty($idlibros)) {\n\t\t\t\t$respuesta = \"todos los datos son obligatorios\";\n\t\t\t} else {\n\t\t\t\t//llamar al modelo para la modificación\n\t\t\t\t$libro = $this->Libreria->modificaLibro($idlibros, $titulo, $precio);\n\t\t\t\t$datos['libro']=$libro;\n\t\t\t}\n\n\t\t\t//recuperar las secciones \n\t\t\t$datos = $this->cargarSecciones();\n\n\t\t\t//consulta al modelo para recuperar el array de libros\n\t\t\t$libros = $this->Libreria->consultaLibros();\n\t\t\t$datos['libros']=$libros;\n\t\t\t$respuesta=\"modificacion efectuada\";\n\t\t\t//cargamos la vista\n\t\t\t$datos['idlibros'] = $idlibros;\n\t\t\t$datos['titulo'] = $titulo;\n\t\t\t$datos['precio'] = $precio;\n\t\t\t$datos['respuesta'] = $respuesta;\n\t\t\t$this->load->view('modificacion', $datos);\n\n\t\t}",
"public function actualizar(){\n }",
"public function actualizar(){\n }",
"public function edit()\r\n {\r\n //\r\n }",
"public function edit()\r\n {\r\n //\r\n }",
"static function alter() {\n }",
"function ul_cadi_settings(){\r\n\r\n}",
"function set_idioma($code = 'es')\n\t{\n\t\tif ($code != '' && $code != $this->config->item('language'))\n\t\t{\n\t\t\t$this->config->set_item('language', $code);//CAMBIO EL IDIOMA DEL CONFIG\n\t\t}\n\t\t$this->session->set_userdata('idioma',$code); //adicional por hector en 30/10/2013 para sol y luna\n\t\t$this->session->set_userdata('id_idioma',$this->idioma_model->get_id($code));//AGREGADO POR HECTOR\n\t}",
"function evt__form_integrante_i__modificacion($datos)\r\n {\r\n $perfil = toba::usuario()->get_perfil_datos();\r\n if ($perfil == null) {//es usuario de SCyT\r\n if($this->chequeo_formato_norma($datos['rescd_bm'])){ \r\n $datos2['rescd_bm']=$datos['rescd_bm'];\r\n $datos2['resaval']=$datos['resaval'];\r\n $datos2['cat_investigador']=$datos['cat_investigador'];\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos2);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar('Guardado. Solo modifica ResCD baja/modif, Res Aval, Cat Investigador', 'info');\r\n }\r\n }else{//es usuario de la UA\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n $int=$this->dep('datos')->tabla('integrante_interno_pi')->get(); \r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){//no puede ir fuera del periodo del proyecto\r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{ \r\n //Pendiente verificar que la modificacion no haga que se superpongan las fechas\r\n $haysuperposicion=false;//no es igual al del alta porque no tengo que considerar el registro vigente$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion_modif($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta'],$registro['id_designacion'],$registro['desde']);\r\n if(!$haysuperposicion){\r\n $band=false;\r\n if($pi['estado']=='A'){\r\n $band=$this->dep('datos')->tabla('logs_integrante_interno_pi')->fue_chequeado($int['id_designacion'],$int['pinvest'],$int['desde']);\r\n } \r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD Baja/Modif invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if($band){//si alguna vez fue chequeado por SCyT entonces solo puede modificar fecha_hasta y nada mas (se supone que lo demas ya es correcto) \r\n //fecha_hasta porque puede ocurrir que haya una baja del participante o la modificacion de funcion o carga horaria\r\n unset($datos['funcion_p']);\r\n unset($datos['cat_investigador']);\r\n unset($datos['identificador_personal']);\r\n unset($datos['carga_horaria']);\r\n unset($datos['desde']);\r\n unset($datos['rescd']);\r\n unset($datos['cat_invest_conicet']);\r\n unset($datos['resaval']);\r\n unset($datos['hs_finan_otrafuente']);\r\n //Solo si cambia hasta y resol bm pierde el check\r\n if( $int['hasta']<>$datos['hasta'] or $int['rescd_bm']<>$datos['rescd_bm'] ){\r\n $datos['check_inv']=0;//pierde el check si es que lo tuviera. Solo cuando cambia algo\r\n }\r\n $mensaje='Ha sido chequeado por SCyT, solo puede modificar fecha hasta y resCD baja/modif';\r\n }else{//band false significa que puede modificar cualquier cosa\r\n //esto lo hago porque el set de toba no modifica la fecha desde por ser parte de la clave \r\n $this->dep('datos')->tabla('integrante_interno_pi')->modificar_fecha_desde($int['id_designacion'],$int['pinvest'],$int['desde'],$datos['desde']);\r\n $mensaje=\"Los datos se han guardado correctamente\";\r\n }\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar($mensaje, 'info'); \r\n }\r\n }\r\n }else{\r\n //toba::notificacion()->agregar('Hay superposicion de fechas', 'error'); \r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n }\r\n }\r\n }\r\n //nuevo Lo coloco para que el formulario se oculte al finalizar\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n $this->s__mostrar_i=0;\r\n }",
"function chucvu($UserID){\n //--- Neu chua dang nhap thi bat dang nhap\n if($this->session->userdata('permission')!=1){\n redirect(base_url());\n exit();\n }\n $data=$this->default_model->getInfoID($this->_table,array(\"userid\" => $UserID));\n $data['ChucVu']=$data['level'];\n $data['template']='admin/form_chucvu'; \n $per=$this->input->post(\"ChucVu\");\n //Neu dang nhap loi\n if($per==\"\")\n {\n }\n else\n {\n $cdata=array(\"level\" => $per);\n $this->default_model->updateDuLieu($this->_table,$cdata,array(\"userid\" => $UserID));\n redirect(base_url().\"thanhvien/quanlythanhvien/1/g/\");\n exit(); \n }\n $this->load->view('admin/admin',$data); \n }",
"public function changeMdp()\n {\n if(empty($_POST['oldMdp']) || empty($_POST['newMdp']) || empty($_POST['confirmMdp']))\n {\n echo \"Champs non remplie\";\n }\n else\n {\n if($_POST['newMdp'] == $_POST['confirmMdp'] )\n {\n $oldMdp = sha1($_POST['oldMdp']);\n $newMdp = sha1($_POST['newMdp']);\n\n $test = new UserModel();\n $test->mdpChange($_SESSION['pseudo'], $oldMdp, $newMdp);\n }\n else\n {\n echo \"pas egal\";\n }\n }\n\n }",
"public function actualizar(){\n }",
"function change()\n\t{\n\t\tglobal $errors, $db;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t$title = $_POST[ 'newmenutitle' ];\n\t\t\n\t\t$sql = \"UPDATE \" . MORECONTENT_MENU_TABLE . \" SET menu_title='$title' WHERE menu_id='$menuid' LIMIT 1\";\n\t\tif ( !$db->sql_query( $sql ) )\n\t\t{\n\t\t\t$errors->report_error( 'Couldn\\'t modify', CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Menu_changed' ], MESSAGE );\n\t}",
"public function change($options)\n\t{\n\n\t}",
"function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}",
"function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }",
"function evt__1__salida()\n\t{\n\t\t$this->dep('dependencias')->limpiar_seleccion();\n\t}",
"public function setoran_tunai()\n\t{\n\t\t$data['container'] = 'transaction/setoran_tunai';\n\t\t$data['rembugs'] = $this->model_cif->get_cm_data();\n\t\t$data['current_date'] = $this->format_date_detail($this->current_date(),'id',false,'/');\n\t\t$data['account_cash'] = $this->model_transaction->get_account_cash();\n\t\t$this->load->view('core',$data);\n\t}",
"public function edit( )\r\n {\r\n //\r\n }",
"function update()\n{\n $data = $_POST;\n $data['id'] = $_GET['id'];\n // We willen de button niet in de db hebben\n unset($data['Opslaan']);\n $succes = changeDB('UPDATE projecten set `name`=:name,`description` = :description,`date`=:date,`price`= :price WHERE id = :id',$data);\n if ($succes) {\n return index(\"update gelukt\");\n }\n return index(\"update gefaald\");\n\n}",
"function EDIT()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t$sql = \"SELECT * FROM EDIFICIO WHERE CODEDIFICIO= '$this->codedificio'\";\n \n\n $result = $this->mysqli->query($sql);\n \n //si se cumple la condicion\n if ($result->num_rows == 1) { //Si existe el edificio lo editamos\n //actualizamos los datos\n\t$sql = \"UPDATE EDIFICIO\n\t\t\tSET \n\t\t\tCODEDIFICIO = '$this->codedificio',\n\t\t\tNOMBREEDIFICIO = '$this->nombreedificio',\n\t\t\tDIRECCIONEDIFICIO = '$this->direccionedificio',\n\t\t\tCAMPUSEDIFICIO = '$this->campusedificio' \n\t\t\tWHERE \n\t\t\tCODEDIFICIO= '$this->codedificio'\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\tif ($this->mysqli->query($sql)) //Si la consulta se ha realizado correctamente, mostramos mensaje \n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse //Si no, mostramos mensaje de error\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devolvemos el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}",
"function changeLang($i) //show and change the language for user\n{\n global $message_id;\n global $user_id;\n global $text;\n global $db;\n global $locale;\n if ($i == 0)\n {\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET current_level = 'watching_change_language' WHERE user_id = {$user_id}\");\n\n if ($locale == \"farsi\")\n makeCurl(\"editMessageText\", [\"chat_id\" => $user_id, \"message_id\" => $message_id, \"text\" => \"انتخاب کن.\", \"reply_markup\" => json_encode([\n \"inline_keyboard\" =>[\n [\n [\"text\" => \"فارسی\", \"callback_data\" => \"chang3_T0_p3Rs1an\"], [\"text\" => \"انگلیسی\", \"callback_data\" => \"chang3_T0_3nGl1sH\"]\n ],\n [\n [\"text\" => \" بازگشت\", \"callback_data\" => \"R3tuRn\"]\n ]\n ]\n ])]);\n elseif ($locale == \"english\")\n makeCurl(\"editMessageText\", [\"chat_id\" => $user_id, \"message_id\" => $message_id, \"text\" => \"Choose\", \"reply_markup\" => json_encode([\n \"inline_keyboard\" =>[\n [\n [\"text\" => \"Farsi\", \"callback_data\" => \"chang3_T0_p3Rs1an\"], [\"text\" => \"English\", \"callback_data\" => \"chang3_T0_3nGl1sH\"]\n ],\n [\n [\"text\" => \"Return\", \"callback_data\" => \"R3tuRn\"]\n ]\n ]\n ])]);\n }\n elseif ($i == 1)\n {\n\n $result = mysqli_query($db, \"SELECT * FROM padporsc_bot4.users WHERE user_id = {$user_id}\");\n $row = mysqli_fetch_array($result);\n\n if($row['question_string'] == \"111111\")\n $b = 1;\n else\n $b = 0;\n if ($text == \"R3tuRn\")\n userMenu(1, $b);\n elseif ($text == \"chang3_T0_p3Rs1an\")\n {\n $locale = \"farsi\";\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET locale = 'farsi' WHERE user_id = {$user_id}\");\n\n userMenu(1, $b);\n }\n elseif ($text == \"chang3_T0_3nGl1sH\")\n {\n $locale = \"english\";\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET locale = 'english' WHERE user_id = {$user_id}\");\n\n userMenu(1, $b);\n }\n }\n\n}",
"public function change()\r\n\t{\r\n\t\t$ins = [];\r\n\t\t$plas = $this->fetchAll('SELECT * FROM tx_platby WHERE cislo IS NOT NULL');\r\n\r\n\t\t$ts = (new \\DateTime('2019-08-31 23:59:59'))->getTimestamp();\r\n\r\n\t\tforeach($plas as $p){\r\n\r\n\t\t\t$dt = new \\DateTime($p['vystaven']);\r\n\r\n\t\t\tif($dt->getTimestamp() <= $ts){\r\n\t\t\t\t$dk = 0.1736;\r\n\t\t\t}else{\r\n\t\t\t\t$dk = 0.17355371900826;\r\n\t\t\t}\r\n\r\n\t\t\t$ins[] = [\r\n\t\t\t\t'platba_id' => $p['platba_id'],\r\n\t\t\t\t'created' => $p['vystaven'],\r\n\t\t\t\t'cislo' => $p['cislo'],\r\n\t\t\t\t'platba' => $p['platba'],\r\n\t\t\t\t'dph_coef' => $dk,\r\n\t\t\t\t'den_zdan_pln' => $p['vystaven']\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->table('doklady')\r\n\t\t\t->insert($ins)\r\n\t\t\t->save();\r\n\t}",
"function before_edit_configuration() { }",
"public function modify(){\n //la route FormulaireModify\n }",
"function editar_estado(){\t\n\t\tif (isset($_GET['valor']) && $_GET['valor']!=\"\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$valor=$_GET['valor'];\n\t\t\t//echo \"Entro: \".$_GET['valor'];\n\t\t\t$sql=\"UPDATE producto SET aprobado_pro='$valor' WHERE id_pro='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t//if($valor==1)\n\t\t\t\t//$this->enviar_correos2($id);\n\t\t\theader(\"location:/admin/producto/\");\n\t\t}\n\t}",
"public function changeStatus()\n {\n }",
"public function onEdit($param)\n {\n try\n {\n if (isset($param['key']))\n {\n $key=$param['key'];\n TTransaction::open('microerp');\n\n\n $produto = new Produto($key);\n\n // $estoques = $produto->hasMany('Estoque', 'produto_id');\n\n $produto->urlImagem = \"https://srmenu.com.br/web-app/app/images/produtos/\". $produto->imagem_id;\n \n\n \n $this->form->setData($produto);\n TTransaction::close();\n }\n else\n {\n $this->onClear($param);\n }\n }\n catch (Exception $e)\n {\n if($e->getCode() ==23000){\n new TMessage('error', 'Já existe um produto com este codigo barras');\n }else{\n new TMessage('error', $e->getCode(). '-' . $e->getMessage()); // shows the exception error message\n }\n TTransaction::rollback();\n }\n }",
"static function changePhoto() {\n\t\t\n\t\t$case_intra = rcube_utils::get_input_value('photo_intra', RCUBE_INPUT_POST);\n\t\t$case_ader = rcube_utils::get_input_value('photo_ader', RCUBE_INPUT_POST);\n\n\t\t$info = array();\n\t\tif ( !empty($case_intra) && $case_intra == '1') {\n\t\t\t$info['mineqpublicationphotointranet'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotointranet'] = 0;\n\t\t}\n\t\t\n\t\tif ( !empty($case_ader) && $case_ader == '1' && !empty($case_intra) && $case_intra == '1')\n\t\t{\n\t\t\t$info['mineqpublicationphotoader'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotoader'] = 0;\n\t\t}\n\t\t\t\n\t\t$user_infos = melanie2::get_user_infos(Moncompte::get_current_user_name());\n\t\t\n\t\t$user_dn = $user_infos['dn'];\n\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\n\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_ok', 'melanie2_moncompte'), 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_nok', 'melanie2_moncompte') . $err, 'error');\n\t\t}\n\t\t\n\t}",
"function alterar($id_n3, $id_tema, $id_n2, $publicado, $n3_perfil, $ordem, $dbhw) {\n\tglobal $esquemaadmin;\n\t$dataCol = array(\n\t\t\t\"publicado\" => $publicado,\n\t\t\t\"id_tema\" => $id_tema,\n\t\t\t\"ordem\" => $ordem,\n\t\t\t\"n3_perfil\" => $n3_perfil\n\t);\n\t$resultado = i3GeoAdminUpdate($dbhw,\"i3geoadmin_n3\",$dataCol,\"WHERE id_n3 = $id_n3\");\n\tif ($resultado === false) {\n\t\treturn false;\n\t}\n\treturn $id_n3;\n}",
"public function change()\n {\n $changedId = \\Input::get('chgid');\n\n if ( count(explode(',', $changedId)) > 1 ) {\n if(Gate::allows('view', Resource::get('affiliate-id-*'))){\n Session::put('affiliate_id', '*');\n }\n } else {\n $affiliate = AffiliateService::find(AffiliateService::getHashKeyName(), $changedId);\n $affiliate = current($affiliate);\n $affiliateId = $affiliate['id'];\n if(Gate::allows('view', Resource::get('affiliate-id-' . $affiliateId))){\n Session::put('affiliate_id', $affiliateId);\n }\n }\n }",
"function change() {\n\t\t$this->prepareForDb();\n $query = \"UPDATE `\".sql_table('plug_miniforum_templates').\"` \".\n\t\t \t\t\t$this->prepareQuery().\n\t\t\t\t\t\" WHERE `template` = '{$this->idt}'\";\n\t\t\t\t\t\n sql_query($query);\n }",
"function eventclass_TambahPergerakan()\n\t{\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\n//\tonscreen events\n\n\n\t}",
"function loadChangePass()\n {\n $this->global['pageTitle'] = '修改密码';\n\n $this->loadViews(\"changePassword\", $this->global, NULL, NULL);\n }",
"public function modifiercontenu() {\n $idPage = $this->input->post('idPage');\n $contenu = ($this->input->post('contenu'));\n $this->admin_model->updatePage($contenu, $idPage, \"contenu\");\n }",
"public function edit()\n {\n }",
"public function edit()\n {\n }",
"public function edit()\n {\n }",
"public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }",
"public function modifiertitre() {\n $idPage = $this->input->post('idPage');\n $titre = ($this->input->post('titre'));\n $this->admin_model->updatePage($titre, $idPage, \"titre\");\n }",
"function ver_techo_ptto($id_p,$id_fg){\n $data['menu']=$this->menu(2);\n $data['proyecto'] = $this->model_proyecto->get_id_proyecto($id_p); ///// datos del proyecto\n if(count($data['proyecto'])!=0){\n $data['titulo_proy']=strtoupper($data['proyecto'][0]['tipo']);\n $data['fase'] = $this->model_faseetapa->get_id_fase($id_p); ///// datos fase encendida\n $data['techo']=$this->techo_update($id_p);\n $data['ffi'] = $this->model_faseetapa->fuentefinanciamiento(); ///// fuente financiamiento\n $data['fof'] = $this->model_faseetapa->organismofinanciador(); ///// organismo financiador\n\n $this->load->view('admin/programacion/proy_anual/fase/fase_edit_ptto', $data); \n }\n else{\n redirect('admin/dashboard');\n }\n }",
"function khoanick($UserID){\n //--- Neu chua dang nhap thi bat dang nhap\n if($this->session->userdata('permission')!=1){\n redirect(base_url());\n exit();\n }\n $data=$this->default_model->getInfoID($this->_table,array(\"userid\" => $UserID));\n $data['template']='admin/form_khoanick'; \n $TrangThai=$this->input->post(\"TrangThai\");\n //Neu dang nhap loi\n if($TrangThai==\"\")\n {\n }\n else\n {\n $cdata=array(\"TrangThai\" => $TrangThai, \"LoiNhan\" => $this->input->post(\"LoiNhan\"));\n $this->default_model->updateDuLieu($this->_table,$cdata,array(\"userid\" => $UserID));\n redirect(base_url().\"thanhvien/quanlythanhvien/1/g/\");\n exit(); \n }\n $this->load->view('admin/admin',$data); \n }",
"public function loadChangePass()\n {\n $this->global['pageTitle'] = 'Ubah Profil';\n $userId = $this->session->userdata('userId');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['jabatan'] = $this->user_model->getUserJabatanInfo();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $data['userInfo'] = $this->user_model->getUserInfoAll($userId);\n $this->load->view('includes/header', $this->global);\n $this->load->view('user/changePassword', $data);\n $this->load->view('includes/footer');\n }",
"public function edit()\n { \n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"function update_stav() {\n $title = \"Evidence zákazníků - Editace stavu zákazníka\";\n include_once(\"app/class/DBClass.php\");\n $myModel = new DBClass;\n //getting string of old state\n $data = $myModel->updateStateForm($_GET['id']);\n require_once(\"app/view.php\");\n}",
"public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }",
"function ModifierProfil($pseudonyme,$champ,$nvValeur){\r\n\t\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t\t$requete2 = \"UPDATE allinformations SET $champ='$nvValeur' WHERE Pseudo='$pseudonyme'\";\r\n\t\t\t$ligne2= mysqli_query($conn, $requete2);\r\n\t\t\tmysqli_close($conn);\r\n\t\t\treturn($nvValeur);\r\n\t\t}",
"public function modify();",
"public function testUpdateSuperfund()\n {\n }",
"public function modificarEstado(){\n\t\t$firephp = FirePHP::getInstance(True);\n\t\t$this->load->database();\n\t\t$this->load->model('Estado');\n\t\t//TODO Deshardcodear el idUsuario cuando se da cambia el estado (cuando este listo el manejo de sesions de usuarios).\n\t\t$idUsuario=1;\n\t\t$idBache=$_POST[\"idBache\"];\n\t\t$estado=$_POST[\"estadoBache\"];\n\t\t$firephp->log(\"idBache=\".$idBache.\";idUsuario=\".$idUsuario.\";estado=\".$estado);\n\t\t$this->Estado->cambiarEstado($idBache,$idUsuario,$estado);\n\t\t$firephp->log(\"Se cambio el estado del bache!\");\n\t}",
"public function edit()\n {\n \n }",
"function api_app_modify_function() {\n\n}",
"public function changeCompany()\r\n\t{\t\t\t\r\n\t\t$data = array('company_name' => $this->input->post('company_name'));\t\r\n\t\t\t\t//die('update');\r\n\t\t$where = array('id' => $this->session->userdata('emp_id'));\t\t\t\t\r\n\t\t$iStatus = $this->My_model->updateRecord('lang_company',$data,$where);\r\n\t\techo $iStatus;\t\t\r\n\t}",
"public function edit()\n {\n //\n }",
"public function accountChange(){\n\t\t\n\t\t// If user want to change his informations\n\t\tif(isset($_POST['account_save']))\n\t\t{\n\t\t\trequire 'Database.php';\n\t\t\t\n\t\t\t$order_id = $_REQUEST['order_id'];\n\t\t\tif($order_id!=\"\")\n\t\t\t{\n\t\t\t // Update database with his informations\n\t\t\t$req = $db->prepare(\"UPDATE orders SET lol_server = ?, lol_summoner = ?, lol_account = ?, lol_password = ? WHERE order_id = ?\");\n\t\t\t$req->execute(array($_POST['server'], $_POST['summonername'], $_POST['accountname'], $_POST['accountpassword'], $order_id));\n\t\t\t$_SESSION['account_information'] = 1;\n\t\t\t\n\t\t\t// Update current league, LP\n\t\t\t$update = new Member();\n\t\t\t$update->updateOrderLeague();\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\n\t\t\t// Update database with his informations\n\t\t\t$req = $db->prepare(\"UPDATE orders SET lol_server = ?, lol_summoner = ?, lol_account = ?, lol_password = ? WHERE user_id = ?\");\n\t\t\t$req->execute(array($_POST['server'], $_POST['summonername'], $_POST['accountname'], $_POST['accountpassword'], $_SESSION['id']));\n\t\t\t$_SESSION['account_information'] = 1;\n\t\t\t\n\t\t\t// Update current league, LP\n\t\t\t$update = new Member();\n\t\t\t$update->updateOrderLeague();\n\t\t\t}\necho \"<script>window.location='index.php'</script>\";\n\t\t\t//header('Location: index.php');\n\t\t}\n\n\t}",
"public function ChangeEditLanguage()\n {\n $editLanguageIso = $this->getInputFilterUtil()->getFilteredGetInput('editLanguageIsoCode');\n if (null === $editLanguageIso) {\n return;\n }\n /** @var BackendSessionInterface $backendSession */\n $backendSession = ServiceLocator::get('chameleon_system_cms_backend.backend_session');\n $backendSession->setCurrentEditLanguageIso6391($editLanguageIso);\n\n // we need to redirect to the current page to ensure the change from taking hold\n // now call page again... but without module_fnc\n $authenticityTokenId = AuthenticityTokenManagerInterface::TOKEN_ID;\n $parameterList = $this->global->GetUserData(null, [\n 'module_fnc',\n 'editLanguageID',\n '_noModuleFunction',\n '_fnc',\n $authenticityTokenId,\n ]);\n $url = PATH_CMS_CONTROLLER.$this->getUrlUtil()->getArrayAsUrl($parameterList, '?', '&');\n $this->getRedirect()->redirect($url);\n }",
"public function edit_data_biaya_kuliah(){\n\t\t$data['edit'] = $this->m_aka->edit_data_biaya_kuliah();\n\t\t$data['content'] = 'keuangan/edit_data_biaya_kuliah';\n\t\t$this->load->view('content',$data);\n\t}",
"function edit_pelanggan(){\n\t\t$id['kd_pelanggan'] = $this->input->post('kd_pelanggan');\n\t\t$data = array(\n\t\t\t'nm_pelanggan' => $this->input->post('nm_pelanggan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'email' => $this->input->post('email'),\n\t\t);\n\t\t$this->model_app->updateData('tbl_pelanggan',$data,$id);\n\t\tredirect('master_pelanggan');\n\t}",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"function _after_switch_theme(){\n\t// GET DESIGN FROM FUNCTION\n\t$core_admin_values = childtheme_designchanges();\n\t// SAVE VALUES\n\t//update_option('core_admin_values',$core_admin_values);\n\t\t\n}",
"function edit( $id = \"be1\") {\n\n\n\t\t// load user\n\t\t$this->data['backend'] = $this->Backend_config->get_one( $id );\n\n\t\t// call the parent edit logic\n\t\tparent::backendedit( $id );\n\t}",
"public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}"
] | [
"0.716005",
"0.70549923",
"0.66376096",
"0.6631112",
"0.66269696",
"0.6615301",
"0.64837277",
"0.63324845",
"0.63249177",
"0.61849093",
"0.61786366",
"0.61038697",
"0.6084519",
"0.60754144",
"0.603023",
"0.6029506",
"0.60290545",
"0.6023275",
"0.60228795",
"0.6020307",
"0.6015888",
"0.6011467",
"0.60043204",
"0.59805804",
"0.5944834",
"0.5941326",
"0.5932986",
"0.5932986",
"0.5932571",
"0.5932571",
"0.59111404",
"0.59077287",
"0.59054273",
"0.58951443",
"0.5884761",
"0.5875328",
"0.58730423",
"0.586702",
"0.58504564",
"0.58463764",
"0.5841969",
"0.5840331",
"0.5835912",
"0.583555",
"0.5827532",
"0.5813044",
"0.58063084",
"0.5804409",
"0.58030117",
"0.58017844",
"0.57958347",
"0.5793735",
"0.5788859",
"0.57863486",
"0.57766575",
"0.5776394",
"0.57721615",
"0.5770645",
"0.57694167",
"0.5767731",
"0.5767386",
"0.5767386",
"0.5767386",
"0.57635057",
"0.5760367",
"0.5757271",
"0.57494295",
"0.574147",
"0.57408273",
"0.5739855",
"0.5739855",
"0.5739855",
"0.57369626",
"0.57330114",
"0.5727487",
"0.57241046",
"0.5723817",
"0.5723356",
"0.57216036",
"0.5716841",
"0.5713658",
"0.57015413",
"0.56992465",
"0.56988406",
"0.5698593",
"0.56967056",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.56960624",
"0.5693361",
"0.5688899",
"0.5688082"
] | 0.0 | -1 |
Add site home link if is paged front page | public function home()
{
$this->crumbs[] = new Crumb(__('Lolita Framework', 'lolita'), home_url('/'));
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function set_home_page() {\n\t$homepage = get_page_by_title('Home');\n\t\n\tif ($homepage) {\n\t\tupdate_option('page_on_front', $homepage->ID);\n\t\tupdate_option('show_on_front', 'page');\n\t}\n}",
"function get_home_front_page_url() {\r\n\r\n\t$front_page_ID = get_option( 'page_on_front' );\r\n\t$front_page_template = get_post_meta( $front_page_ID, '_wp_page_template', true );\r\n\tif ( $front_page_template === 'template-home.php' ) { // If front page uses Home template\r\n\t\treturn get_permalink( $front_page_ID ); // retrun url of front page\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n\r\n}",
"function wpseo_disable_rel_next_home( $link ) {\n if ( is_front_page() ) {\n return false;\n }\n}",
"public function is_home_static_page() {\n return ( is_front_page() && 'page' == get_option( 'show_on_front' ) && is_page( get_option( 'page_on_front' ) ) );\n }",
"public function isHomePage() {\n return $this->uri === $this->kirby->options['home'];\n }",
"public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }",
"public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }",
"function _polylang_fix_home_url( $url, $id ) {\n\treturn \\the_seo_framework()->is_front_page_by_ID( $id ) && \\get_option( 'permalink_structure' ) ? \\trailingslashit( $url ) : $url;\n}",
"function home_url($taal = null)\n{\n if (IS_MEERTALIG) :\n return pll_home_url($taal);\n else :\n return get_site_url();\n endif;\n}",
"function adelle_theme_home_page_menu( $args ) {\r\n $args['show_home'] = true;\r\n return $args;\r\n }",
"public function for_home_page() {\n\t\t$front_page_id = \\get_option( 'page_on_front' );\n\t\tif ( \\get_option( 'show_on_front' ) === 'page' && $front_page_id !== 0 ) {\n\t\t\t$indexable = $this->repository->find_by_id_and_type( $front_page_id, 'post' );\n\n\t\t\tif ( ! $indexable ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Static_Home_Page' ) );\n\t\t}\n\n\t\t$indexable = $this->repository->find_for_home_page();\n\n\t\tif ( ! $indexable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Home_Page' ) );\n\t}",
"function pmpromh_template_redirect_homepage() {\r\n\tglobal $current_user;\r\n\t//is there a user to check?\r\n\tif(!empty($current_user->ID) && is_front_page()) {\r\n\t\t$member_homepage_id = pmpromh_getHomepageForLevel();\r\n\t\tif(!empty($member_homepage_id) && !is_page($member_homepage_id)) {\r\n\t\t\twp_redirect(get_permalink($member_homepage_id));\r\n\t\t\texit;\r\n\t\t}\r\n\t}\r\n}",
"function create_home_page() {\n if(get_page_by_title('Home')) {\n }\n else {\n global $wpdb;\n // First Page\n $first_page = get_site_option( 'first_page');\n $first_post_guid = get_option('home') . '/?page_id=1';\n $wpdb->insert( $wpdb->posts, array(\n 'post_content' => '',\n 'post_excerpt' => '',\n 'post_title' => __( 'Home' ),\n /* translators: Default page slug */\n 'post_name' => __( 'home' ),\n 'guid' => $first_post_guid,\n 'post_type' => 'page',\n 'to_ping' => '',\n 'pinged' => '',\n 'comment_status' => 'closed',\n 'post_content_filtered' => ''\n ));\n\n $wpdb->insert( $wpdb->postmeta, array( 'post_id' => 1, 'meta_key' => '_wp_page_template', 'meta_value' => 'default' ) );\n\n }\n }",
"function tc_is_home() {\r\n \r\n //get info whether the front page is a list of last posts or a page\r\n return ( (is_home() && ( 'posts' == get_option( 'show_on_front' ) || 'nothing' == get_option( 'show_on_front' ) ) ) || is_front_page() ) ? true : false;\r\n }",
"public function home_link() {\n global $CFG, $SITE;\n\n if ($this->page->pagetype == 'site-index') {\n // Special case for site home page - please do not remove\n return '<div class=\"sitelink\">' .\n '<a title=\"Moodle\" href=\"http://moodle.org/\">' .\n '<img style=\"width:100px;height:30px\" src=\"' . $this->pix_url('moodlelogo') . '\" alt=\"moodlelogo\" /></a></div>';\n\n } else if (!empty($CFG->target_release) && $CFG->target_release != $CFG->release) {\n // Special case for during install/upgrade.\n return '<div class=\"sitelink\">'.\n '<a title=\"Moodle\" href=\"http://docs.moodle.org/en/Administrator_documentation\" onclick=\"this.target=\\'_blank\\'\">' .\n '<img style=\"width:100px;height:30px\" src=\"' . $this->pix_url('moodlelogo') . '\" alt=\"moodlelogo\" /></a></div>';\n\n } else if ($this->page->course->id == $SITE->id || strpos($this->page->pagetype, 'course-view') === 0) {\n return '<div class=\"homelink\"><a class=\"btn btn-small\" href=\"' . $CFG->wwwroot . '/\"><i class=\"icon-home\"></i> ' .\n get_string('home') . '</a></div>';\n\n } else {\n return '<div class=\"homelink\"><a class=\"btn btn-small\" href=\"' . $CFG->wwwroot . '/course/view.php?id=' . $this->page->course->id . '\"><i class=\"icon-home\"></i> ' .\n format_string($this->page->course->shortname, true, array('context' => $this->page->context)) . '</a></div>';\n }\n }",
"function set_front_page() {\n $about = get_page_by_title( 'Home' );\n update_option( 'page_on_front', $about->ID );\n update_option( 'show_on_front', 'page' );\n }",
"function custom_theme_is_static_front_page()\n{\n return (is_front_page() && ! is_home());\n}",
"function cah_news_get_news_page_link() {\r\n $page = get_option('cah_news_set_news_page', 'news'); \r\n $url = get_home_url(null, $page); \r\n return $url; \r\n}",
"public function is_home()\n {\n }",
"public function isHomePage()\n\t{\n\t\treturn $this->home_page;\n\t}",
"function ts_theme_page_menu_args( $args ) {\r\n $args['show_home'] = true;\r\n return $args;\r\n}",
"function at_remove_dup_canonical_link() {\t\n\tif ( is_home() ) {\n return false;\n }\t\t\n}",
"function getHomepage($content, $conf) {\n\n\t\tif ($conf['pageid'] > '') {\n\t\t\t$pageid = $conf['pageid'];\n\t\t} else {\n\t\t\t$pageid = $GLOBALS['TSFE']->id;\n\t\t}\n\t\treturn str_replace(\"http://\", \"\", t3lib_div::getIndpEnv(TYPO3_SITE_URL).parent::pi_getPageLink($pageid));\n\t}",
"public function getIsHomepage()\n {\n return $this->isHomepage;\n }",
"public function getHomePage() : string {\n return $this->configVars['site']['home-page'];\n }",
"public function is_home();",
"public function getHomepageUrl()\n {\n $homepage = Mage::getModel('mzeis_documentation/page');\n $homepage->setName(Mage::helper('mzeis_documentation')->getHomepageName());\n return Mage::helper('mzeis_documentation/page')->getViewUrl($homepage);\n }",
"function get_homeurl() {\n return '/hospital-system';\n}",
"private function get_home_url() {\n $home_url = home_url();\n $schemes = apply_filters( 'yith_wcbk_google_calendar_home_url_schemes', array( 'https://', 'http://', 'www.' ) );\n\n foreach ( $schemes as $scheme ) {\n $home_url = str_replace( $scheme, '', $home_url );\n }\n\n if ( strpos( $home_url, '?' ) !== false ) {\n list( $base, $query ) = explode( '?', $home_url, 2 );\n $home_url = $base;\n }\n\n return apply_filters( 'yith_wcbk_google_calendar_get_home_url', $home_url );\n }",
"public function fixHomeRedirect(){\n\n \t$check = $this->modx->getObject('modContextSetting',[\n 'key'=>'base_url',\n 'value:LIKE'=>'%'.$_GET[$this->modx->getOption('request_param_alias')].'%'\n ]);\n \n if($check){ //if new route is valid\n\n $siteStart = $this->modx->getObject('modContextSetting',[\n 'key' => 'site_start',\n 'context_key' => $check->get('context_key')\n ]);\n \n \n if($this->modx->getObject('modResource',$siteStart->get('value'))->get('published') == 1) \n $this->modx->sendRedirect($this->modx->makeUrl($siteStart->get('value')),['responseCode' => 'HTTP/1.1 301 Moved Permanently']);\n }\n }",
"function create_custom_pages() {\n $custom_pages = array(\n 'home' => 'Home',\n );\n foreach($custom_pages as $page_name => $page_title) {\n $page = get_page_by_path($page_name);\n if( empty($page) ) {\n wp_insert_post( array(\n 'post_type' => 'page',\n 'post_title' => $page_title,\n 'post_name' => $page_name,\n 'post_status' => 'publish'\n ));\n }\n }\n\n // Set static Homepage\n $home = get_page_by_path('home');\n update_option( 'page_on_front', $home->ID );\n update_option( 'show_on_front', 'page' );\n}",
"public function getHomepage()\n {\n if (array_key_exists(\"homepage\", $this->_propDict)) {\n return $this->_propDict[\"homepage\"];\n } else {\n return null;\n }\n }",
"function home_page_menu_args( $args ) {\r\n$args['show_home'] = true;\r\nreturn $args;\r\n}",
"public function homepage($url) {\n\t\t\t$out = $url;\n\t\t\tif (is_string($url)) {\n\t\t\t\tif (substr($url, 0, 4) == 'www.') {\n\t\t\t\t\t$url = 'http://' . $url;\n\t\t\t\t}\n\t\t\t\tif (substr($url, 0, 4) == 'http') {\n\t\t\t\t\t$out = $this->Html->link(\n\t\t\t\t\t\t'<i class=\"fa fa-home fa-lg\"></i>',\n\t\t\t\t\t\t$url,\n\t\t\t\t\t\tarray('escape' => false));\n\t\t\t\t} else {\n\t\t\t\t\t$out = h($url);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $out;\n\t\t}",
"function front_end_home () {\n $request_url = parse_url($_SERVER['HTTP_REFERER']);\n return str_replace($request_url['path'], '', $_SERVER['HTTP_REFERER']);\n}",
"function get_landing_page_url()\n{\n $landing_page = \\Podlove\\get_setting('website', 'landing_page');\n\n switch ($landing_page) {\n case 'homepage':\n return home_url();\n\n break;\n case 'archive':\n if ('on' == \\Podlove\\get_setting('website', 'episode_archive')) {\n $archive_slug = trim(\\Podlove\\get_setting('website', 'episode_archive_slug'), '/');\n\n $blog_prefix = \\Podlove\\get_blog_prefix();\n $blog_prefix = $blog_prefix ? trim($blog_prefix, '/').'/' : '';\n\n return trailingslashit(get_option('home').$blog_prefix).$archive_slug;\n }\n\n break;\n\n default:\n if (is_numeric($landing_page)) {\n if ($link = get_permalink($landing_page)) {\n return $link;\n }\n }\n\n break;\n }\n\n // always default to home page\n return home_url();\n}",
"function home_page_menu_args( $args ) {\n\n$args['show_home'] = true;\n\nreturn $args;\n\n}",
"function cmsmasters_page_menu_args($args) {\n $args['show_home'] = true;\n \n return $args;\n}",
"function link_to_home_page($text = null, $props = array())\n{\n if (!$text) {\n $text = option('site_title');\n }\n return '<a href=\"' . html_escape(WEB_ROOT) . '\" '. tag_attributes($props) . '>' . $text . \"</a>\\n\";\n}",
"function labs_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}",
"public function is_front_page()\n {\n }",
"function get_self_link() {\n\t\t$host = @parse_url( home_url() );\n\t\treturn set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) );\n\t}",
"function twentyten_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}",
"public function go_home(){\n\t wp_redirect( home_url() );\n\t exit();\n\t}",
"public function getHomePage()\n {\n return $this->homePage;\n }",
"function crf_get_blog_url() {\n\tif( get_option( 'show_on_front' ) == 'page' ) {\n\t\treturn get_permalink( get_option( 'page_for_posts' ) );\n\t} else {\n\t\treturn esc_url( home_url() );\n\t}\n}",
"public function wordpress_default_header(){\n\t\tif(is_home() && $this->_template_builder->get_specific_option('carousel_global')){\r\n\t\t\tif(!$this->_template_builder->get_specific_option('jumbotron')){\r\n\t\t\t\t$this->_build_header();\r\n\t\t\t}else{\r\n\t\t\t\t$this->_template_builder->render_view('jumbotron');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($this->_template_builder->get_specific_option('socialbar')){\r\n\t\t\t\t$this->_template_builder->render_view('socialbar');\t\r\n\t\t\t}\r\n\t\t}\n\t}",
"function get_home_url($blog_id = \\null, $path = '', $scheme = \\null)\n {\n }",
"public function getFrontPageUrl();",
"function rusticmodern_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}",
"private function isHome(): bool\n {\n if (! $this->context->get('is_entry')) {\n return false;\n }\n\n if (! $this->context->get('page')) {\n return false;\n }\n\n return $this->context->get('parent') === null;\n }",
"function _config_wp_home($url = '')\n {\n }",
"function twentyten_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) ) {\n\t\t$args['show_home'] = true;\n\t}\n\treturn $args;\n}",
"function shIsCurrentPageHome()\n{\n\t$currentPage = Sh404sefHelperUrl::sortUrl(\n\t\tShlSystem_Strings::pr('/(&|\\?)lang=[a-zA-Z]{2,3}/iu', '', empty($_SERVER['QUERY_STRING']) ? '' : $_SERVER['QUERY_STRING'])); // V 1.2.4.t\n\t$currentPage = JString::ltrim(str_replace('index.php', '', $currentPage), '/');\n\t$currentPage = JString::ltrim($currentPage, '?');\n\t$shHomePage = ShlSystem_Strings::pr('/(&|\\?)lang=[a-zA-Z]{2,3}/iu', '', Sh404sefFactory::getPageInfo()->homeLink);\n\t$shHomePage = JString::ltrim(str_replace('index.php', '', $shHomePage), '/');\n\t$shHomePage = JString::ltrim($shHomePage, '?');\n\treturn $currentPage == $shHomePage;\n}",
"function emc_page_menu_args( $args ) {\r\n\t$args['show_home'] = true;\r\n\treturn $args;\r\n}",
"function home_page_menu_args( $args ) {\n $args['show_home'] = true;\n return $args;\n }",
"function baw_hack_wp_title_for_home( $title )\n\t\t{\n\t\t if( empty( $title ) && ( is_home() || is_front_page() ) ) {\n\t\t\treturn __( 'Home', 'theme_domain' ) . ' | ' . get_bloginfo( 'name' );\n\t\t }\n\t\t return $title;\n\t\t}",
"function tc_is_home_empty() {\r\n //check if the users has choosen the \"no posts or page\" option for home page\r\n return ( (is_home() || is_front_page() ) && 'nothing' == get_option( 'show_on_front' ) ) ? true : false;\r\n }",
"public function getHomeUrl()\n {\n return $this->homeUrl;\n }",
"function twentytwelve_page_menu_args($args) {\n if (!isset($args['show_home']))\n $args['show_home'] = true;\n return $args;\n}",
"public function getHomepage() {\n\t\treturn $this->homepage;\n\t}",
"public function getHomepage()\n {\n return $this->_homepage;\n }",
"function rw_page_menu_args( $args )\n{\n $args['show_home'] = true;\n return $args;\n}",
"public function getShowHomePage()\n {\n include(__DIR__.\"/../../001_pages/000_Site_Pages/home.php\"); \n }",
"public function is_posts_page() {\n return ( is_home() && 'page' == get_option( 'show_on_front' ) );\n }",
"function one_home($query) {\n\tif ( $query->is_front_page()) {\n\t\t$query-> set('showposts','10');\n\t\t}\n\t\treturn $query;\n\t}",
"public function getHomeUrl()\n {\n return url('');\n }",
"function wpdocs_hack_wp_title_for_home( $title )\n{\n if ( empty( $title ) && ( is_home() || is_front_page() ) ) {\n $title = __( '', 'textdomain' ) . '' . get_bloginfo( 'description' );\n }\n return $title;\n}",
"function is_home()\n{\n $CI =& get_instance();\n return (!$CI->uri->segment(1))? TRUE: FALSE;\n}",
"protected function set_home_url( $language ) {\n\t\t$home_url = $this->home_url( $language );\n\t\t$language->set_home_url( $home_url, $home_url ); // Search url and home url are the same\n\t}",
"public function getHomeUrl()\n {\n return $this->url;\n }",
"function twentytwelve_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}",
"function news_link() {\n global $wp;\n $current_url = home_url(add_query_arg(array(),$wp->request));\n if (stripos($current_url, 'th') !== false) {\n $page = get_page_by_path('news-events-th');\n } else {\n $page = get_page_by_path('news-events');\n }\n the_permalink($page);\n}",
"public static function goToHome(){\n $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';\n $host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n header(\"Location: $protocol$host$uri\");\n \n die();\n }",
"function wpak_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}",
"function twentytwelve_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) ) {\n\t\t$args['show_home'] = true;\n\t}\n\treturn $args;\n}",
"function custom_page_home() {\n\tif(isset($_GET['post']))\n\t\t$post_id = $_GET['post'];\n\telse if(isset($_POST['post_ID']))\n\t\t$post_id = $_POST['post_ID'];\n\n\tif(!isset($post_id) || empty($post_id))\n\t\treturn;\n\n\t// Get the name of the Page Template file.\n\t$template_file = get_post_meta($post_id, '_wp_page_template', true);\n\n\t// Do something for the template\n\tif($template_file == \"home\") {\n\t\tremove_post_type_support('page','author');\n\t\tremove_post_type_support('page','custom-fields');\n\t\tremove_post_type_support('page','comments');\n\t\tremove_post_type_support('page','excerpt' );\n\t\tremove_post_type_support('page','trackbacks');\n\t\tremove_post_type_support('page','revisions');\n\t}\n}",
"function set_homepage() {\n\tif($_SESSION['cgfirst']!=\"\"){\n\t\t$cgfirst=$_SESSION['cgfirst'];\n\t\t$cglast=$_SESSION['cglast'];\n\t\t$home = \"caregiverhome_v2.php\";\n\t}else{\n\t\t$cgfirst=$_SESSION['adminfirst'];\n\t\t$cglast=$_SESSION['adminlast'];\n\t\t$home = \"adminhome.php\";\n\t}\n}",
"function shIsHomepage($string)\n{\n\n\tstatic $pages = array();\n\tstatic $home = '';\n\n\tif (!isset($pages[$string]))\n\t{\n\t\t$pageInfo = &Sh404sefFactory::getPageInfo();\n\t\tif (empty($home) && !empty($pageInfo->homeLink))\n\t\t{\n\t\t\t$home = Sh404sefHelperUrl::sortUrl(shCleanUpPag($pageInfo->homeLink));\n\t\t}\n\n\t\t$shTempString = JString::rtrim(str_replace($pageInfo->getDefaultFrontLiveSite(), '', $string), '/');\n\t\t$pages[$string] = Sh404sefHelperUrl::sortUrl(shCleanUpPag($shTempString)) == $home; // version t added sorting\n\t}\n\treturn $pages[$string];\n}",
"public function setHomepage($val)\n {\n $this->_propDict[\"homepage\"] = $val;\n return $this;\n }",
"function twentytwelve_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}",
"function twentytwelve_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}",
"function link_to_admin_home_page($text = null, $props = array())\n{\n if (!$text) {\n $text = option('site_title');\n }\n return '<a href=\"' . html_escape(admin_url('')) . '\" ' . tag_attributes($props)\n . '>' . $text . \"</a>\\n\";\n}",
"function thesaas_front_page_template( $template ) {\n\treturn is_home() ? '' : $template;\n}",
"function ourheaderurl()\n{\n return esc_url(site_url('/'));\n}",
"function darksnow_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}",
"public function Home()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'home');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Home')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/homepage');\n }",
"protected function goHomePage()\n {\n $this->_redirect($this->homeURL);\n }",
"function elytra_front_page_template( $template ) {\n\treturn is_home() ? '' : $template;\n}",
"function twentyseventeen_front_page_template( $template ) {\n\treturn is_home() ? '' : $template;\n}",
"function put_my_url(){\n\treturn (get_home_url());\n}",
"public function get_post_page_url() {\n\t\tif ( 'page' == get_option( 'show_on_front' ) ) {\n\t\t\treturn get_permalink( get_option( 'page_for_posts' ) );\n\t\t}\n\n\t\treturn home_url();\n\t}",
"protected function getHomeUrl()\n\t{\n\t\t$enableHomeLink = value($this->config->get('c::enable-home-link', false));\n\n\t\tif ($enableHomeLink) {\n\t\t\t$url = $this->config->get('c::redirect-login', '/');\n\t\t\treturn $this->url->to($url);\n\t\t}\n\n\t\treturn null;\n\t}",
"function homeURL() {\n return 'mist.ac.bd';\n }",
"public function goHome()\n {\n $this->redirect(url($this->getHomeUrl()));\n }",
"function do_pages_exist() {\n // Home\n if ( get_page_by_title( 'Home' ) == NULL ) create_page( 'Home' );\n}",
"public function getHomepage()\n {\n // Look for value only if not already set\n if(!isset($this->homepage)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->homepage = $user['homepage'];\n }\n return $this->homepage;\n }",
"function flatsome_custom_blog_header(){\n\tif(flatsome_option('blog_header') && is_home()){\n\t\techo '<div class=\"blog-header-wrapper\">'.do_shortcode(flatsome_option('blog_header')).'</div>';\n\t}\n}",
"public function userHome() {\n\n $this->page->getPage('userhome.tpl');\n }",
"function minorite_menu_link__home(array $variables) {\n $element = $variables['element'];\n\n $output = l('<span>' . $element['#title'] . '</span>', $element['#href'], array('html' => TRUE));\n return '<li>' . $output . \"</li>\\n\";\n}",
"function go_home(){\n\twp_redirect( home_url() );\n\texit();\n}"
] | [
"0.74679",
"0.72521544",
"0.718665",
"0.7170717",
"0.7132407",
"0.7055061",
"0.7055061",
"0.70484984",
"0.7030411",
"0.70114356",
"0.6989651",
"0.6935988",
"0.68859154",
"0.6840831",
"0.6817002",
"0.6798628",
"0.6783522",
"0.67781717",
"0.67521757",
"0.6731354",
"0.6731245",
"0.6689837",
"0.66464174",
"0.664181",
"0.661376",
"0.6605611",
"0.6578258",
"0.6547073",
"0.653082",
"0.6529258",
"0.6490771",
"0.6473192",
"0.6463694",
"0.6458249",
"0.6451917",
"0.64501727",
"0.64289486",
"0.6424775",
"0.64028084",
"0.6400866",
"0.6385812",
"0.6381036",
"0.6364117",
"0.6355957",
"0.63558125",
"0.6353187",
"0.6351456",
"0.6345518",
"0.63426673",
"0.63422364",
"0.63420373",
"0.63376236",
"0.6336398",
"0.63221794",
"0.631096",
"0.6308884",
"0.63075316",
"0.63074845",
"0.6301514",
"0.6286098",
"0.62781173",
"0.62641466",
"0.62389064",
"0.62375593",
"0.62304485",
"0.62192404",
"0.6217632",
"0.620176",
"0.6199965",
"0.61972326",
"0.61967355",
"0.61863714",
"0.61740977",
"0.6174043",
"0.61621386",
"0.6149946",
"0.61465776",
"0.614433",
"0.61387527",
"0.6131748",
"0.61235166",
"0.61235166",
"0.6116592",
"0.61068505",
"0.61054814",
"0.60906523",
"0.6088447",
"0.6084667",
"0.60609794",
"0.60497695",
"0.604864",
"0.6046769",
"0.60402954",
"0.6033355",
"0.60261786",
"0.601689",
"0.60122555",
"0.6001304",
"0.5996307",
"0.5990663",
"0.59680253"
] | 0.0 | -1 |
Add post parents link to breadcrumbs items | public function postParents($post_id)
{
$ancestors = get_post_ancestors($post_id);
if (count($ancestors)) {
foreach ($ancestors as $id) {
$this->crumbs[] = new Crumb(get_the_title($id), get_permalink($id));
}
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Steps_prepare_parent_breadcrumbs($Step) {\n\tif ($Step && $Step->parent_guid) {\n\t\t$parents = array();\n\t\t$parent = get_entity($Step->parent_guid);\n\t\twhile ($parent) {\n\t\t\tarray_push($parents, $parent);\n\t\t\t$parent = get_entity($parent->parent_guid);\n\t\t}\n\t\twhile ($parents) {\n\t\t\t$parent = array_pop($parents);\n\t\t\telgg_push_breadcrumb($parent->title, $parent->getURL());\n\t\t}\n\t}\n}",
"function trail_parents( $post_id ) {\n\t\t$parent_trail = array();\n\t\t$parents = array();\n\n\t\t// Verify we have something to work with \n\t\tif ( empty( $post_id ) ) return $parent_trail;\n\t\t\n\t\t// Loop through post IDs until we run out of parents \n\t\twhile ( $post_id ) {\n\t\t\t$page \t\t= get_page( $post_id );\n\t\t\t$parents[] = '<a href=\"' . get_permalink( $post_id ) . '\" title=\"' . esc_attr( get_the_title( $post_id ) ) . '\">' . get_the_title( $post_id ) . '</a>';\n\t\t\t\n\t\t\t// Load the grandparent page if there is one \n\t\t\t$post_id\t = $page->post_parent;\n\t\t}\n\t\n\t\t// If parents were found, reverse their order\n\t\tif ( !empty( $parents ) ) \n\t\t\t$parent_trail = array_reverse( $parents );\n\t\t\t\n\t\t// Return the trail\n\t\treturn $parent_trail;\n\t}",
"function issues_prepare_parent_breadcrumbs($issue) {\n\tif ($issue && $issue->parent_guid) {\n\t\t$parents = array();\n\t\t$parent = get_entity($issue->parent_guid);\n\t\twhile ($parent) {\n\t\t\tarray_push($parents, $parent);\n\t\t\t$parent = get_entity($parent->parent_guid);\n\t\t}\n\t\twhile ($parents) {\n\t\t\t$parent = array_pop($parents);\n\t\t\telgg_push_breadcrumb($parent->title, $parent->getURL());\n\t\t}\n\t}\n}",
"function _get_breadcrumbs($starting_page, $container = array())\n{\n\n //make sure you're working with an object\n $sp = (!is_object($starting_page)) ? get_post($starting_page) : $starting_page;\n\n //make sure to insert starting page only once\n if (!in_array(get_permalink($sp->ID), $container)) {\n $container[get_permalink($sp->ID)] = get_the_title($sp->ID);\n }\n\n //if parent, recursion!\n if ($sp->post_parent > 0) {\n $container[get_permalink($sp->post_parent)] = get_the_title($sp->post_parent);\n $container = _get_breadcrumbs($sp->post_parent, $container);\n }\n\n return $container;\n}",
"function breadcrumbs(){\n global $post;\n $seperator = \"/\";\n $home = \"Home\";\n \n echo \"<ul class='breadcrumbs'>\";\n echo \"<li>You are here: </li>\";\n \n if(is_front_page()){\n echo \"<li>\" . $home . \"</li>\";\n }else{\n echo \"<li><a href=\" . get_site_url() . \">\" . $home . \"</a></li>\";\n }\n \n if(is_home() || is_single()){\n echo \"<li>\" . $seperator . \"</li>\";\n if(is_home()){\n echo \"<li>Recipe</li>\";\n }else {\n echo \"<li><a href=\" . get_post_type_archive_link('post') . \">Shop</a></li>\";\n echo \"<li>\" . $seperator . \"</li>\";\n echo \"<li>\" . $post->post_title . \"</li>\";\n }\n }\n \n if(is_page() && !is_front_page()){\n echo \"<li>\" . $seperator . \"</li>\";\n if(!empty($post->post_parent)){\n echo \"<li>\";\n echo \"<a href=\" . get_permalink($post->post_parent). \">\";\n echo get_the_title($post->post_parent);\n echo \"</a></li>\";\n echo \"<li>\" . $seperator . \"</li>\";\n }\n echo \"<li>\" . $post->post_title . \"</li>\";\n }\n \n echo \"</ul>\";\n }",
"function get_parent_post_rel_link($title = '%title')\n {\n }",
"function _get_post_ancestors(&$post)\n {\n }",
"function ss_breadcrumbs() {\r\n\tglobal $post;\r\n\r\n\t$blog_page_title = get_the_title( get_queried_object_id() );\r\n\r\n\techo '<ul class=\"theme-breadcrumbs\">';\r\n\r\n\tif ( !is_front_page() ) {\r\n\t\techo '<li><a href=\"';\r\n\t\techo home_url();\r\n\t\techo '\">'.__( 'Home', 'spnoy' );\r\n\t\techo \"</a></li>\";\r\n\t}\r\n\r\n\t$params['link_none'] = '';\r\n\t$separator = '';\r\n\r\n\tif ( is_category() && !is_singular( 'portfolio' ) ) {\r\n\t\t$category = get_the_category();\r\n\t\t$ID = $category[0]->cat_ID;\r\n\t\techo is_wp_error( $cat_parents = get_category_parents( $ID, TRUE, '', FALSE ) ) ? '' : '<li>'.$cat_parents.'</li>';\r\n\t}\r\n\r\n\tif ( is_singular( 'portfolio' ) ) {\r\n\t\techo get_the_term_list( $post->ID, 'portfolio-category', '<li>', ' / ', '</li>' );\r\n\t\techo '<li>'.get_the_title().'</li>';\r\n\t}\r\n\r\n\tif ( is_tax( 'portfolio-category' ) ) {\r\n\t\techo '<li>'.get_query_var( 'portfolio-category' ).'</li>';\r\n\t}\r\n\r\n\tif ( is_home() ) { echo '<li>'.$blog_page_title.'</li>'; }\r\n\tif ( is_page() && !is_front_page() ) {\r\n\t\t$parents = array();\r\n\t\t$parent_id = $post->post_parent;\r\n\t\twhile ( $parent_id ) :\r\n\t\t\t$page = get_page( $parent_id );\r\n\t\tif ( $params[\"link_none\"] )\r\n\t\t\t$parents[] = get_the_title( $page->ID );\r\n\t\telse\r\n\t\t\t$parents[] = '<li><a href=\"' . get_permalink( $page->ID ) . '\" title=\"' . get_the_title( $page->ID ) . '\">' . get_the_title( $page->ID ) . '</a></li>' . $separator;\r\n\t\t$parent_id = $page->post_parent;\r\n\t\tendwhile;\r\n\t\t$parents = array_reverse( $parents );\r\n\t\techo join( ' ', $parents );\r\n\t\techo '<li>'.get_the_title().'</li>';\r\n\t}\r\n\tif ( is_single() && !is_singular( 'portfolio' ) ) {\r\n\t\t$categories_1 = get_the_category( $post->ID );\r\n\t\tif ( $categories_1 ):\r\n\t\t\tforeach ( $categories_1 as $cat_1 ):\r\n\t\t\t\t$cat_1_ids[] = $cat_1->term_id;\r\n\t\t\tendforeach;\r\n\t\t$cat_1_line = implode( ',', $cat_1_ids );\r\n\t\tendif;\r\n\t\t$categories = get_categories( array(\r\n\t\t\t\t'include' => $cat_1_line,\r\n\t\t\t\t'orderby' => 'id'\r\n\t\t\t) );\r\n\t\tif ( $categories ) :\r\n\t\t\tforeach ( $categories as $cat ) :\r\n\t\t\t\t$cats[] = '<li><a href=\"' . get_category_link( $cat->term_id ) . '\" title=\"' . $cat->name . '\">' . $cat->name . '</a></li>';\r\n\t\t\tendforeach;\r\n\t\techo join( ' ', $cats );\r\n\t\tendif;\r\n\t\techo '<li>'.get_the_title().'</li>';\r\n\t}\r\n\tif ( is_tag() ) { echo '<li>'.\"Tag: \".single_tag_title( '', FALSE ).'</li>'; }\r\n\tif ( is_404() ) { echo '<li>'.__( \"404 - Page not Found\", 'spnoy' ).'</li>'; }\r\n\tif ( is_search() ) { echo '<li>'.__( \"Search\", 'spnoy' ).'</li>'; }\r\n\tif ( is_year() ) { echo '<li>'.get_the_time( get_option( 'date_format' ) ).'</li>'; }\r\n\tif ( is_month() ) { echo '<li>'.get_the_time( get_option( 'date_format' ) ).'</li>'; }\r\n\tif ( is_day() ) { echo '<li>'.get_the_time( get_option( 'date_format' ) ).'</li>'; }\r\n\r\n\techo \"</ul>\";\r\n}",
"function get_post_ancestors($post)\n {\n }",
"function column_parent( $item ) {\r\n\t\tif ( $item->post_parent ){\r\n\t\t\tif ( isset( $item->parent_title ) ) {\r\n\t\t\t\t$parent_title = $item->parent_title;\r\n\t\t\t} else {\r\n\t\t\t\t$parent_title = __( '(no title: bad ID)', 'media-library-assistant' );\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' ' . __( 'Parent ID', 'media-library-assistant' ) . '\">%2$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'parent' => $item->post_parent,\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'Parent', 'media-library-assistant' ) . ': ' . $parent_title ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), (string) $item->post_parent );\r\n\t\t} else {\r\n\t\t\treturn (string) $item->post_parent;\r\n\t\t}\r\n\t}",
"function frg_list_pages_with_intro( $args ) {\n\n global $post;\n\n if ( $post->post_parent ) {\n $grandfather = array_reverse( get_post_ancestors( $post->ID ) )[0];\n $is_current_page_item = false;\n } else {\n $grandfather = $post->ID;\n $is_current_page_item = true;\n }\n\n ?><li class=\"page_item page-item-<?php echo $grandfather; ?><?php if ($is_current_page_item) echo \" current_page_item\"; ?>\">\n <a href=\"<?php echo the_permalink($grandfather); ?>\"><?php echo get_the_title($grandfather) ?> Intro</a>\n </li><?php\n\n wp_list_pages( $args );\n}",
"function parent_post_rel_link($title = '%title')\n {\n }",
"function get_uams_breadcrumbs()\n{\n\nglobal $post;\n$ancestors = array_reverse( get_post_ancestors( $post->ID ) );\n$html = '<li><a href=\"http://inside.uams.edu\" title=\"University of Arkansas for Medical Scineces\">Home</a></li>';\nif ( !is_main_site() )\n{\n$html .= '<li' . (is_front_page() ? ' class=\"current\"' : '') . '><a href=\"' . home_url('/') . '\" title=\"' . str_replace(' ', ' ', get_bloginfo('title')) . '\">' . str_replace(' ', ' ', get_bloginfo('title')) . '</a><li>';\n}\n\nif ( is_404() )\n{\n $html .= '<li class=\"current\"><span>Ooops!</span>';\n} else\n\nif ( is_search() )\n{\n $html .= '<li class=\"current\"><span>Search results for ' . get_search_query() . '</span>';\n} else\n\nif ( is_author() )\n{\n $author = get_queried_object();\n $html .= '<li class=\"current\"><span> Author: ' . $author->display_name . '</span>';\n} else\n\nif ( get_queried_object_id() === (Int) get_option('page_for_posts') ) {\n $html .= '<li class=\"current\"><span> '. get_the_title( get_queried_object_id() ) . ' </span>';\n}\n\n// If the current view is a post type other than page or attachment then the breadcrumbs will be taxonomies.\nif( is_category() || is_tax() || is_single() || is_post_type_archive() )\n{\n\n if ( is_post_type_archive() && !is_tax() )\n {\n $posttype = get_post_type_object( get_post_type() );\n //$html .= '<li class=\"current\"><a href=\"' . get_post_type_archive_link( $posttype->query_var ) .'\" title=\"'. $posttype->labels->menu_name .'\">'. $posttype->labels->menu_name . '</a>';\n $html .= '<li class=\"current\"><span>'. $posttype->labels->menu_name . '</span>';\n }\n\n if ( is_category() )\n {\n $category = get_category( get_query_var( 'cat' ) );\n //$html .= '<li class=\"current\"><a href=\"' . get_category_link( $category->term_id ) .'\" title=\"'. get_cat_name( $category->term_id ).'\">'. get_cat_name($category->term_id ) . '</a>';\n $html .= '<li class=\"current\"><span>'. get_cat_name($category->term_id ) . '</span>';\n }\n\n if ( is_tax() && !is_post_type_archive() )\n {\n $term = get_term_by(\"slug\", get_query_var(\"term\"), get_query_var(\"taxonomy\") );\n $tax = get_taxonomy( get_query_var(\"taxonomy\") );\n //$html .= '<li class=\"current\"><a href=\"' . get_category_link( $category->term_id ) .'\" title=\"'. get_cat_name( $category->term_id ).'\">'. get_cat_name($category->term_id ) . '</a>';\n $html .= '<li class=\"current\"><span>'. $tax->labels->name .': '. $term->name .'</span>';\n }\n\n if ( is_tax() && is_post_type_archive() )\n {\n $tax = get_term_by(\"slug\", get_query_var(\"term\"), get_query_var(\"taxonomy\") );\n $posttype = get_post_type_object( get_post_type() );\n //$html .= '<li class=\"current\"><a href=\"' . get_category_link( $category->term_id ) .'\" title=\"'. get_cat_name( $category->term_id ).'\">'. get_cat_name($category->term_id ) . '</a>';\n $html .= '<li class=\"current\"><span>'. $tax->name . '</span>';\n }\n\n if ( is_single() )\n {\n if ( has_category() )\n {\n $thecat = get_the_category( $post->ID );\n $category = array_shift( $thecat ) ;\n $html .= '<li><a href=\"' . get_category_link( $category->term_id ) .'\" title=\"'. get_cat_name( $category->term_id ).'\">'. get_cat_name($category->term_id ) . '</a>';\n }\n if ( uams_is_custom_post_type() )\n {\n $posttype = get_post_type_object( get_post_type() );\n $archive_link = get_post_type_archive_link( $posttype->query_var );\n if (!empty($archive_link)) {\n $html .= '<li><a href=\"' . $archive_link .'\" title=\"'. $posttype->labels->menu_name .'\">'. $posttype->labels->menu_name . '</a>';\n }\n else if (!empty($posttype->rewrite['slug'])){\n $html .= '<li><a href=\"' . site_url('/' . $posttype->rewrite['slug'] . '/') .'\" title=\"'. $posttype->labels->menu_name .'\">'. $posttype->labels->menu_name . '</a>';\n }\n }\n $html .= '<li class=\"current\"><span>'. get_the_title( $post->ID ) . '</span>';\n }\n}\n\n// If the current view is a page then the breadcrumbs will be parent pages.\nelse if ( is_page() )\n{\n\n if ( ! is_home() || ! is_front_page() )\n $ancestors[] = $post->ID;\n\n if ( ! is_front_page() )\n {\n foreach ( array_filter( $ancestors ) as $index=>$ancestor )\n {\n $class = $index+1 == count($ancestors) ? ' class=\"current\" ' : '';\n $page = get_post( $ancestor );\n $url = get_permalink( $page->ID );\n $title_attr = esc_attr( $page->post_title );\n if (!empty($class)){\n $html .= \"<li $class><span>{$page->post_title}</span></li>\";\n }\n else {\n $html .= \"<li><a href=\\\"$url\\\" title=\\\"{$title_attr}\\\">{$page->post_title}</a></li>\";\n }\n }\n }\n\n}\n\nreturn \"<nav class='uams-breadcrumbs' aria-label='breadcrumbs'><ul>$html</ul></nav>\";\n}",
"abstract public function link_to_parent_link($parent_link = null);",
"function x_get_taxonomy_parents( $id, $taxonomy = 'category', $link = false, $separator = '/', $nicename = false, $visited = array() ) {\n\n\t$chain = '';\n\t$parent = get_term( $id, $taxonomy );\n\n\tif ( is_wp_error( $parent ) )\n\t\treturn $parent;\n\n\tif ( $nicename )\n\t\t$name = $parent->slug;\n\telse\n\t\t$name = $parent->name;\n\n\tif ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n\t\t$visited[] = $parent->parent;\n\t\t$chain .= x_get_taxonomy_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n\t}\n\n\tif ( $link )\n\t\t$chain .= '<a href=\"' . esc_url( get_term_link( $parent,$taxonomy ) ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n\telse\n\t\t$chain .= $name.$separator;\n\n\treturn $chain;\n}",
"function add_parent_url_menu_class( $classes = array(), $item = false ) {\n // Get current URL\n $current_url = current_url();\n\n // Get homepage URL\n $homepage_url = trailingslashit( get_bloginfo( 'url' ) );\n\n // Exclude 404 and homepage\n if( is_404() or $item->url == $homepage_url )\n return $classes;\n\n if ( get_post_type() == \"projets\" )\n {\n unset($classes[array_search('current_page_parent',$classes)]);\n if ( isset($item->url) )\n if ( strstr( $current_url, $item->url) )\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n}",
"function tac_override_yoast_breadcrumb_trail( $links ) {\n global $post;\n\n if ( is_home() || is_singular( 'post' ) || is_archive() ) :\n\n \tif ( 'event' == get_post_type() ) :\n\n\t $breadcrumb[] = array(\n\t 'url' => get_permalink( get_post_type_archive_link( 'event' ) ),\n\t 'text' => 'Our Events',\n\t );\n\n\t array_splice( $links, 1, -2, $breadcrumb );\n\n\t elseif ( 'course' == get_post_type() ) :\n\n\t \t$breadcrumb[] = array(\n\t 'url' => get_permalink( get_post_type_archive_link( 'course' ) ),\n\t 'text' => 'Our Learning',\n\t );\n\n\t array_splice( $links, 1, -2, $breadcrumb );\n\n\t else :\n\n\t \t\t$breadcrumb[] = array(\n\t 'url' => get_permalink( get_option( 'page_for_posts' ) ),\n\t 'text' => 'Our Series',\n\t );\n\n\t array_splice( $links, 1, -2, $breadcrumb );\n\t endif;\n endif;\n\n return $links;\n}",
"function breadcrumb_navigation( $page, $ref = array() ){\n\t$breadcrumb = $ref;\n\tif( !count( $breadcrumb ) ){\n\t\tarray_unshift( $breadcrumb, array( $page->post_title ) );\n\t} else {\n\t\tarray_unshift( $breadcrumb, array( $page->post_title, get_permalink( $page->ID ) ) );\n\t}\n\tif( $page->post_parent ){\n\t\tbreadcrumb_navigation( get_page( $page->post_parent ), $breadcrumb );\n\t\treturn;\n\t} else {\n\t\t/// process the breadcrumb\n\t\t$output = '<li class=\"home\"><a href=\"' . get_home_url() . '\">' . __( 'Home', '_supply_ontario' ) . '</a></li>';\n\t\tfor( $q = 0; $q < count( $breadcrumb ); ++$q ){\n\t\t\tif( count( $breadcrumb[$q] ) > 1 ){\n\t\t\t\t$output .= '<li><a href=\"' . $breadcrumb[$q][1] . '\">' . $breadcrumb[$q][0] . '</a></li>';\n\t\t\t} else {\n\t\t\t\t$output .= '<li class=\"current\">' . $breadcrumb[$q][0] . '</li>';\n\t\t\t}\n\t\t}\n\t\techo '<ul class=\"breadcrumb\">' . $output . '</ul>';\n\t}\n}",
"public function getBreadcrumbs();",
"function wpb_list_child_pages() { \n \nglobal $post; \n \nif ( is_page() && $post->post_parent )\n \n $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );\nelse\n $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );\n \nif ( $childpages ) {\n \n $string = '<ul>' . $childpages . '</ul>';\n}\n \nreturn $string;\n \n}",
"function wordpress_crumbs() {\n\t\t\n\t\t// Setup empty trail\n\t\t$trail \t= array();\n\t\t\n\t\t// Get some info\n\t\t$apoc \t\t= apocrypha();\n\t\t$post\t\t= $apoc->queried_object;\n\t\t$post_id\t= $apoc->queried_id;\n\t\tif ( isset( $post ) ) {\n\t\t\t$post_type \t= isset( $post->post_type ) ? $post->post_type : NULL;\n\t\t\t$parent \t= isset( $post->post_parent ) ? absint( $post->post_parent ) : NULL;\n\t\t}\n\n\t\t// Singular Views\n\t\tif ( is_singular() ) :\n\t\t\tswitch( $post_type ) {\n\t\t\t\n\t\t\t\t// Single Posts \n\t\t\t\tcase 'post' :\n\t\t\t\t\n\t\t\t\t\t// Is the post in a category?\n\t\t\t\t\t$categories = get_the_category( $post_id );\n\t\t\t\t\tif ( $categories ) :\n\t\t\t\t\t\n\t\t\t\t\t\t// Just do the first category\n\t\t\t\t\t\t$term = $categories[0];\n\t\t\t\t\n\t\t\t\t\t\t// If the category has a parent, add it to the trail. \n\t\t\t\t\t\tif ( 0 != $term->parent ) \n\t\t\t\t\t\t\t$trail = array_merge( $trail, $this->trail_parents( $term->parent, 'category' ) );\n\n\t\t\t\t\t\t// Add the category archive link to the trail. \n\t\t\t\t\t\t$trail[] = '<a href=\"' . get_term_link( $term ) . '\" title=\"' . esc_attr( $term->name ) . '\">' . $term->name . '</a>';\n\t\t\t\t\tendif;\n\t\t\t\t\t\n\t\t\t\t\t// Does the post have an ancestor?\n\t\t\t\t\tif ( 0 != $parent ) \n\t\t\t\t\t\t$trail = array_merge( $trail, $this->trail_parents( $parent ) );\n\t\t\t\t\t\n\t\t\t\t\t// Editing a comment on this post\n\t\t\t\t\tif ( is_comment_edit() ) :\n\t\t\t\t\t\t$trail[] = '<a href=\"' . get_permalink() . '\" title=\"Return to article\">' . $post->post_title . '</a>';\n\t\t\t\t\t\t$trail[] = 'Edit Comment';\n\t\t\t\t\t\n\t\t\t\t\t// Reading the post\n\t\t\t\t\telse :\n\t\t\t\t\t\t$trail[] = $post->post_title;\n\t\t\t\t\tendif; \n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t// Single Pages \n\t\t\t\tcase 'page' :\n\t\t\t\t\t\n\t\t\t\t\t// If the page has ancestor pages\n\t\t\t\t\tif ( 0 != $parent ) \n\t\t\t\t\t\t$trail = array_merge( $trail, $this->trail_parents( $parent ) );\n\t\t\t\t\t\n\t\t\t\t\t// Otherwise, viewing the page\n\t\t\t\t\t$trail[] = $post->post_title;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Single Calendar Event \n\t\t\t\tcase 'event' :\n\t\t\t\t\t\n\t\t\t\t\t// I need to rewrite this\n\t\t\t\t\tglobal $allowed_calendar;\n\t\t\t\t\tif ( is_group_calendar( $allowed_calendar->term_id ) ) :\n\t\t\t\t\t\t$group_url = ( 'entropy-rising' == $allowed_calendar->slug ) ? SITEURL . '/entropy-rising/' : SITEURL . '/groups/' . trailingslashit( $slug );\n\t\t\t\t\t\t$trail[] = '<a href=\"'. $group_url .'\" title=\"'. $allowed_calendar->name . ' Guild Page\">'. $allowed_calendar->name .'</a>';\n\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$trail[] = '<a href=\"'. SITEURL . '/calendar/' . $allowed_calendar->slug . '/\" title=\"'. $allowed_calendar->name . ' Calendar\">Calendar</a>';\n\t\t\t\t\t$trail[] = $post->post_title;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t// Archive Pages\n\t\telseif ( is_archive() ) :\n\t\t\n\t\t\t// Category Archives\n\t\t\tif ( is_category() ) :\n\t\t\t\t$trail[] = 'Categories';\n\n\t\t\t\t// If the category has a parent, add it to the trail. \n\t\t\t\tif ( $post->parent != 0 ) \n\t\t\t\t\t$trail = array_merge( $trail, $this->trail_parents( $post->parent ) );\n\t\t\t\t\n\t\t\t\t// Finish up with the term name\n\t\t\t\t$trail[] = $post->name;\n\t\t\t\n\t\t\t// Author Archive \n\t\t\telseif ( is_author() ) :\n\t\t\t\t$trail[] = 'Authors';\n\t\t\t\t$trail[] = get_the_author_meta( 'display_name', get_query_var( 'author' ) );\n\t\t\t\n\t\t\t\n\t\t\t// Calendar Archive \n\t\t\telseif ( is_calendar() ) :\n\t\t\t\n\t\t\t\t// Is it a group calendar? \n\t\t\t\t$term_id \t= $post->term_id;\n\t\t\t\tif( is_group_calendar( $term_id ) ) :\n\n\t\t\t\t\t// Get the group\n\t\t\t\t\t$slug\t\t= $post->slug;\n\t\t\t\t\t$group_id\t= groups_get_id( $slug );\t\t\n\t\t\t\t\tif ( 'entropy-rising' == $slug ) :\n\t\t\t\t\t\t$trail[] = '<a href=\"'. home_url() . '/entropy-rising/\">Entropy Rising</a>';\n\t\t\t\t\telse :\n\t\t\t\t\t\t$group = groups_get_group( array( 'group_id' => $group_id ) );\n\t\t\t\t\t\t$trail[] = '<a href=\"'. bp_get_groups_directory_permalink() .'\">Guilds</a>';\n\t\t\t\t\t\t$trail[] = '<a href=\"'. bp_get_groups_directory_permalink() . $slug .'\" title=\"'. $group->name . '\">'. $group->name . '</a>';\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\t// Otherwise just a standalone calendar\n\t\t\t\t$trail[] = 'Calendar';\n\t\t\tendif;\n\t\t\n\t\t// Search Results\n\t\telseif ( is_search() ) :\n\t\t\t$trail[] = 'Search Results';\n\t\telseif ( is_adv_search() ) :\n\t\t\t$trail[] = 'Advanced Search';\n\t\t\t\n\t\t// Interactive Map\n\t\telseif ( is_interactive_map() ) :\n\t\t\t$trail[] = 'Interactive Map';\n\t\t\t\n\t\t// Page Not Found\n\t\telseif ( is_404() ) : \n\t\t\t$trail[] = '404 Page Not Found';\t\t\n\t\tendif;\n\t\t\t\t\t\n\t\t// Return the trail\n\t\treturn $trail;\t\t\n\t}",
"function erpal_book_helper_erpal_menu_parents($router_item) {\n return _erpal_book_helper_get_menu_parents($router_item);\n}",
"function the_breadcrumb() {\n global $post;\n echo '<ol class=\"breadcrumb\">';\n if (!is_home()) {\n echo '<li><a href=\"';\n echo get_option('home');\n echo '\">';\n echo 'Home';\n echo '</a></li>';\n if (is_category() || is_single()) {\n echo '<li>';\n the_category('</li><li> ');\n if (is_single()) {\n echo '</li><li>';\n the_title();\n echo '</li>';\n }\n } elseif (is_page()) {\n if($post->post_parent){\n $anc = get_post_ancestors( $post->ID );\n $title = get_the_title();\n foreach ( $anc as $ancestor ) {\n $output = '<li><a href=\"'.get_permalink($ancestor).'\" title=\"'.get_the_title($ancestor).'\">'.get_the_title($ancestor).'</a></li>';\n }\n echo $output;\n echo '<strong title=\"'.$title.'\"> '.$title.'</strong>';\n } else {\n echo '<li><strong>'.get_the_title().'</strong></li>';\n }\n }\n }\n elseif (is_tag()) {single_tag_title();}\n elseif (is_day()) {echo\"<li>Archive for \"; the_time('F jS, Y'); echo'</li>';}\n elseif (is_month()) {echo\"<li>Archive for \"; the_time('F, Y'); echo'</li>';}\n elseif (is_year()) {echo\"<li>Archive for \"; the_time('Y'); echo'</li>';}\n elseif (is_author()) {echo\"<li>Author Archive\"; echo'</li>';}\n elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo \"<li>Blog Archives\"; echo'</li>';}\n elseif (is_search()) {echo\"<li>Search Results\"; echo'</li>';}\n echo '</ol>';\n}",
"function BreadCrumb(){}",
"function the_breadcrumb() {\n\t global $post;\n\t $separator = '<span class=\"breadcrumb-divider\"><svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M16 8.49993L13.4394 5.93933V7.99599H0V9.00394H13.4394V11.0606L16 8.49993Z\" fill=\"#121212\" /></svg></span>';\n\t echo '<nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb\">';\n\t if (!is_home()) {\n\t\t\t echo '<li class=\"breadcrumb-item\"><a href=\"';\n\t\t\t echo get_option('home');\n\t\t\t echo '\">';\n\t\t\t echo __( 'Home', 'thegrapes' );\n\t\t\t echo '</a></li>' . $separator;\n\t\t\t if ( is_category() ) {\n\t\t\t\t\t echo '<li class=\"breadcrumb-item active\">';\n\t\t\t\t\t the_category(' </li>' . $separator . '<li class=\"breadcrumb-item\"> ');\n\t\t\t } elseif ( is_single() ) {\n echo '<li class=\"breadcrumb-item\">';\n echo '<a href=\"' . get_post_type_archive_link( 'post' ) . '\">';\n echo get_the_title( get_option('page_for_posts', true) );\n echo '</a>';\n echo '</li>' . $separator . '<li class=\"breadcrumb-item active\">';\n the_title();\n echo '</li>';\n } elseif ( is_page() ) {\n\t\t\t\t\t if($post->post_parent){\n\t\t\t\t\t\t\t $anc = get_post_ancestors( $post->ID );\n\t\t\t\t\t\t\t $title = get_the_title();\n\t\t\t\t\t\t\t foreach ( $anc as $ancestor ) {\n\t\t\t\t\t\t\t\t\t $output = '<li class=\"breadcrumb-item\"><a href=\"'.get_permalink($ancestor).'\" title=\"'.get_the_title($ancestor).'\">'.get_the_title($ancestor).'</a></li>' . $separator;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t echo $output;\n\t\t\t\t\t\t\t echo '<li class=\"breadcrumb-item active\">'.$title.'</li>';\n\t\t\t\t\t } else {\n\t\t\t\t\t\t\t echo '<li class=\"breadcrumb-item active\">'.get_the_title().'</li>';\n\t\t\t\t\t }\n\t\t\t }\n\t }\n\t elseif (is_tag()) {single_tag_title();}\n\t elseif (is_day()) {echo\"<li>Archive for \"; the_time('F jS, Y'); echo'</li>';}\n\t elseif (is_month()) {echo\"<li>Archive for \"; the_time('F, Y'); echo'</li>';}\n\t elseif (is_year()) {echo\"<li>Archive for \"; the_time('Y'); echo'</li>';}\n\t elseif (is_author()) {echo\"<li>Author Archive\"; echo'</li>';}\n\t elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo \"<li>Blog Archives\"; echo'</li>';}\n\t elseif (is_search()) {echo\"<li>Search Results\"; echo'</li>';}\n\t echo '</ol></nav>';\n}",
"function get_post_parent($post = \\null)\n {\n }",
"function prev_post_rel_link($title = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"function mpcth_display_breadcrumb() {\r\n\tglobal $post;\r\n\t$id = $post->ID;\r\n\t$return = '<a href=\"/\">' . __('Home', 'mpcth') . '</a>';\r\n\r\n\tif(is_front_page()) {\r\n\t\t// do nothing\r\n\t} elseif(is_page()) {\r\n\t\t$page = get_post($id);\r\n\r\n\t\t$parent_pages = array();\r\n\t\t$parent_pages[] = ' <span class=\"mpcth-header-devider\">/</span> ' . $page->post_title . \"\\n\";\r\n\r\n\t\twhile ($page->post_parent) {\r\n\t\t\t$page = get_post($page->post_parent);\r\n\t\t\t$parent_pages[] = ' <span class=\"mpcth-header-devider\">/</span> <a href=\"' . get_permalink($page->ID) . '\">' . $page->post_title . '</a>';\r\n\t\t}\r\n\r\n\t\t$parent_pages = array_reverse($parent_pages);\r\n\r\n\t\tforeach ($parent_pages as $parent) {\r\n\t\t\t$return .= $parent;\r\n\t\t}\r\n\t} elseif(is_single()) {\r\n\t\tif($post->post_type == 'post') {\r\n\t\t\t$category = get_the_category($id);\r\n\r\n\t\t\tif(!empty($category)){\r\n\t\t\t\t$data = get_category_parents($category[0]->cat_ID, true, ' <span class=\"mpcth-header-devider\">/</span> ');\r\n\t\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . substr($data, 0, -strlen(' <span class=\"mpcth-header-devider\">/</span> '));\r\n\t\t\t}\r\n\t\t} elseif($post->post_type == 'portfolio') {\r\n\t\t\t$terms = get_the_terms($id, 'mpcth_portfolio_category');\r\n\t\t\t\r\n\t\t\tif(!empty($terms)){\r\n\t\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ';\r\n\r\n\t\t\t\tforeach ($terms as $term) {\r\n\t\t\t\t\t$return .= ' <a href=\"' . get_term_link($term) . '\">' . $term->name . '</a>';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($term !== end($terms))\r\n\t\t\t\t\t\t$return .= ', ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . $post->post_title . \"\\n\";\r\n\t} elseif(is_category()) {\r\n\t\t$category = get_the_category($id);\r\n\t\t$data = get_category_parents($category[0]->cat_ID, true, ' <span class=\"mpcth-header-devider\">/</span> ');\r\n\r\n\t\tif(!empty($category)){\r\n\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . substr($data,0,-8);\r\n\t\t}\r\n\t} elseif(is_tax()) {\r\n\t\t$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));\r\n\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> <a href=\"' . get_term_link($term) . '\">' . $term->name . '</a>';\r\n\t}\r\n\r\n\treturn $return;\r\n}",
"public function parent() { return $this->post->post_parent; }",
"public function trail() {\n\n\t\t$breadcrumb = '';\n\t\t$item_count = count( $this->items );\n\t\t$item_position = 0;\n\n\t\tif ( 0 < $item_count ) {\n\n\t\t\tif ( true === $this->args['show_browse'] )\n\t\t\t\t$breadcrumb .= sprintf( '<h2 class=\"trail-browse\">%s</h2>', $this->labels['browse'] );\n\n\t\t\t$breadcrumb .= '<ol class=\"breadcrumb '.$this->args['classes'].'\" itemscope itemtype=\"http://schema.org/BreadcrumbList\">';\n\n\t\t\t$breadcrumb .= sprintf( '<meta name=\"numberOfItems\" content=\"%d\" />', absint( $item_count ) );\n\t\t\t$breadcrumb .= '<meta name=\"itemListOrder\" content=\"Ascending\" />';\n\n\t\t\tforeach ( $this->items as $item ) {\n\n\t\t\t\t++$item_position;\n\n\t\t\t\tpreg_match( '/(<a.*?>)(.*?)(<\\/a>)/i', $item, $matches );\n\n\t\t\t\t$item = !empty( $matches ) ? sprintf( '%s<span itemprop=\"name\">%s</span>%s', $matches[1], $matches[2], $matches[3] ) : sprintf( '<span itemprop=\"name\">%s</span>', $item );\n\n\t\t\t\t$item_class = 'breadcrumb-item';\n\n\t\t\t\tif ( $item_count === $item_position )\n\t\t\t\t\t$item_class .= ' active';\n\n\t\t\t\t$attributes = 'itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\" class=\"' . $item_class . '\"';\n\n\t\t\t\t$meta = sprintf( '<meta itemprop=\"position\" content=\"%s\" />', absint( $item_position ) );\n\n\t\t\t\t$breadcrumb .= sprintf( '<li %s>%s%s</li>', $attributes, $item, $meta );\n\t\t\t}\n\n\t\t\t$breadcrumb .= '</ol>';\n\n\t\t\t$breadcrumb = sprintf(\n\t\t\t\t'<%1$s role=\"navigation\" aria-label=\"%2$s\" class=\"breadcrumbs\" itemprop=\"breadcrumb\">%3$s%4$s%5$s</%1$s>',\n\t\t\t\ttag_escape( $this->args['container'] ),\n\t\t\t\tesc_attr( $this->labels['aria_label'] ),\n\t\t\t\t$this->args['before'],\n\t\t\t\t$breadcrumb,\n\t\t\t\t$this->args['after']\n\t\t\t);\n\t\t}\n\n\t\tif ( false === $this->args['echo'] )\n\t\t\treturn $breadcrumb;\n\n\t\techo $breadcrumb;\n\t}",
"function navegacao_paginas_internas() { \n\n // creditos: http://www.wpbeginner.com/wp-tutorials/how-to-display-a-list-of-child-pages-for-a-parent-page-in-wordpress/\n \n global $post; \n // $pai = wp_get_post_parent_id( $post->ID );\n $parent_post = wp_get_post_parent_id($post->ID);\n $parent_name = get_the_title($parent_post);\n $parent_link = get_the_permalink($parent_post);\n \n if ( is_page() && $post->post_parent )\n $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0&depth=1' );\n else\n $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0&depth=1' );\n\n if ( $childpages ) {\n $string = '<div class=\"navegacao-interna\">Mais sobre <a href=\"'.$parent_link.'\">'.$parent_name.'</a>: '.$childpages.'</div>';\n }\n \n return $string;\n \n}",
"function YOUR_THEME_easy_breadcrumb($variables) {\n\n $breadcrumb = $variables['breadcrumb'];\n $segments_quantity = $variables['segments_quantity'];\n\n $breadcrumb_items = [];\n $link_options = [\n 'attributes' => [\n 'class' => [\n 'ecl-breadcrumbs__link',\n ],\n ],\n 'html' => TRUE\n ];\n $breadcrumb_items = [];\n $menu_breadcrumb = menu_tree_page_data('menu-breadcrumb-menu');\n $i = 0;\n foreach ($menu_breadcrumb as $item) {\n $breadcrumb_item = [\n 'data' => l($item['link']['link_title'], $item['link']['link_path'], $link_options),\n 'class' => [\n 'ecl-breadcrumbs__segment',\n ],\n ];\n if ($i == 0) {\n $breadcrumb_item['class'][] = 'ecl-breadcrumbs__segment--first';\n }\n $breadcrumb_items[] = $breadcrumb_item;\n $i++;\n }\n\n if ($segments_quantity > 0) {\n\n for ($i = 0, $s = $segments_quantity - 1; $i < $segments_quantity; ++$i) {\n $it = $breadcrumb[$i];\n $content = decode_entities($it['content']);\n if (isset($it['url'])) {\n $breadcrumb_item = [\n 'data' => l($content, $it['url'], $link_options),\n 'class' => [\n 'ecl-breadcrumbs__segment',\n ],\n ];\n } else {\n $breadcrumb_item = [\n 'data' => filter_xss($content),\n 'class' => [\n 'ecl-breadcrumbs__segment',\n ],\n ];\n }\n if ($i == $segments_quantity) {\n $breadcrumb_item['class'][] = 'ecl-breadcrumbs__segment--last';\n }\n\n $breadcrumb_items[] = $breadcrumb_item;\n }\n }\n\n $items = [\n 'items' => $breadcrumb_items,\n 'type' => 'ol',\n 'attributes' => [\n 'class' => [\n 'ecl-breadcrumbs__segments-wrapper',\n ],\n ],\n ];\n\n return theme('item_list', $items);\n}",
"function get_term_parents( $id, $taxonomy, $link = false, $separator = '/', $nicename = false, $visited = [] )\n {\n $chain = '';\n $parent = get_term( $id, $taxonomy );\n\n if ( is_wp_error( $parent ) ) {\n return $parent;\n }\n\n if ( $nicename ) {\n $name = $parent->slug;\n } else {\n $name = $parent->cat_name;\n }\n\n if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n $visited[] = $parent->parent;\n $chain .= get_term_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n }\n\n if ( $link ) {\n $chain .= '<a href=\"' . get_term_link( $parent->term_id, $taxonomy ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n } else {\n $chain .= $name.$separator;\n }\n\n return $chain;\n }",
"function five_get_ancestors(){\n\t\t\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_results(\"SELECT ID, post_title, guid FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = 0 AND post_status = 'publish'\");\n\t\treturn $result;\n\t\t}",
"function column_ID_parent( $item ) {\r\n\t\tif ( $item->post_parent ) {\r\n\t\t\tif ( isset( $item->parent_title ) ) {\r\n\t\t\t\t$parent_title = $item->parent_title;\r\n\t\t\t} else {\r\n\t\t\t\t$parent_title = sprintf( '%1$d %2$s', $item->post_parent, __( '(no title)', 'media-library-assistant' ) );\r\n\t\t\t}\r\n\r\n\t\t\t$parent = sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' ' . __( 'Parent ID', 'media-library-assistant' ) . '\">(' . __( 'Parent', 'media-library-assistant' ) . ':%2$s)</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t\t'parent' => $item->post_parent,\r\n\t\t\t\t\t'heading_suffix' => urlencode( __( 'Parent', 'media-library-assistant' ) . ': ' . $parent_title ) \r\n\t\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), (string) $item->post_parent );\r\n\t\t} else {// $item->post_parent\r\n\t\t\t$parent = '<span style=\"color:silver\">' . __( 'Parent', 'media-library-assistant' ) . ':0</span>';\r\n\t\t}\r\n\r\n\t\t$content = sprintf( '%1$s<br>%2$s', /*%1$s*/ $item->ID, /*%2$s*/ $parent );\r\n\t\treturn $this->_handle_primary_column( $item, 'ID_parent', $content );\r\n\t}",
"public function breadcrumbs($h)\n {\n if ($h->pageName == 'edit_post') {\n $post_link = \"<a href='\" . $h->url(array('page'=>$h->post->id)) . \"'>\";\n $post_link .= $h->post->title . \"</a>\";\n $h->pageTitle = $h->pageTitle . \" / \" . $post_link;\n }\n }",
"function ph_display_page_children($post)\n{\n\n $html = '';\n if ($post) {\n $args = array(\n 'post_status' => 'publish',\n 'post_type' => 'page',\n 'post_parent' => $post->ID,\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'nopaging' => true,\n );\n\n query_posts($args);\n\n if (have_posts()) {\n $html = '<ul class=\"page-children ph-page-children\">';\n while (have_posts()) {\n the_post();\n $html .= '<li>'.get_the_title().' · '.get_the_excerpt().'</li>';\n }\n $html .= '</ul>';\n }\n\n wp_reset_query();\n }\n\n return $html;\n}",
"function ss_get_parent_url( $child_id ) {\r\n\t$child = get_post( $child_id );\r\n\t$parentId = $child->post_parent;\r\n\t$linkToParent = get_permalink( $parentId );\r\n\treturn $linkToParent;\r\n}",
"function thumbwhere_contentcollectionitem_set_breadcrumb() {\n $breadcrumb = array(\n l(t('Home'), '<front>'),\n l(t('Administration'), 'admin'),\n l(t('ContentCollectionItem'), 'admin/content'),\n l(t('ContentCollectionItem'), 'admin/thumbwhere/thumbwhere_contentcollectionitems'),\n );\n\n drupal_set_breadcrumb($breadcrumb);\n}",
"public function setBreadcrumbs()\n {\n static $set = false;\n if ($set == true) {\n return true;\n } else {\n $set = true;\n }\n\n if (JRequest::getCmd('view') != 'root') {\n return true;\n }\n\n $application = JFactory::getApplication();\n $pathway = $application->getPathway();\n $data = $this->getResponseData();\n\n if (!is_array($data)) {\n $data = array();\n }\n\n if (MageBridgeTemplateHelper::isCartPage()) {\n $pathway->addItem(JText::_('COM_MAGEBRIDGE_SHOPPING_CART'), MageBridgeUrlHelper::route('checkout/cart'));\n\n } else if (MageBridgeTemplateHelper::isCheckoutPage()) {\n $pathway->addItem(JText::_('COM_MAGEBRIDGE_SHOPPING_CART'), MageBridgeUrlHelper::route('checkout/cart'));\n $pathway->addItem(JText::_('COM_MAGEBRIDGE_CHECKOUT'), MageBridgeUrlHelper::route('checkout'));\n }\n\n @array_shift($data);\n if (empty($data)) {\n return true;\n }\n\n $pathway_items = array();\n foreach ($pathway->getPathway() as $pathway_item) {\n $pathway_item->link = preg_replace('/\\/$/', '', JURI::root()).JRoute::_($pathway_item->link);\n $pathway_items[] = $pathway_item;\n }\n @array_pop($pathway_items);\n\n foreach ($data as $item) {\n\n // Do not add the current link\n if (MageBridgeUrlHelper::current() == $item['link']) continue;\n\n // Loop through the current pathway-items to prevent double links\n if (!empty($pathway_items)) {\n $match = false;\n foreach ($pathway_items as $pathway_item) {\n if ($pathway_item->link == $item['link']) $match = true;\n }\n if ($match == true) continue;\n }\n\n $pathway_item = (object)null;\n $pathway_item->name = JText::_($item['label']);\n $pathway_item->link = $item['link'];\n $pathway_item->magento = 1;\n $pathway_items[] = $pathway_item;\n\n }\n\n $pathway->setPathway($pathway_items);\n\n return true;\n }",
"function _erpal_book_helper_get_menu_parents($router_item) {\n $crm_global = _erpal_basic_helper_has_context(ERPAL_CONTEXT_BOOK_GLOBAL, $router_item);\n \n if ($crm_global) {\n return 'books/books';\n }\n}",
"public function get_portfolio_tree_menu_url();",
"function bethel_add_submenu_to_post() {\n\tglobal $post;\n\t$menu_items = get_menu_items_for_current_page();\n\tif ($menu_items && sizeof($menu_items) > 1) {\n\t\techo '<ul class=\"bethel-subpages-nav\">';\n\t\tforeach ($menu_items as $menu_item) {\n\t\t\techo '<li'.($menu_item->object_id == $post->ID ? ' class=\"current-item\"' : '').\">\";\n\t\t\techo \"<a href=\\\"{$menu_item->url}\\\">{$menu_item->title}</a>\";\n\t\t\techo '</li>';\n\t\t}\n\t\techo '</ul>';\n\t} elseif (is_page() && $post->post_parent) {\n $menu_items = get_pages (array('parent' => $post->post_parent, 'sort_order' => 'menu_order', 'hierarchical' => false));\n if ($menu_items && sizeof($menu_items) > 1) {\n echo '<ul class=\"bethel-subpages-nav\">';\n foreach ($menu_items as $menu_item) {\n echo '<li'.($menu_item->ID == $post->ID ? ' class=\"current-item\"' : '').\">\";\n echo '<a href=\"'.get_permalink($menu_item->ID).\"\\\">{$menu_item->post_title}</a>\";\n echo '</li>';\n }\n echo '</ul>';\n }\n }\n}",
"public function breadCrumb()\n\t{\n\t\treturn parent::breadCrumb().\" \".$GLOBALS['super']->config->crumbSeperator.\" \".$this->getName();\n\t}",
"public function breadCrumb()\n\t{\n\t\treturn parent::breadCrumb().\" \".$GLOBALS['super']->config->crumbSeperator.\" \".$this->getName();\n\t}",
"public function column_parent($post)\n {\n }",
"function Ancestors($page) {\n\n\t\t$breadcrumbs = array();\n\n\t\tif ( $page->URLSegment == 'home' )\n\t\t\treturn $breadcrumbs;\n\n\t\t//Debug::Log( 'Ancestors: ' . $page->ID . ' - ' .$page->MenuTitle . ' has parent ' . $page->ParentID );\n\n\t\t// Add ancestor pages to the array\n\t\tif ( $page->ParentID )\n\t\t\t$breadcrumbs += $this->Ancestors( $page->Parent() );\n\n\t\t// Add the page to the array\n\t\tif ( get_class($page) != 'SubmenuHolder' )\n\t\t\t$breadcrumbs[] = $page;\n\n\t\treturn $breadcrumbs;\n\t}",
"protected function breadcrumbForList()\n {\n $breadcrumbTree = new ullPhoneBreadcrumbTree();\n $breadcrumbTree->addDefaultListEntry();\n $this->setVar('breadcrumb_tree', $breadcrumbTree, true);\n }",
"function travomath_post_navigation(){\n\t\n\t$nav = '<div class=\"row\">';\n\t\n\t$prev = get_previous_post_link( '<div class=\"post-link-nav\"><span class=\"sunset-icon sunset-chevron-left\" aria-hidden=\"true\"></span> %link</div>', '%title' );\n\t$nav .= '<div class=\"col-xs-12 col-sm-6\">' . $prev . '</div>';\n\t\n\t$next = get_next_post_link( '<div class=\"post-link-nav\">%link <span class=\"sunset-icon sunset-chevron-right\" aria-hidden=\"true\"></span></div>', '%title' );\n\t$nav .= '<div class=\"col-xs-12 col-sm-6 text-right\">' . $next . '</div>';\n\t\n\t$nav .= '</div>';\n\t\n\treturn $nav;\n\t\n}",
"function _update_breadcrumb_line()\n {\n $tmp = Array();\n\n $tmp[] = Array\n (\n MIDCOM_NAV_URL => \"/\",\n MIDCOM_NAV_NAME => $this->_l10n->get('index'),\n );\n\n $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $tmp);\n }",
"function parent_dropdown($default_page = 0, $parent_page = 0, $level = 0, $post = \\null)\n {\n }",
"function honeycomb_post_nav() {\n\t\t$args = array(\n\t\t\t'next_text' => '%title',\n\t\t\t'prev_text' => '%title',\n\t\t\t);\n\t\tthe_post_navigation( $args );\n\t}",
"function adjacent_posts_rel_link($title = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"function dimox_breadcrumbs() {\n\t\t$text['home'] = 'Home'; // text for the 'Home' link\n\t\t$text['category'] = '%s'; // text for a category page\n\t\t$text['search'] = 'Wyniki wyszukiwania dla \"%s\"'; // text for a search results page\n\t\t$text['404'] = 'Błąd 404'; // text for the 404 page\n\t\t$text['page'] = '%s'; // text 'Page N'\n\t\t$text['cpage'] = 'Comment Page %s'; // text 'Comment Page N'\n\t\t$wrap_before = '<div class=\"breadcrumbs\" itemscope itemtype=\"htt://schema.org/BreadCrumbList\">'; // the opening wrapper tag\n\t\t$wrap_after = '</div><!-- .breadcrumbs -->'; // the closing wrapper tag\n\t\t$sep = '›'; // separator between crumbs\n\t\t$sep_before = '<span class=\"sep\">'; // tag before separator\n\t\t$sep_after = '</span>'; // tag after separator\n\t\t$show_home_link = 1; // 1 - show the 'Home' link, 0 - don't show\n\t\t$show_on_home = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show\n\t\t$show_current = 1; // 1 - show current page title, 0 - don't show\n\t\t$before = '<span class=\"current\">'; // tag before the current crumb\n\t\t$after = '</span>'; // tag after the current crumb\n\t\t/* === END OF OPTIONS === */\n\t\tglobal $post;\n\t\t$home_link = home_url('/');\n\t\t$link_before = '<span itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">';\n\t\t$link_after = '</span>';\n\t\t$link_attr = ' itemprop=\"url\"';\n\t\t$link_in_before = '<span itemprop=\"title\">';\n\t\t$link_in_after = '</span>';\n\t\t$link = $link_before . '<a href=\"%1$s\"' . $link_attr . '>' . $link_in_before . '%2$s' . $link_in_after . '</a>' . $link_after;\n\t\t$frontpage_id = get_option('page_on_front');\n\t\t$parent_id = $post->post_parent;\n\t\t$sep = ' ' . $sep_before . $sep . $sep_after . ' ';\n\t\tif (is_home() || is_front_page()) {\n\t\t\tif ($show_on_home) echo $wrap_before . '<a href=\"' . $home_link . '\">' . $text['home'] . '</a>' . $wrap_after;\n\t\t} else {\n\t\t\techo $wrap_before;\n\t\t\tif ($show_home_link) echo sprintf($link, $home_link, $text['home']);\n\t\t\tif ( is_category() ) {\n\t\t\t\t$cat = get_category(get_query_var('cat'), false);\n\t\t\t\tif ($cat->parent != 0) {\n\t\t\t\t\t$cats = get_category_parents($cat->parent, TRUE, $sep);\n\t\t\t\t\t$cats = preg_replace(\"#^(.+)$sep$#\", \"$1\", $cats);\n\t\t\t\t\t$cats = preg_replace('#<a([^>]+)>([^<]+)<\\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);\n\t\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\t\techo $cats;\n\t\t\t\t}\n\t\t\t\tif ( get_query_var('paged') ) {\n\t\t\t\t\t$cat = $cat->cat_ID;\n\t\t\t\t\techo $sep . sprintf($link, get_category_link($cat), get_cat_name($cat)) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_current) echo $sep . $before . sprintf($text['category'], single_cat_title('', false)) . $after;\n\t\t\t\t}\n\t\t\t} elseif ( is_search() ) {\n\t\t\t\tif (have_posts()) {\n\t\t\t\t\tif ($show_home_link && $show_current) echo $sep;\n\t\t\t\t\tif ($show_current) echo $before . sprintf($text['search'], get_search_query()) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\t\techo $before . sprintf($text['search'], get_search_query()) . $after;\n\t\t\t\t}\n\t\t\t} elseif ( is_single() && !is_attachment() ) {\n\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\tif ( get_post_type() != 'post' ) {\n\t\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\t\t$slug = $post_type->rewrite;\n\t\t\t\t\tprintf($link, $home_link . $slug['slug'] . '/', $post_type->labels->singular_name);\n\t\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t\t} else {\n\t\t\t\t\t$cat = get_the_category(); $cat = $cat[0];\n\t\t\t\t\t$cats = get_category_parents($cat, TRUE, $sep);\n\t\t\t\t\tif (!$show_current || get_query_var('cpage')) $cats = preg_replace(\"#^(.+)$sep$#\", \"$1\", $cats);\n\t\t\t\t\t$cats = preg_replace('#<a([^>]+)>([^<]+)<\\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);\n\t\t\t\t\techo $cats;\n\t\t\t\t\tif ( get_query_var('cpage') ) {\n\t\t\t\t\t\techo $sep . sprintf($link, get_permalink(), get_the_title()) . $sep . $before . sprintf($text['cpage'], get_query_var('cpage')) . $after;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($show_current) echo $before . get_the_title() . $after;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// custom post type\n\t\t\t} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {\n\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\tif ( get_query_var('paged') ) {\n\t\t\t\t\techo $sep . sprintf($link, get_post_type_archive_link($post_type->name), $post_type->label) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_current) echo $sep . $before . $post_type->label . $after;\n\t\t\t\t}\n\t\t\t} elseif ( is_page() && !$parent_id ) {\n\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t} elseif ( is_page() && $parent_id ) {\n\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\tif ($parent_id != $frontpage_id) {\n\t\t\t\t\t$breadcrumbs = array();\n\t\t\t\t\twhile ($parent_id) {\n\t\t\t\t\t\t$page = get_page($parent_id);\n\t\t\t\t\t\tif ($parent_id != $frontpage_id) {\n\t\t\t\t\t\t\t$breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$parent_id = $page->post_parent;\n\t\t\t\t\t}\n\t\t\t\t\t$breadcrumbs = array_reverse($breadcrumbs);\n\t\t\t\t\tfor ($i = 0; $i < count($breadcrumbs); $i++) {\n\t\t\t\t\t\techo $breadcrumbs[$i];\n\t\t\t\t\t\tif ($i != count($breadcrumbs)-1) echo $sep;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t} elseif ( is_404() ) {\n\t\t\t\tif ($show_home_link && $show_current) echo $sep;\n\t\t\t\tif ($show_current) echo $before . $text['404'] . $after;\n\t\t\t} elseif ( has_post_format() && !is_singular() ) {\n\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\techo get_post_format_string( get_post_format() );\n\t\t\t}\n\t\t\techo $wrap_after;\n\t\t}\n\t}",
"function breadcrumbs()\n{\n $home = __('Home'); // text for the 'Home' link\n $before = '<li class=\"active\">'; // tag before the current crumb\n $sep = '';//'<span class=\"divider\">/</span>';\n $after = '</li>'; // tag after the current crumb\n if (!is_home() && !is_front_page() || is_paged()) {\n echo '<ul class=\"breadcrumb\">';\n global $post;\n $homeLink = home_url();\n echo '<li><a href=\"' . $homeLink . '\">' . $home . '</a> '.$sep. '</li> ';\n if (is_category()) {\n global $wp_query;\n $cat_obj = $wp_query->get_queried_object();\n $thisCat = $cat_obj->term_id;\n $thisCat = get_category($thisCat);\n $parentCat = get_category($thisCat->parent);\n if ($thisCat->parent != 0) {\n echo get_category_parents($parentCat, true, $sep);\n }\n echo $before . __('Archive by category') . ' \"' . single_cat_title('', false) . '\"' . $after;\n } elseif (is_day()) {\n echo '<li><a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time(\n 'Y'\n ) . '</a></li> ';\n echo '<li><a href=\"' . get_month_link(get_the_time('Y'), get_the_time('m')) . '\">' . get_the_time(\n 'F'\n ) . '</a></li> ';\n echo $before . get_the_time('d') . $after;\n } elseif (is_month()) {\n echo '<li><a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time(\n 'Y'\n ) . '</a></li> ';\n echo $before . get_the_time('F') . $after;\n } elseif (is_year()) {\n echo $before . get_the_time('Y') . $after;\n } elseif (is_single() && !is_attachment()) {\n if (get_post_type() != 'post') {\n $post_type = get_post_type_object(get_post_type());\n $slug = $post_type->rewrite;\n echo '<li><a href=\"' . $homeLink . '/' . $slug['slug'] . '/\">' . $post_type->labels->singular_name . '</a></li> ';\n echo $before . get_the_title() . $after;\n } else {\n $cat = get_the_category();\n $cat = $cat[0];\n echo '<li>'.get_category_parents($cat, true, $sep).'</li>';\n echo $before . get_the_title() . $after;\n }\n } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) {\n $post_type = get_post_type_object(get_post_type());\n echo $before . $post_type->labels->singular_name . $after;\n } elseif (is_attachment()) {\n $parent = get_post($post->post_parent);\n $cat = get_the_category($parent->ID);\n $cat = $cat[0];\n echo get_category_parents($cat, true, $sep);\n echo '<li><a href=\"' . get_permalink(\n $parent\n ) . '\">' . $parent->post_title . '</a></li> ';\n echo $before . get_the_title() . $after;\n } elseif (is_page() && !$post->post_parent) {\n echo $before . get_the_title() . $after;\n } elseif (is_page() && $post->post_parent) {\n $parent_id = $post->post_parent;\n $breadcrumbs = array();\n while ($parent_id) {\n $page = get_page($parent_id);\n $breadcrumbs[] = '<li><a href=\"' . get_permalink($page->ID) . '\">' . get_the_title(\n $page->ID\n ) . '</a>' . $sep . '</li>';\n $parent_id = $page->post_parent;\n }\n $breadcrumbs = array_reverse($breadcrumbs);\n foreach ($breadcrumbs as $crumb) {\n echo $crumb;\n }\n echo $before . get_the_title() . $after;\n } elseif (is_search()) {\n echo $before . __('Search results for') . ' \"'. get_search_query() . '\"' . $after;\n } elseif (is_tag()) {\n echo $before . __('Posts tagged') . ' \"' . single_tag_title('', false) . '\"' . $after;\n } elseif (is_author()) {\n global $author;\n $userdata = get_userdata($author);\n echo $before . __('Articles posted by') . ' ' . $userdata->display_name . $after;\n } elseif (is_404()) {\n echo $before . __('Error 404') . $after;\n }\n // if (get_query_var('paged')) {\n // if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()\n // ) {\n // echo ' (';\n // }\n // echo __('Page', 'bootstrapwp') . $sep . get_query_var('paged');\n // if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()\n // ) {\n // echo ')';\n // }\n // }\n echo '</ul>';\n }\n}",
"function appendChildren ($item) {\n if (array_key_exists($item->name(),$this->parents)) {\n $this->menu[]=new Marker('start');\n foreach ( $this->children[$item->name()] as $child ) {\n $this->menu[]=$child;\n $this->appendChildren($child);\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }\n }",
"private function get_taxonomy_parents( $id, $taxonomy = 'category', $link = false, $separator = '/', $nicename = false, $visited = array() ) {\n\t\t$chain = '';\n\t\t$parent = &get_term( $id, $taxonomy, OBJECT, 'raw');\n\t\tif ( is_wp_error( $parent ) ) {\n\t\t\treturn $parent;\n\t\t}\n\n\t\tif ( $nicename ){\n\t\t\t$name = $parent->slug;\n\t\t}else {\n\t\t\t$name = $parent->name;\n\t\t}\n\n\t\tif ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n\t\t\t$visited[] = $parent->parent;\n\t\t\t$chain .= $this->get_taxonomy_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n\t\t}\n\n\t\tif ( $link ) {\n\t\t\t$chain .= '<a href=\"' . get_term_link( $parent->term_id, $taxonomy ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n\t\t}else {\n\t\t\t$chain .= $name.$separator;\n\t\t}\n\t\treturn $chain;\n\t}",
"function fc_update_parent_links()\n{\n $db = new PHPWS_DB('images');\n $db->addWhere('url', 'parent');\n $db->addValue('url', NULL);\n PHPWS_Error::logIfError($db->update());\n\n // remove superfluous column\n PHPWS_Error::logIfError($db->dropTableColumn('parent_id'));\n}",
"function the_breadcrumb() {\n\tif (!is_home()) {\n\t\techo '<span title=\"';\n\t\techo get_option('home');\n\t echo '\">';\n\t\tbloginfo('name');\n\t\techo \"</span> » \";\n\t\tif (is_page_template()) {\n\t\t\t\techo \" » \";\n echo the_title();\n\n \n \t\n\t\t} elseif (is_single()) {\n\t\t\techo the_title();\n\t\t}\n\t}\n}",
"function simple_breadcrumb() {\n global $post;\n global $staticVars;\n // print_r(has_term($staticVars['industryNewTypeID'], 'new-type', $post));exit;\n $sep = ' / ';\n\techo '<a href=\"'.pll_home_url().'\">'.pll__('Lietuvos kino centras').'</a>'.$sep;\n\t//echo '<a href=\"'.pll_home_url().'\">'.get_bloginfo('name').'</a>'.$sep;\n\n/*\tif ( is_category() || is_single() ) {\n\t\tthe_category(', ');\n\t\tif ( is_single() ) {\n\t\t\techo $sep;\n\t\t\tthe_title();\n\t\t}*/\n\n\tif (is_single()) {\n\t\tif(get_post_type() == 'post'){\n\t\t\tif(has_term($staticVars['industryNewTypeID'], 'new-type', $post)){\n\t\t\t\t$news_link = $staticVars['industryNewsUrl'];\n\t\t\t\t$news_link_text = pll__('Industrijos naujienos');\n\t\t\t} else {\n\t\t\t\t$news_link = $staticVars['newsUrl'];\n\t\t\t\t$news_link_text = pll__('Naujienos');\n\t\t\t}\n\t\t\techo '<a href=\"'.$news_link.'\">';\n\t\t\techo $news_link_text;\n\t\t\techo \"</a>\";\n\t\t} elseif(get_post_type() == 'interesting-fact') {\n\n\t\t\t$pages = get_pages(array(\n\t\t\t 'meta_key' => '_wp_page_template',\n\t\t\t 'meta_value' => 'page-templates/interesting_facts.php',\n\t\t\t 'lang' => pll_current_language('slug')\n\t\t\t //'hierarchical' => 0\n\t\t\t));\n\t\t\t//print_r($pages);\n\n\t\t\techo '<a href=\"'.get_permalink($pages[0]->ID).'\">';\n\t\t\tpll_e('Įdomūs faktai');\n\t\t\techo \"</a>\";\n\t\t} elseif(get_post_type() == 'tribe_events'){\n\t\t\t$url = $staticVars['eventsUrl'];\n\t\t\techo '<a href=\"'.$url.'\">'.pll__('Renginiai').'</a>';\n\t\t} elseif(get_post_type() == 'education-resource'){\n\t\t\t$url = $staticVars['educationResourceUrl'];\n\t\t\t$title = get_the_title(kcsite_getPageByTempate('education_list.php'));\n\t\t\techo '<a href=\"'.$url.'\">'.$title.'</a>';\n\t\t} elseif(get_post_type() == 'film'){\n $url = get_permalink($staticVars['filmRegisterSearchPageId']);\n $title = get_the_title($staticVars['filmRegisterSearchPageId']);\n echo '<a href=\"'.$url.'\">'.$title.'</a>';\n } elseif(get_post_type() == 'lithfilm'){\n\t\t\t$url = get_permalink($staticVars['lithuanianFilmsSearchPageId']);\n\t\t\t$title = get_the_title($staticVars['lithuanianFilmsSearchPageId']);\n\t\t\techo '<a href=\"'.$url.'\">'.$title.'</a>';\n\t\t}\n\t\techo $sep;\n\t\tthe_title();\n\n\t} elseif(!is_single() && get_post_type() == 'tribe_events'){ //event calendar view\n\t\tpll_e('Renginiai');\n\t} elseif ( is_page() && $post->post_parent ) {\n\t\t\n\t\t//checkiing home page is not needed, but dos make no difference, so left\n\t\t$home = get_page_by_title('home');\n\t\t//show all ancestors (parent pages)\n\t\tfor ($i = count($post->ancestors)-1; $i >= 0; $i--) {\n\t\t\tif (($home->ID) != ($post->ancestors[$i])) {\n\t\t\t\techo '<a href=\"';\n\t\t\t\techo get_permalink($post->ancestors[$i]); \n\t\t\t\techo '\">';\n\t\t\t\techo get_the_title($post->ancestors[$i]);\n\t\t\t\techo \"</a>\".$sep;\n\t\t\t}\n\t\t}\n\t\techo the_title();\n\t} elseif (is_page()) {\n\t\techo the_title();\n\t} elseif (is_404()) {\n\t\techo of_get_option_by_lang('kcsite_404_page_title');\n\t}\n}",
"function wp_get_post_parent_id($post = \\null)\n {\n }",
"protected function ancestorsBeforeSave()\r\n {\r\n if (empty($this->type)) {\r\n $this->type = $this->__type;\r\n }\r\n \r\n if (empty($this->parent) || $this->parent == \"null\")\r\n {\r\n $this->parent = null;\r\n } else {\r\n $this->parent = new \\MongoId((string) $this->parent);\r\n }\r\n \r\n $this->path = $this->ancestorsGeneratePath( $this->slug, $this->parent );\r\n \r\n if (empty($this->ancestors) && !empty($this->parent))\r\n {\r\n $parent_title = null;\r\n $parent_slug = null;\r\n $parent_path = null;\r\n $parent_ancestors = array();\r\n \r\n $parent = (new static)->setState('filter.id', $this->parent)->getItem();\r\n if (!empty($parent->title))\r\n {\r\n $parent_title = $parent->title;\r\n }\r\n if (!empty($parent->slug))\r\n {\r\n $parent_slug = $parent->slug;\r\n }\r\n if (!empty($parent->path))\r\n {\r\n $parent_path = $parent->path;\r\n }\r\n if (!empty($parent->ancestors))\r\n {\r\n $parent_ancestors = $parent->ancestors;\r\n }\r\n \r\n $this->ancestors = $parent_ancestors;\r\n $this->ancestors[] = array(\r\n 'id' => $this->parent,\r\n 'slug' => $parent_slug,\r\n 'title' => $parent_title\r\n );\r\n }\r\n \r\n if (empty($this->parent) || $this->parent == \"null\")\r\n {\r\n $this->ancestors = array();\r\n }\r\n \r\n return parent::beforeSave();\r\n }",
"function x_breadcrumbs() {\n\n\tif ( x_get_option( 'x_breadcrumb_display', '1' ) ) {\n\n\t GLOBAL $post;\n\n\t $is_ltr = ! is_rtl();\n\t $stack = x_get_stack();\n\t $delimiter = x_get_breadcrumb_delimiter();\n\t $home_text = x_get_breadcrumb_home_text();\n\t $home_link = home_url();\n\t $current_before = x_get_breadcrumb_current_before();\n\t $current_after = x_get_breadcrumb_current_after();\n\t $page_title = get_the_title();\n\t $blog_title = get_the_title( get_option( 'page_for_posts', true ) );\n\n\t if ( ! is_404() ) {\n\t\t$post_parent = $post->post_parent;\n\t } else {\n\t\t$post_parent = '';\n\t }\n\n\t if ( X_WOOCOMMERCE_IS_ACTIVE ) {\n\t\t//$shop_url = x_get_shop_link();\n\t\t$shop_url = home_url() . 'products';\n\t\t$shop_title = x_get_option( 'x_' . $stack . '_shop_title', __( 'The Shop', '__x__' ) );\n\t\t$shop_link = '<a href=\"'. $shop_url .'\">' . $shop_title . '</a>';\n\t }\n\n\t echo '<div class=\"x-breadcrumbs\"><a href=\"' . $home_link . '\">' . $home_text . '</a>' . $delimiter;\n\n\t\tif ( is_home() ) {\n\n\t\t echo $current_before . $blog_title . $current_after;\n\n\t\t} elseif ( is_category() ) {\n\n\t\t $the_cat = get_category( get_query_var( 'cat' ), false );\n\t\t if ( $the_cat->parent != 0 ) echo get_category_parents( $the_cat->parent, TRUE, $delimiter );\n\t\t echo $current_before . single_cat_title( '', false ) . $current_after;\n\n\t\t} elseif ( x_is_product_category() ) {\n\t\t\n\t\t $the_cat = get_queried_object();\n\t\t if ( $the_cat->parent != 0 ) echo x_get_taxonomy_parents( $the_cat->parent, $the_cat->taxonomy, TRUE, $delimiter );\n\t\t echo $current_before . single_cat_title( '', false ) . $current_after;\n\t\t\n\t\t /*\n\t\t if ( $is_ltr ) {\n\t\t\techo $shop_link . $delimiter . $current_before . single_cat_title( '', false ) . $current_after;\n\t\t } else {\n\t\t\techo $current_before . single_cat_title( '', false ) . $current_after . $delimiter . $shop_link;\n\t\t }\n\t\t */\n\t\t\n\t\t} elseif ( x_is_product_tag() ) {\n\n\t\t if ( $is_ltr ) {\n\t\t\techo $shop_link . $delimiter . $current_before . single_tag_title( '', false ) . $current_after;\n\t\t } else {\n\t\t\techo $current_before . single_tag_title( '', false ) . $current_after . $delimiter . $shop_link;\n\t\t }\n\n\t\t} elseif ( is_search() ) {\n\n\t\t echo $current_before . __( 'Search Results for ', '__x__' ) . '“' . get_search_query() . '”' . $current_after;\n\n\t\t} elseif ( is_singular( 'post' ) ) {\n\n\t\t if ( get_option( 'page_for_posts' ) == is_front_page() ) {\n\t\t\techo $current_before . $page_title . $current_after;\n\t\t } else {\n\t\t\tif ( $is_ltr ) {\n\t\t\t echo '<a href=\"' . get_permalink( get_option( 'page_for_posts' ) ) . '\">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;\n\t\t\t} else {\n\t\t\t echo $current_before . $page_title . $current_after . $delimiter . '<a href=\"' . get_permalink( get_option( 'page_for_posts' ) ) . '\">' . $blog_title . '</a>';\n\t\t\t}\n\t\t }\n\n\t\t} elseif ( x_is_portfolio() ) {\n\n\t\t echo $current_before . get_the_title() . $current_after;\n\n\t\t} elseif ( x_is_portfolio_item() ) {\n\n\t\t $link = x_get_parent_portfolio_link();\n\t\t $title = x_get_parent_portfolio_title();\n\n\t\t if ( $is_ltr ) {\n\t\t\techo '<a href=\"' . $link . '\">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;\n\t\t } else {\n\t\t\techo $current_before . $page_title . $current_after . $delimiter . '<a href=\"' . $link . '\">' . $title . '</a>';\n\t\t }\n\n\t\t} elseif ( x_is_product() ) {\n\n\t\t if ( $is_ltr ) {\n\t\t\techo $shop_link . $delimiter . $current_before . $page_title . $current_after;\n\t\t } else {\n\t\t\techo $current_before . $page_title . $current_after . $delimiter . $shop_link;\n\t\t }\n\t\t \n\t\t} elseif ( x_is_buddypress() ) {\n\n\t\t if ( bp_is_group() ) {\n\t\t\techo '<a href=\"' . bp_get_groups_directory_permalink() . '\">' . x_get_option( 'x_buddypress_groups_title', __( 'Groups', '__x__' ) ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;\n\t\t } elseif ( bp_is_user() ) {\n\t\t\techo '<a href=\"' . bp_get_members_directory_permalink() . '\">' . x_get_option( 'x_buddypress_members_title', __( 'Members', '__x__' ) ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;\n\t\t } else {\n\t\t\techo $current_before . x_buddypress_get_the_title() . $current_after;\n\t\t }\n\n\t\t} elseif ( x_is_bbpress() ) {\n\n\t\t remove_filter( 'bbp_no_breadcrumb', '__return_true' );\n\n\t\t if ( bbp_is_forum_archive() ) {\n\t\t\techo $current_before . bbp_get_forum_archive_title() . $current_after;\n\t\t } else {\n\t\t\techo bbp_get_breadcrumb();\n\t\t }\n\n\t\t add_filter( 'bbp_no_breadcrumb', '__return_true' );\n\n\t\t} elseif ( is_page() && ! $post_parent ) {\n\n\t\t echo $current_before . $page_title . $current_after;\n\n\t\t} elseif ( is_page() && $post_parent ) {\n\n\t\t $parent_id = $post_parent;\n\t\t $breadcrumbs = array();\n\n\t\t if ( is_rtl() ) {\n\t\t\techo $current_before . $page_title . $current_after . $delimiter;\n\t\t }\n\n\t\t while ( $parent_id ) {\n\t\t\t$page = get_page( $parent_id );\n\t\t\t$breadcrumbs[] = '<a href=\"' . get_permalink( $page->ID ) . '\">' . get_the_title( $page->ID ) . '</a>';\n\t\t\t$parent_id = $page->post_parent;\n\t\t }\n\n\t\t if ( $is_ltr ) {\n\t\t\t$breadcrumbs = array_reverse( $breadcrumbs );\n\t\t }\n\n\t\t for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {\n\t\t\techo $breadcrumbs[$i];\n\t\t\tif ( $i != count( $breadcrumbs ) -1 ) echo $delimiter;\n\t\t }\n\n\t\t if ( $is_ltr ) {\n\t\t\techo $delimiter . $current_before . $page_title . $current_after;\n\t\t }\n\n\t\t} elseif ( is_tag() ) {\n\n\t\t echo $current_before . single_tag_title( '', false ) . $current_after;\n\n\t\t} elseif ( is_author() ) {\n\n\t\t GLOBAL $author;\n\t\t $userdata = get_userdata( $author );\n\t\t echo $current_before . __( 'Posts by ', '__x__' ) . '“' . $userdata->display_name . $current_after . '”';\n\n\t\t} elseif ( is_404() ) {\n\n\t\t echo $current_before . __( '404 (Page Not Found)', '__x__' ) . $current_after;\n\n\t\t} elseif ( is_archive() ) {\n\n\t\t if ( x_is_shop() ) {\n\t\t\techo $current_before . $shop_title . $current_after;\n\t\t } else {\n\t\t\techo $current_before . __( 'Archives ', '__x__' ) . $current_after;\n\t\t }\n\n\t\t}\n\n\t echo '</div>';\n\n\t}\n}",
"function Forum_getForumBreadcrumbs(&$PAGEDATA, &$id) {\n\t$f=dbRow('select name,parent_id from forums where id='.$id);\n\t$c='» <a href=\"'.$PAGEDATA->getRelativeUrl().'?forum-f='.$id\n\t\t.'\">'.htmlspecialchars($f['name']).'</a>';\n\tif ($f['parent_id']) {\n\t\t$c=Forum_getForumBreadcrumbs($PAGEDATA, $f['parent_id']).' '.$c;\n\t}\n\treturn $c;\n}",
"function custom_breadcrumbs() {\n\n // Settings\n $breadcrums_id = 'breadcrumbs';\n $breadcrums_class = 'breadcrumbs';\n $home_title = 'TOP';\n\n // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. care_cat)\n $custom_taxonomy = 'knowledge-cat';\n\n // Get the query & post information\n global $post;\n\n // Do not display on the Home\n if ( !is_front_page() ) {\n\n // Build the breadcrums\n echo '<ul id=\"' . $breadcrums_id . '\" class=\"' . $breadcrums_class . '\">';\n\n // Home page\n echo '<li class=\"item-home\"><a class=\"bread-link bread-home\" href=\"' . get_home_url() . '\" title=\"' . $home_title . '\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i>' . $home_title . '</a></li>';\n\n if ( is_archive() && !is_tax() && !is_category() && !is_tag() ) {\n\n echo '<li class=\"item-current item-archive\"><strong class=\"bread-current bread-archive\">' . post_type_archive_title($prefix, false) . '</strong></li>';\n\n } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {\n\n // If post is a custom post type\n $post_type = get_post_type();\n\n // If it is a custom post type display name and link\n \t\t\t\t\t\t if($post_type == 'post') {\n $post_type_object = get_post_type_object($post_type);\n\n\t\t\t\t\t\t\t $post_type_archive_label = \"整骨院・接骨院・整体・鍼灸院\";\n\t\t\t\t\t\t\t\t$post_type_archive_link = get_category_link(get_category_by_slug('clinic')->term_id);\n\n echo '<li class=\"item-cat item-custom-post-type-' . $post_type . '\"><a class=\"bread-cat bread-custom-post-type-' . $post_type . '\" href=\"' . $post_type_archive_link . '\" title=\"' . $post_type_archive_label . '\">' . $post_type_archive_label . '</a></li>';\n }\n\n $custom_tax_name = get_queried_object()->name;\n echo '<li class=\"item-current item-archive\"><strong class=\"bread-current bread-archive\">' . $custom_tax_name . '</strong></li>';\n\n } else if ( is_single() ) {\n\n // If post is a custom post type\n $post_type = get_post_type();\n\n if( $post_type == 'post' ) {\n $clinic_cat = get_the_category(get_the_ID())[0];\n $post_type_archive_label = $clinic_cat->name;\n $post_type_archive_link = get_category_link($clinic_cat->term_id);\n echo '<li class=\"item-cat item-custom-post-type-' . $post_type . '\"><a class=\"bread-cat bread-custom-post-type-' . $post_type . '\" href=\"' . $post_type_archive_link . '\" title=\"' . $post_type_archive_label . '\">' . $post_type_archive_label . '</a></li>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if( $post_type == 'hikikomori' || $post_type == 'violence' || $post_type == 'voice' || $post_type == 'question' ) {\n $clinic_id = $clinic_page->ID;\n $clinic_cat = get_the_category($clinic_id)[0];\n $post_type_archive_label = $clinic_cat->name;\n $post_type_archive_link = get_category_link($clinic_cat->term_id);\n echo '<li class=\"item-cat item-custom-post-type-' . $post_type . '\"><a class=\"bread-cat bread-custom-post-type-' . $post_type . '\" href=\"' . $post_type_archive_link . '\" title=\"' . $post_type_archive_label . '\">' . $post_type_archive_label . '</a></li>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$post_type_object = get_post_type_object($post_type);\n\t\t\t\t\t\t\t\t$post_type_archive_label = $post_type_object->label;\n\t\t\t\t\t\t\t\t$post_type_archive_link = get_post_type_archive_link( $post_type );\n\t\t\t\t\t\t\t\techo '<li class=\"item-cat item-custom-post-type-' . $post_type . '\"><a class=\"bread-cat bread-custom-post-type-' . $post_type . '\" href=\"' . $post_type_archive_link . '\" title=\"' . $post_type_archive_label . '\">' . $post_type_archive_label . '</a></li>';\n\t\t\t\t\t\t\t}\n\n // Get post category info\n $category = get_the_category();\n\n if(!empty($category)) {\n\n // Get last category post is in\n $last_category = end(array_values($category));\n\n // Get parent any categories and create array\n $get_cat_parents = rtrim(get_category_parents($last_category->term_id, true, ','),',');\n $cat_parents = explode(',',$get_cat_parents);\n\n // Loop through parent categories and store in variable $cat_display\n $cat_display = '';\n // foreach($cat_parents as $parents) {\n \t\t\t\t\t\t\t\t// \t $cat_display .= '<li class=\"item-cat\">'.$parents.'</li>';\n // }\n \t\t\t\t\t\t\t\t $cat_display .= '<li class=\"item-cat\">'.$cat_parents[0].'</li>';\n\n }\n\n // If it's a custom post type within a custom taxonomy\n $taxonomy_exists = taxonomy_exists($custom_taxonomy);\n if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {\n\n $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );\n $cat_id = $taxonomy_terms[0]->term_id;\n $cat_nicename = $taxonomy_terms[0]->slug;\n $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);\n $cat_name = $taxonomy_terms[0]->name;\n\n }\n\n // Check if the post is in a category\n if(!empty($last_category)) {\n // echo $cat_display;\n echo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</strong></li>';\n\n // Else if post is in a custom taxonomy\n } else if(!empty($cat_id)) {\n\n echo '<li class=\"item-cat item-cat-' . $cat_id . ' item-cat-' . $cat_nicename . '\"><a class=\"bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $cat_nicename . '\" href=\"' . $cat_link . '\" title=\"' . $cat_name . '\">' . $cat_name . '</a></li>';\n echo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</strong></li>';\n\n } else {\n\n echo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</strong></li>';\n\n }\n\n } else if ( is_category() ) {\n\n // Category page\n echo '<li class=\"item-current item-cat\"><strong class=\"bread-current bread-cat\">' . single_cat_title('', false) . '</strong></li>';\n\n } else if ( is_page() ) {\n\n // Standard page\n if( $post->post_parent ){\n\n // If child page, get parents\n $anc = get_post_ancestors( $post->ID );\n\n // Get parents in the right order\n $anc = array_reverse($anc);\n\n // Parent page loop\n foreach ( $anc as $ancestor ) {\n $parents .= '<li class=\"item-parent item-parent-' . $ancestor . '\"><a class=\"bread-parent bread-parent-' . $ancestor . '\" href=\"' . get_permalink($ancestor) . '\" title=\"' . get_the_title($ancestor) . '\">' . get_the_title($ancestor) . '</a></li>';\n }\n\n // Display parent pages\n echo $parents;\n\n // Current page\n echo '<li class=\"item-current item-' . $post->ID . '\"><strong title=\"' . get_the_title() . '\"> ' . get_the_title() . '</strong></li>';\n\n } else {\n\n // Just display current page if not parents\n echo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\"> ' . get_the_title() . '</strong></li>';\n\n }\n\n } else if ( is_tag() ) {\n // Tag page\n // Get tag information\n $term_id = get_query_var('tag_id');\n $taxonomy = 'post_tag';\n $args = 'include=' . $term_id;\n $terms = get_terms( $taxonomy, $args );\n $get_term_id = $terms[0]->term_id;\n $get_term_slug = $terms[0]->slug;\n $get_term_name = $terms[0]->name;\n\n // Display the tag name\n echo '<li class=\"item-current item-tag-' . $get_term_id . ' item-tag-' . $get_term_slug . '\"><strong class=\"bread-current bread-tag-' . $get_term_id . ' bread-tag-' . $get_term_slug . '\">' . $get_term_name . '</strong></li>';\n\n } elseif ( is_day() ) {\n // Day archive\n\n // Year link\n echo '<li class=\"item-year item-year-' . get_the_time('Y') . '\"><a class=\"bread-year bread-year-' . get_the_time('Y') . '\" href=\"' . get_year_link( get_the_time('Y') ) . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . ' Archives</a></li>';\n\n // Month link\n echo '<li class=\"item-month item-month-' . get_the_time('m') . '\"><a class=\"bread-month bread-month-' . get_the_time('m') . '\" href=\"' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '\" title=\"' . get_the_time('M') . '\">' . get_the_time('M') . ' Archives</a></li>';\n\n // Day display\n echo '<li class=\"item-current item-' . get_the_time('j') . '\"><strong class=\"bread-current bread-' . get_the_time('j') . '\"> ' . get_the_time('jS') . ' ' . get_the_time('M') . ' Archives</strong></li>';\n\n } else if ( is_month() ) {\n\n // Month Archive\n\n // Year link\n echo '<li class=\"item-year item-year-' . get_the_time('Y') . '\"><a class=\"bread-year bread-year-' . get_the_time('Y') . '\" href=\"' . get_year_link( get_the_time('Y') ) . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . ' Archives</a></li>';\n\n // Month display\n echo '<li class=\"item-month item-month-' . get_the_time('m') . '\"><strong class=\"bread-month bread-month-' . get_the_time('m') . '\" title=\"' . get_the_time('M') . '\">' . get_the_time('M') . ' Archives</strong></li>';\n\n } else if ( is_year() ) {\n\n // Display year archive\n echo '<li class=\"item-current item-current-' . get_the_time('Y') . '\"><strong class=\"bread-current bread-current-' . get_the_time('Y') . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . ' Archives</strong></li>';\n\n } else if ( is_author() ) {\n\n // Auhor archive\n\n // Get the author information\n global $author;\n $userdata = get_userdata( $author );\n\n // Display author name\n echo '<li class=\"item-current item-current-' . $userdata->user_nicename . '\"><strong class=\"bread-current bread-current-' . $userdata->user_nicename . '\" title=\"' . $userdata->display_name . '\">' . 'Author: ' . $userdata->display_name . '</strong></li>';\n\n } else if ( get_query_var('paged') && !is_search() ) {\n\n // Paginated archives\n echo '<li class=\"item-current item-current-' . get_query_var('paged') . '\"><strong class=\"bread-current bread-current-' . get_query_var('paged') . '\" title=\"Page ' . get_query_var('paged') . '\">'.__('Page') . ' ' . get_query_var('paged') . '</strong></li>';\n\n } else if ( is_search() ) {\n\n // Search results page\n echo '<li class=\"item-current item-current-' . get_search_query() . '\"><strong class=\"bread-current bread-current-' . get_search_query() . '\" title=\"検索結果: ' . get_search_query() . '\">検索結果: ' . get_search_query() . '</strong></li>';\n\n } elseif ( is_404() ) {\n\n // 404 page\n echo '<li>' . 'Error 404' . '</li>';\n }\n echo '</ul>';\n }\n }",
"function tutv_get_parent_title( $page = null ) {\n global $post;\n\n if ( ! $page ) {\n $page = $post->ID;\n }\n\n\n if ( empty( $post->post_parent ) ) { // if there is no parent...\n return get_the_title( $post->ID ); // return the current page's title\n } else { // if there is a parent...\n return get_the_title( $post->post_parent ); // return the parent's title\n }\n}",
"function CreateBreadcrumb($categoryid, $tagtype='<a>') // or '<li>'\n{\n global $DB, $userinfo, $mainsettings, $pages_md_arr, $pages_parents_md_arr;\n\n if(!isset($pages_parents_md_arr)) return;\n $categories = array();\n $cat_id = $categoryid;\n while(!empty($cat_id))\n {\n if(isset($pages_md_arr[$cat_id]))\n {\n $cat = $pages_md_arr[$cat_id];\n array_unshift($categories, $cat);\n $cat_id = $cat['parentid'];\n }\n else\n {\n break;\n }\n }\n\n if(empty($categories))\n {\n return '';\n }\n\n $Breadcrumb = '';\n $count = count($categories);\n $idx = 1;\n // $categories is array with pages for a specific parent page\n foreach($categories as $category_arr)\n {\n // $category_arr contains actual page row (either cached or from DB)\n $category_name = strlen($category_arr['title'])?$category_arr['title']:$category_arr['name'];\n $category_link = strlen($category_arr['link']) ? $category_arr['link'] : RewriteLink('index.php?categoryid=' . $category_arr['categoryid']);\n $category_target = strlen($category_arr['target']) ? ' target=\"' . $category_arr['target'] . '\"' : '';\n switch($idx)\n {\n case 1 : $class ='class=\"first\" '; break;\n case $count: $class ='class=\"last\" '; break;\n default : $class = '';\n }\n //SD370: allow list items output\n //if($tagtype == '<li>') $Breadcrumb .= '<li>';\n if($category_arr['categoryid'] == $categoryid){\n $Breadcrumb .= '<li>'.$category_name.'</li>';\n }\n else{\n $Breadcrumb .= '<li><a '.$class.'href=\"'.$category_link.'\" '.$category_target.'>'.$category_name.'</a></li>';\n }\n //$Breadcrumb .= '<li><a '.$class.'href=\"'.$category_link.'\" '.$category_target.'>'.$category_name.'</a></li>';\n //if($tagtype == '<li>') $Breadcrumb .= '</li>';\n $idx++;\n }\n $Breadcrumb .= '<div style=\"clear:both;\"></div>'.\"\\n\";\n\n return $Breadcrumb;\n\n}",
"function bootstrapwp_breadcrumbs()\n{\n $home = 'Home'; // text for the 'Home' link\n $before = '<li class=\"active\">'; // tag before the current crumb\n $sep = '<span class=\"divider\">/</span>';\n $after = '</li>'; // tag after the current crumb\n\n if (!is_home() && !is_front_page() || is_paged()) {\n\n echo '<ul class=\"breadcrumb\">';\n\n global $post;\n $homeLink = home_url();\n echo '<li><a href=\"' . $homeLink . '\">' . $home . '</a> '.$sep. '</li> ';\n if (is_category()) {\n global $wp_query;\n $cat_obj = $wp_query->get_queried_object();\n $thisCat = $cat_obj->term_id;\n $thisCat = get_category($thisCat);\n $parentCat = get_category($thisCat->parent);\n if ($thisCat->parent != 0) {\n echo get_category_parents($parentCat, true, $sep);\n }\n echo $before . 'Archive by category \"' . single_cat_title('', false) . '\"' . $after;\n } elseif (is_day()) {\n echo '<li><a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time(\n 'Y'\n ) . '</a></li> ';\n echo '<li><a href=\"' . get_month_link(get_the_time('Y'), get_the_time('m')) . '\">' . get_the_time(\n 'F'\n ) . '</a></li> ';\n echo $before . get_the_time('d') . $after;\n } elseif (is_month()) {\n echo '<li><a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time(\n 'Y'\n ) . '</a></li> ';\n echo $before . get_the_time('F') . $after;\n } elseif (is_year()) {\n echo $before . get_the_time('Y') . $after;\n } elseif (is_single() && !is_attachment()) {\n if (get_post_type() != 'post') {\n $post_type = get_post_type_object(get_post_type());\n $slug = $post_type->rewrite;\n echo '<li><a href=\"' . $homeLink . '/' . $slug['slug'] . '/\">' . $post_type->labels->singular_name . '</a>'.$sep.'</li> ';\n echo $before . get_the_title() . $after;\n } else {\n $cat = get_the_category();\n $cat = $cat[0];\n echo '<li>'.get_category_parents($cat, true, $sep).'</li>';\n echo $before . get_the_title() . $after;\n }\n } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) {\n $post_type = get_post_type_object(get_post_type());\n echo $before . $post_type->labels->singular_name . $after;\n } elseif (is_attachment()) {\n $parent = get_post($post->post_parent);\n $cat = get_the_category($parent->ID);\n $cat = $cat[0];\n echo get_category_parents($cat, true, $sep);\n echo '<li><a href=\"' . get_permalink(\n $parent\n ) . '\">' . $parent->post_title . '</a></li> ';\n echo $before . get_the_title() . $after;\n\n } elseif (is_page() && !$post->post_parent) {\n echo $before . get_the_title() . $after;\n } elseif (is_page() && $post->post_parent) {\n $parent_id = $post->post_parent;\n $breadcrumbs = array();\n while ($parent_id) {\n $page = get_page($parent_id);\n $breadcrumbs[] = '<li><a href=\"' . get_permalink($page->ID) . '\">' . get_the_title(\n $page->ID\n ) . '</a>' . $sep . '</li>';\n $parent_id = $page->post_parent;\n }\n $breadcrumbs = array_reverse($breadcrumbs);\n foreach ($breadcrumbs as $crumb) {\n echo $crumb;\n }\n echo $before . get_the_title() . $after;\n } elseif (is_search()) {\n echo $before . 'Search results for \"' . get_search_query() . '\"' . $after;\n } elseif (is_tag()) {\n echo $before . 'Posts tagged \"' . single_tag_title('', false) . '\"' . $after;\n } elseif (is_author()) {\n global $author;\n $userdata = get_userdata($author);\n echo $before . 'Articles posted by ' . $userdata->display_name . $after;\n } elseif (is_404()) {\n echo $before . 'Error 404' . $after;\n }\n // if (get_query_var('paged')) {\n // if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()\n // ) {\n // echo ' (';\n // }\n // echo __('Page', 'bootstrapwp') . $sep . get_query_var('paged');\n // if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()\n // ) {\n // echo ')';\n // }\n // }\n\n echo '</ul>';\n\n }\n}",
"function apoc_get_buddypress_breadcrumbs( $args = array() ) {\n\t$bp_trail = array();\n\t\n\t// Directories \n\tif ( bp_is_directory() ) :\n\t\tif ( bp_is_activity_component() ) : $bp_trail[] = 'Recent Activity';\n\t\telseif ( bp_is_members_component() ) : $bp_trail[] = 'Members Directory';\n\t\telseif ( bp_is_groups_component() ) : $bp_trail[] = 'Groups and Guilds Directory';\n\t\telse : $bp_trail[] = ucfirst( bp_current_component() );\n\t\tendif;\n\t\n\t// Single Member \n\telseif ( bp_is_user() ) : \n\t\t$bp_trail[] = '<a href=\"'. bp_get_members_directory_permalink() .'\" title=\"Members Directory\">Members</a>';\n\t\t\n\t\t// Get the displayed user \n\t\tif ( bp_is_my_profile() ) : $bp_trail[] = '<a href=\"'.bp_displayed_user_domain().'\" title=\"Your Profile\">Your Profile</a>';\n\t\telse : $bp_trail[] = '<a href=\"'.bp_displayed_user_domain().'\" title=\"'.bp_get_displayed_user_fullname(). '\">' . bp_get_displayed_user_fullname() . '</a>';\n\t\tendif;\n\n\t\t// Display the current component \n\t\t$bp_trail[] = ucfirst( bp_current_component() );\n\t\t\n\t// Single Group \n\telseif ( bp_is_group() ) :\n\t\t\n\t\t// Get the displayed group \n\t\tif ( bp_get_current_group_id() == 1 ) :\n\t\t\t$bp_trail[] = '<a href=\"'. home_url() . '/entropy-rising/\">Entropy Rising</a>';\n\t\telse :\n\t\t\t$bp_trail[] = '<a href=\"'. bp_get_groups_directory_permalink() .'\">Guilds</a>';\n\t\t\t$bp_trail[] = '<a href=\"'. bp_get_group_permalink() .'\" title=\"'.bp_get_current_group_name().'\">'.bp_get_current_group_name().'</a>';\n\t\tendif;\n\t\t\n\t\t// Display the current group action for everything except forums \n\t\tif ( 'home' == bp_current_action() ) : $bp_trail[] = 'Profile';\n\t\telseif ( bp_current_action() != 'forum' ) : $bp_trail[] = ucfirst( bp_current_action() );\n\t\telseif ( bp_current_action() == 'forum' ) : \n\t\t\t$bp_trail = array_merge( $bp_trail, apoc_get_group_forum_breadcrumbs() );\n\t\tendif;\n\t\n\t// User Registration \n\telseif ( bp_is_register_page() ) :\n\t\t$bp_trail[] = 'New User Registration';\n\t\n\t// User Activation \n\telseif ( bp_is_activation_page() ) :\n\t\t$bp_trail[] = 'User Account Activation';\n\t\n\t// New Group Creation \n\telseif ( bp_is_group_create() ) :\n\t\t$bp_trail[] = 'Create New Group';\n\n \tendif;\n\treturn $bp_trail;\n}",
"public static function breadcrumbs() {\n\t\tif(!self::has_breadcrumbs()) return;\n\t\t?>\n\t\t\t<h6 id=\"header-breadcrumbs\">\n\t\t\t\t<?php dimox_breadcrumbs('·') ?>\n\t\t\t</h6>\n\t\t<?php\n\t}",
"function has_post_parent($post = \\null)\n {\n }",
"function thumbwhere_contentcollection_set_breadcrumb() {\n $breadcrumb = array(\n l(t('Home'), '<front>'),\n l(t('Administration'), 'admin'),\n l(t('ContentCollection'), 'admin/content'),\n l(t('ContentCollection'), 'admin/thumbwhere/thumbwhere_contentcollections'),\n );\n\n drupal_set_breadcrumb($breadcrumb);\n}",
"function bbpress_crumbs() {\n\t\t\n\t\t// Setup the trail\n\t\t$bbp_trail = array();\n\t\t\n\t\t// If it is the forum root, just display \"Forums\"\n\t\tif ( bbp_is_forum_archive() ) {\n\t\t\t$bbp_trail[] = 'Forums';\n\t\t\treturn $bbp_trail;\n\t\t}\n\t\t\t\t\t\n\t\t// Otherwise link to the root forums\n\t\t$bbp_trail[] = '<a href=\"' . get_post_type_archive_link( 'forum' ) . '\">Forums</a>';\n\t\t\n\t\t// Recent topics page \n\t\tif ( bbp_is_topic_archive() ) :\n\t\t\t$bbp_trail[] = 'Recent Topics';\n\t\t\n\t\t// Topic tag archives \n\t\telseif ( bbp_is_topic_tag() ) :\n\t\t\t$bbp_trail[] = bbp_get_topic_tag_name();\n\t\t\n\t\t// Editing a topic tag\n\t\telseif ( bbp_is_topic_tag_edit() ) :\n\t\t\t$bbp_trail[] = '<a href=\"' . bbp_get_topic_tag_link() . '\">' . bbp_get_topic_tag_name() . '</a>';\n\t\t\t$bbp_trail[] = 'Edit';\n\t\t\n\t\t// Single topic \n\t\telseif ( bbp_is_single_topic() ) :\t\n\t\t\t$topic_id = get_queried_object_id();\n\t\t\t$bbp_trail = array_merge( $bbp_trail, $this->trail_parents( bbp_get_topic_forum_id( $topic_id ) ) );\n\t\t\t$bbp_trail[] = bbp_get_topic_title( $topic_id );\n\t\t\t\t\n\t\t// If it's a split, merge, or edit, link back to the topic \n\t\telseif ( bbp_is_topic_split() || bbp_is_topic_merge() || bbp_is_topic_edit() ) :\n\t\t\t$topic_id = get_queried_object_id();\n\t\t\t$bbp_trail = array_merge( $bbp_trail, $this->trail_parents( $topic_id ) );\n\t\t\n\t\t\tif ( bbp_is_topic_split() ) \t\t: $bbp_trail[] = 'Split Topic';\n\t\t\telseif ( bbp_is_topic_merge() ) \t: $bbp_trail[] = 'Merge Topic';\n\t\t\telseif ( bbp_is_topic_edit() ) \t\t: $bbp_trail[] = 'Edit Topic';\n\t\t\tendif;\n\t\t\t\n\t\t// Single reply \n\t\telseif ( bbp_is_single_reply() ) :\n\t\t\t$reply_id = get_queried_object_id();\n\t\t\t$bbp_trail = array_merge( $bbp_trail, $this->trail_parents( bbp_get_reply_topic_id( $reply_id ) ) );\n\t\t\t$bbp_trail[] = bbp_get_reply_title( $reply_id );\n\t\t\n\t\t// Single reply edit \n\t\telseif ( bbp_is_reply_edit() ) :\n\t\t\t$reply_id = get_queried_object_id();\n\t\t\t$bbp_trail = array_merge( $bbp_trail, $this->trail_parents( bbp_get_reply_topic_id( $reply_id ) ) );\n\t\t\t$bbp_trail[] = 'Edit Reply';\n\t\t\t\n\t\t// Single forum \n\t\telseif ( bbp_is_single_forum() ) :\n\t\t\n\t\t\t// Get the queried forum ID and its parent forum ID. \n\t\t\t$forum_id \t\t\t= get_queried_object_id();\n\t\t\t$forum_parent_id \t= bbp_get_forum_parent_id( $forum_id );\n\t\t\t\n\t\t\t// Get the forum parents\n\t\t\tif ( 0 != $forum_parent_id) \n\t\t\t\t$bbp_trail = array_merge( $bbp_trail, $this->trail_parents( $forum_parent_id ) );\n\t\t\t\t\n\t\t\t// Give the forum title\n\t\t\t$bbp_trail[] = bbp_get_forum_title( $forum_id );\n\t\t\n\t\tendif;\n\t\t\n\t\t// Return the bbPress trail \n\t\treturn $bbp_trail;\n\t}",
"function previous_post_link($format = '« %link', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"function create_crumbs() {\n\t\n\t\t$breadcrumb = '';\n\t\t$args = $this->args;\n\n\t\t// Get the items based on page context \n\t\t$trail = $this->get_trail();\n\n\t\t// If items are found, build the trail \n\t\tif ( !empty( $trail ) && is_array( $trail ) ) {\n\n\t\t\t// Wrap the trail and add the 'Before' element\n\t\t\t$breadcrumb = '<'.$args['container']. ' class=\"breadcrumb-trail breadcrumbs\">';\n\t\t\t$breadcrumb .= ( !empty( $args['before'] ) ? '<span class=\"trail-before\">' . $args['before'] . '</span> ' : '' );\n\t\t\t\n\t\t\t// Adds the 'trail-end' class around last item \n\t\t\tarray_push( $trail, '<span class=\"trail-end\">' . array_pop( $trail ) . '</span>' );\n\t\t\t\n\t\t\t// Format the separator \n\t\t\t$separator = ( !empty( $args['separator'] ) ? $args['separator'] : '' );\n\n\t\t\t// Join the individual trail items into a single string \n\t\t\t$breadcrumb .= join( \" {$separator} \", $trail );\n\n\t\t\t// Close the breadcrumb trail containers \n\t\t\t$breadcrumb .= '</' . $args['container'] . '>';\n\t\t}\n\n\t\t// Return the formatted breadcrumbs\n\t\treturn $breadcrumb;\n\t}",
"protected function markBreadcrumb($node)\r\n {\r\n if(!$node) {\r\n return false;\r\n }\r\n while ($parent = $node->getParent()) {\r\n $parent->is_in_trail = true;\r\n $node = $parent;\r\n }\r\n }",
"protected function prepareCrumbs(){\n $crumbs = $this->_crumbs;\n $_helper = Mage::helper('rulletka/breadcrumbs');\n if($_helper->isItProductPage() /*&& !$_helper->hasCurrentCategory()*/){\n $catPath = $_helper->getCategoryPath();\n foreach($crumbs as $_crumbName => $_crumbInfo){\n if(strstr($_crumbName, 'product')){\n unset($crumbs[$_crumbName]);\n }\n }\n $crumbs += $catPath;\n }\n $this->_crumbs = $crumbs;\n }",
"private function bread_crumbs_parent($parent_id) {\n\t\tglobal $cats_tbl, $url_nms_tbl, $cities_tbl, $ste_cty_cat_tbl, $zip_cds_tbl, $api_load;\n\t\t\n\t\t$cats_tbl->get_db_vars($parent_id);\n\t\t\n\t\tif ($cats_tbl->url_name > 0) {\n\t\t\t$url_nms_tbl->get_db_vars($cats_tbl->url_name);\n\t\t}\n\t\t\n\t\t// assign link names\n\t\tif (isset($_GET['city'])) {\n\t\t\t// pull category city url name\n\t\t\t$ste_cty_cat_tbl->city_category_search($_GET['city'],$parent_id);\n\t\t\t\n\t\t\tif($ste_cty_cat_tbl->url_name > 0) {\n\t\t\t\t$url_nms_tbl->get_db_vars($ste_cty_cat_tbl->url_name);\n\t\t\t\t$link_name = $url_nms_tbl->url_name.'/';\n\t\t\t} else {\n\t\t\t\t$link_name = 'sections/category_results.deal?cat='.$cats_tbl->id.'&city='.$cities_tbl->id;\n\t\t\t}\n\t\t\t$link_text = $cities_tbl->city.', '.$cities_tbl->state;\n\t\t} elseif (isset($_SESSION['cur_zip'])) {\n\t\t\t$zip_cds_tbl->search($_SESSION['cur_zip']);\n\t\t\tif($cats_tbl->url_name > 0) {\n\t\t\t\t$url_nms_tbl->get_db_vars($cats_tbl->url_name);\n\t\t\t\t$link_name = htmlspecialchars($url_nms_tbl->url_name).'/';\n\t\t\t} else {\n\t\t\t\t$link_name = 'sections/category_results.deal?cat='.$cats_tbl->id;\n\t\t\t}\n\t\t\t$cities_tbl->get_db_vars($zip_cds_tbl->city_id);\n\t\t\t$link_text = $cities_tbl->city.', '.$cities_tbl->state;\n\t\t}\n\t\t\n\t\t// added 12/11/2009 to write urls for api system\n\t\tif ($api_load->status == 1) {\n\t\t\n\t\t\t$ste_cty_cat_tbl->city_category_search($_GET['city'],$parent_id);\n\t\t\t\n\t\t\tif($ste_cty_cat_tbl->url_name > 0) {\n\t\t\t\t$url_nms_tbl->get_db_vars($ste_cty_cat_tbl->url_name);\n\t\t\t\t$link_name = '?page='.urlencode($url_nms_tbl->url_name);\n\t\t\t} else {\n\t\t\t\t$link_name = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->bc[] = '<a href=\"'.SITE_URL.$link_name.'\">'.$link_text.' '.$cats_tbl->category_name.'</a>';\n\n\t\tif ($cats_tbl->parent_category_id > 0) $this->bread_crumbs_parent($cats_tbl->parent_category_id);\n\t\n\t}",
"protected function getBreadcrumbsPart()\n {\n ?>\n <?php\n //breadCrums\n $bc = $this->getBreadcrumbs();\n ?>\n\n <ol class=\"breadcrumb\" style=\"\">\n <?php\n\n foreach ($bc as $item):\n ?>\n <li><a href=\"<?= $item['url'] ?>\"><?= $item['name'] ?></a></li>\n <?php\n endforeach;\n ?>\n </ol>\n\n <?php\n }",
"function start_post_rel_link($title = '%title', $in_same_cat = \\false, $excluded_categories = '')\n {\n }",
"function dimox_breadcrumbs() {\n\n\t/* === OPTIONS === */\n\t$text['home'] = 'Home'; // text for the 'Home' link\n\t$text['category'] = 'Archive by Category \"%s\"'; // text for a category page\n\t$text['search'] = 'Search Results for \"%s\" Query'; // text for a search results page\n\t$text['tag'] = 'Posts Tagged \"%s\"'; // text for a tag page\n\t$text['author'] = 'Articles Posted by %s'; // text for an author page\n\t$text['404'] = 'Error 404'; // text for the 404 page\n\t$text['page'] = 'Page %s'; // text 'Page N'\n\t$text['cpage'] = 'Comment Page %s'; // text 'Comment Page N'\n\n\t$wrap_before = '<div class=\"breadcrumbs\">'; // the opening wrapper tag\n\t$wrap_after = '</div><!-- .breadcrumbs -->'; // the closing wrapper tag\n\t$sep = '>'; // separator between crumbs\n\t$sep_before = '<span class=\"sep\">'; // tag before separator\n\t$sep_after = '</span>'; // tag after separator\n\t$show_home_link = 1; // 1 - show the 'Home' link, 0 - don't show\n\t$show_on_home = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show\n\t$show_current = 1; // 1 - show current page title, 0 - don't show\n\t$before = '<span class=\"current\">'; // tag before the current crumb\n\t$after = '</span>'; // tag after the current crumb\n\t/* === END OF OPTIONS === */\n\n\tglobal $post;\n\tglobal $pre_path;\n\t$home_link = 'https://www.nationalarchives.gov.uk/';\n\t$link_before = '<span itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">';\n\t$link_after = '</span>';\n\t$link_attr = ' itemprop=\"url\"';\n\t$link_in_before = '<span itemprop=\"title\">';\n\t$link_in_after = '</span>';\n\t$link = $link_before . '<a href=\"%1$s\"' . $link_attr . '>' . $link_in_before . '%2$s' . $link_in_after . '</a>' . $link_after;\n\t$frontpage_id = get_option('page_on_front');\n\t$parent_id = $post->post_parent;\n\t$sep = ' ' . $sep_before . $sep . $sep_after . ' ';\n\n\tif (is_home() || is_front_page()) {\n\n\t\t// TNA additional breadcrumbs for front page\n\t\tglobal $pre_crumbs;\n\t\tif ( $pre_crumbs ) {\n\t\t\t$numItems = count($pre_crumbs);\n\t\t\t$i = 0;\n\t\t\tglobal $pre_crumbs_st;\n\t\t\tforeach ($pre_crumbs as $crumb_name => $crumb_path) {\n\t\t\t\tif (++$i === $numItems) {\n\t\t\t\t\t$pre_crumbs_st .= ' <span class=\"sep\">></span> <span>'. $crumb_name . '</span> ';\n\t\t\t\t} else {\n\t\t\t\t\t$pre_crumbs_st .= ' <span class=\"sep\">></span> <span><a href=\"' . $crumb_path . '\">'. $crumb_name . '</a></span> ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tglobal $pre_crumbs_st;\n\t\tif ($show_on_home) echo $wrap_before . '<a href=\"' . $home_link . '\">' . $text['home'] . '</a>';\n\t\tif ($pre_crumbs_st) echo $pre_crumbs_st;\n\t\tif ($show_on_home) echo $wrap_after;\n\n\t} else {\n\n\t\t// TNA additional breadcrumbs\n\t\tglobal $pre_crumbs;\n\t\tif ( $pre_crumbs ) {\n\t\t\tglobal $pre_crumbs_st;\n\t\t\tforeach ($pre_crumbs as $crumb_name => $crumb_path) {\n\t\t\t\t$pre_crumbs_st .= ' <span class=\"sep\">></span> <span><a href=\"' . $crumb_path . '\">'. $crumb_name . '</a></span> ';\n\t\t\t}\n\t\t}\n\n\t\techo $wrap_before;\n\n\t\tif ($show_home_link) echo sprintf($link, $home_link, $text['home']);\n\n\t\tif ( is_page() && !$parent_id ) {\n\t\t\tglobal $pre_crumbs_st;\n\t\t\tif ($pre_crumbs_st) echo $pre_crumbs_st;\n\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\n\t\t} elseif ( is_page() && $parent_id ) {\n\t\t\tglobal $pre_crumbs_st;\n\t\t\tif ($pre_crumbs_st) echo $pre_crumbs_st;\n\t\t\tif ($show_home_link) echo $sep;\n\t\t\tif ($parent_id != $frontpage_id) {\n\t\t\t\t$breadcrumbs = array();\n\t\t\t\twhile ($parent_id) {\n\t\t\t\t\t$page = get_page($parent_id);\n\t\t\t\t\tif ($parent_id != $frontpage_id) {\n\t\t\t\t\t\t$breadcrumbs[] = sprintf($link, str_replace(home_url(), $pre_path, get_permalink($page->ID)), get_the_title($page->ID));\n\t\t\t\t\t}\n\t\t\t\t\t$parent_id = $page->post_parent;\n\t\t\t\t}\n\t\t\t\t$breadcrumbs = array_reverse($breadcrumbs);\n\t\t\t\tfor ($i = 0; $i < count($breadcrumbs); $i++) {\n\t\t\t\t\techo $breadcrumbs[$i];\n\t\t\t\t\tif ($i != count($breadcrumbs)-1) echo $sep;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\n\t\t} elseif ( is_404() ) {\n\t\t\tglobal $pre_crumbs_st;\n\t\t\tif ($pre_crumbs_st) echo $pre_crumbs_st;\n\t\t\tif ($show_home_link && $show_current) echo $sep;\n\t\t\tif ($show_current) echo $before . $text['404'] . $after;\n\n\t\t} elseif ( is_single() && !is_attachment() ) {\n\t\t\tglobal $pre_crumbs_st, $pre_crumbs_post;\n\t\t\tif ($pre_crumbs_st) echo $pre_crumbs_st;\n\t\t\tif ($pre_crumbs_post) echo $pre_crumbs_post;\n\t\t\tif ($show_home_link) echo $sep;\n\t\t\tif ( get_post_type() != 'post' ) {\n\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\t$slug = $post_type->rewrite;\n\t\t\t\tprintf($link, $home_link . '/' . $slug['slug'] . '/', $post_type->labels->singular_name);\n\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t} else {\n\t\t\t\t$cat = get_the_category(); $cat = $cat[0];\n\t\t\t\t$cats = get_category_parents($cat, TRUE, $sep);\n\t\t\t\tif (!$show_current || get_query_var('cpage')) $cats = preg_replace(\"#^(.+)$sep$#\", \"$1\", $cats);\n\t\t\t\t$cats = preg_replace('#<a([^>]+)>([^<]+)<\\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);\n\t\t\t\t/*echo $cats;*/\n\t\t\t\tif ( get_query_var('cpage') ) {\n\t\t\t\t\techo $sep . sprintf($link, str_replace(home_url(), $pre_path, get_permalink()), get_the_title()) . $sep . $before . sprintf($text['cpage'], get_query_var('cpage')) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_current) echo $before . get_the_title() . $after;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo $wrap_after;\n\n\t}\n}",
"public function breadCrumbs()\n {\n $menu = Menu::new()\n ->addClass('m-subheader__breadcrumbs m-nav m-nav--inline')\n ->add(\n Link::toRoute('home', '<i class=\"m-nav__link-icon la la-home\"></i>')\n ->addClass('m-nav__link m-nav__link--icon')\n ->addParentClass('m-nav__item m-nav__item--home')\n )\n ;\n\n foreach ($this->crumbs($this->sections()) as $item) {\n $menu\n ->add(\n Html::raw('>')\n ->addParentClass('m-nav__separator')\n )\n ->add(\n Link::to($item['link'], '<span class=\"m-nav__link-text\">'. $item['text'] . '</span>')\n ->addClass('m-nav__link')\n ->addParentClass('m-nav__item')\n )\n ;\n }\n\n return $menu;\n }",
"function render_block_core_post_navigation_link($attributes, $content)\n {\n }",
"function thim_learnpress_breadcrumb() {\n\t\tif ( is_front_page() || is_404() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the query & post information\n\t\tglobal $post;\n\n\t\t// Build the breadcrums\n\t\techo '<ul itemprop=\"breadcrumb\" itemscope itemtype=\"http://schema.org/BreadcrumbList\" id=\"breadcrumbs\" class=\"breadcrumbs\">';\n\n\t\t// Home page\n\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_html( get_home_url() ) . '\" title=\"' . esc_attr__( 'Home', 'eduma' ) . '\"><span itemprop=\"name\">' . esc_html__( 'Home', 'eduma' ) . '</span></a></li>';\n\n\t\tif ( is_single() ) {\n\n\t\t\t$categories = get_the_terms( $post, 'course_category' );\n\n\t\t\tif ( get_post_type() == 'lp_course' ) {\n\t\t\t\t// All courses\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_course' ) ) . '\" title=\"' . esc_attr__( 'All courses', 'eduma' ) . '\"><span itemprop=\"name\">' . esc_html__( 'All courses', 'eduma' ) . '</span></a></li>';\n\t\t\t} else {\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_permalink( get_post_meta( $post->ID, '_lp_course', true ) ) ) . '\" title=\"' . esc_attr( get_the_title( get_post_meta( $post->ID, '_lp_course', true ) ) ) . '\"><span itemprop=\"name\">' . esc_html( get_the_title( get_post_meta( $post->ID, '_lp_course', true ) ) ) . '</span></a></li>';\n\t\t\t}\n\n\t\t\t// Single post (Only display the first category)\n\t\t\tif ( isset( $categories[0] ) ) {\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_term_link( $categories[0] ) ) . '\" title=\"' . esc_attr( $categories[0]->name ) . '\"><span itemprop=\"name\">' . esc_html( $categories[0]->name ) . '</span></a></li>';\n\t\t\t}\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr( get_the_title() ) . '\">' . esc_html( get_the_title() ) . '</span></li>';\n\n\t\t} else if ( is_tax( 'course_category' ) || is_tax( 'course_tag' ) ) {\n\t\t\t// All courses\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_course' ) ) . '\" title=\"' . esc_attr__( 'All courses', 'eduma' ) . '\"><span itemprop=\"name\">' . esc_html__( 'All courses', 'eduma' ) . '</span></a></li>';\n\n\t\t\t// Category page\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr( single_term_title( '', false ) ) . '\">' . esc_html( single_term_title( '', false ) ) . '</span></li>';\n\t\t} else if ( !empty( $_REQUEST['s'] ) && !empty( $_REQUEST['ref'] ) && ( $_REQUEST['ref'] == 'course' ) ) {\n\t\t\t// All courses\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_course' ) ) . '\" title=\"' . esc_attr__( 'All courses', 'eduma' ) . '\"><span itemprop=\"name\">' . esc_html__( 'All courses', 'eduma' ) . '</span></a></li>';\n\n\t\t\t// Search result\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr__( 'Search results for:', 'eduma' ) . ' ' . esc_attr( get_search_query() ) . '\">' . esc_html__( 'Search results for:', 'eduma' ) . ' ' . esc_html( get_search_query() ) . '</span></li>';\n\t\t} else {\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr__( 'All courses', 'eduma' ) . '\">' . esc_html__( 'All courses', 'eduma' ) . '</span></li>';\n\t\t}\n\n\t\techo '</ul>';\n\t}",
"function get_breadcrumb() {\n echo '<a href=\"'.home_url().'\" rel=\"nofollow\">Home</a>';\n if (is_category() || is_single()) {\n echo \" » \";\n the_category(' • ');\n if (is_single()) {\n echo \" » \";\n the_title();\n }\n } elseif (is_page()) {\n echo \" » \";\n echo the_title();\n }\n}",
"function get_breadcrumb() {\n\n // Outputs home breadcrumb \n echo '<a href=\"'.home_url().'\" rel=\"nofollow\">Home</a>';\n\n // Retrievea post categories.\n $category = get_the_category();\n\n // Checks if page template is category or single \n if (is_category() || is_single() || is_tag() || is_date()) {\n\n // Outputs arrows\n echo \" » \";\n\n // Checks if category array is not empty\n if ( $category[0] ) {\n // Outputs current category of post (NOTE: only outputs one category)\n echo '<a href=\"' . get_category_link( $category[0]->term_id ) . '\">' . $category[0]->cat_name . '</a>';\n }\n\n // Determines whether the query is for an existing single post\n if (is_single()) {\n // Outputs arrows \n echo \" » \";\n // Outputs the title\n the_title();\n }\n\n } \n}",
"public function getBreadCrumb()\n {\n $oContent = $this->getContent();\n\n $aPaths = array();\n $aPath = array();\n\n $aPath['title'] = $oContent->oxcontents__oxtitle->value;\n $aPath['link'] = $this->getLink();\n $aPaths[] = $aPath;\n\n return $aPaths;\n }",
"static function linked_posts($post_type, $key, $parent_id) {\n\t\treturn get_posts(array(\n\t\t'post_type' => $post_type,\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => $key,\n\t\t\t\t'value' => '\"' . $parent_id . '\"',\n\t\t\t\t'compare' => 'LIKE'\n\t\t\t)\n\t\t)\n\t\t));\n\t}",
"function buddypress_crumbs() {\n\t\n\t\t// Setup the trail\n\t\t$bp_trail = array();\n\t\t\t\t\n\t\t// User Profiles\n\t\tif ( bp_is_user() ) : \n\t\t\n\t\t\t// Your own profile\n\t\t\tif ( bp_is_my_profile() ) :\n\t\t\t\t $bp_trail[] = '<a href=\"'.bp_displayed_user_domain().'\" title=\"Your Profile\">Your Profile</a>';\n\t\t\t\t \n\t\t\t// Someone else's profile\n\t\t\telse :\n\t\t\t\t$bp_trail[] = '<a href=\"'. bp_get_members_directory_permalink() .'\" title=\"Members Directory\">Members</a>';\n\t\t\t\t$bp_trail[] = '<a href=\"'.bp_displayed_user_domain().'\" title=\"'.bp_get_displayed_user_fullname(). '\">' . bp_get_displayed_user_fullname() . '</a>';\n\t\t\tendif;\n\n\t\t\t// Display the current component\n\t\t\t$bp_trail[] = ucfirst( bp_current_component() );\n\t\t\t\n\t\t// Guild Profile\n\t\telseif ( bp_is_group() ) :\n\t\t\t$bp_trail[] = '<a href=\"'. bp_get_groups_directory_permalink() .'\" title=\"Groups and Guilds Directory\">Groups</a>';\n\t\t\t\n\t\t\t// Group Creation\n\t\t\tif ( bp_is_group_create() ) :\n\t\t\t\t$bp_trail[] = 'Create New Group';\n\t\t\t\t\n\t\t\t// Group Profile Home\n\t\t\telseif ( 'home' == bp_current_action() ) :\n\t\t\t\t$bp_trail[] = bp_get_group_name();\n\t\t\t\t\n\t\t\t// Group Profile Sub-Component\n\t\t\telseif ( bp_current_action() != 'forum' ) : \n\t\t\t\t$bp_trail[] = '<a href=\"'. bp_get_group_permalink() .'\" title=\"'.bp_get_current_group_name().'\">'.bp_get_current_group_name().'</a>';\n\t\t\t\t$bp_trail[] = ucfirst( bp_current_action() );\n\t\t\tendif;\n\t\t\t\t\n\t\t\tif ( bp_current_action() == 'forum' ) :\n\t\t\t\t$bp_trail[] = '<a href=\"'. bp_get_group_permalink() .'\" title=\"'.bp_get_current_group_name().'\">'.bp_get_current_group_name().'</a>';\n\t\t\t\t$bp_trail = array_merge( $bp_trail, $this->group_forum_crumbs() );\n\t\t\tendif;\n\n\t\t// Directories\n\t\telseif ( bp_is_directory() ) :\t\n\t\t\tif ( bp_is_activity_component() ) \t\t$bp_trail[] = 'Sitewide Activity';\n\t\t\telseif ( bp_is_members_component() )\t$bp_trail[] = 'Members Directory';\n\t\t\telseif ( bp_is_groups_component() )\t\t$bp_trail[] = 'Guilds Directory';\n\t\t\telse \t\t\t\t\t\t\t\t\t$bp_trail[] = ucfirst( bp_current_component() );\n\t\t\t\n\t\telseif ( bp_is_register_page() || bp_is_activation_page() ) :\n\t\t\t$bp_trail[] = 'New User Registration';\n\t\t\t\t\n\t\t// Backup Placeholder\n\t\telse :\n\t\t\t$bp_trail[] = '404 Page Not Found';\n\t\tendif;\n\t\t\t\n\t\t// Return the BuddyPress trail\n\t\treturn $bp_trail;\n\t}",
"function penci_get_post_parents( $post_id = '' ) {\n\t\t$list = array();\n\n\t\t// If no post ID is given, return an empty array.\n\t\tif ( empty( $post_id ) ) {\n\t\t\treturn $list;\n\t\t}\n\n\t\tdo {\n\t\t\t$list[] = $post_id;\n\n\t\t\t// Get next parent post\n\t\t\t$post = get_post( $post_id );\n\t\t\t$post_id = $post->post_parent;\n\t\t} while ( $post_id );\n\n\t\t// Reverse the array to put them in the proper order for the trail.\n\t\t$list = array_reverse( $list );\n\t\tarray_pop( $list );\n\n\t\treturn $list;\n\t}",
"protected function prepare_links( $item, $request ) {\n\t\t$links = array(\n\t\t\t'self' => array(\n\t\t\t\t'href' => rest_url( $this->get_namespace() . $this->get_path() . '/' . $item->get_id() ),\n\t\t\t),\n\t\t\t'collection' => array(\n\t\t\t\t'href' => rest_url( $this->get_namespace() . $this->get_path() ),\n\t\t\t),\n\t\t);\n\n\t\tif ( $item->get_parent_id() ) {\n\t\t\t$links['up'] = array(\n\t\t\t\t'href' => rest_url( $this->get_namespace() . $this->get_path() . '/' . $item->get_parent_id() ),\n\t\t\t);\n\t\t}\n\n\t\treturn $links;\n\t}",
"function arlo_fn_breadcrumbs() {\n \n // Settings\n $separator = '<span></span>';\n $breadcrums_id = 'breadcrumbs';\n $breadcrums_class = 'breadcrumbs';\n $home_title = esc_html__('Home', 'arlo');\n \n // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)\n $custom_taxonomy = '';\n \n // Get the query & post information\n global $post,$wp_query;\n \n // Do not display on the homepage\n if ( !is_front_page() ) {\n \t\n\t\techo '<div class=\"arlo_fn_breadcrumbs\">';\n // Build the breadcrums\n echo '<ul id=\"' . esc_attr($breadcrums_id) . '\" class=\"' . esc_attr($breadcrums_class) . '\">';\n \n // Home page\n echo '<li class=\"item-home\"><a class=\"bread-link bread-home\" href=\"' . get_home_url() . '\" title=\"' . esc_attr($home_title) . '\">' . esc_html($home_title) . '</a></li>';\n echo '<li class=\"separator separator-home\"> ' . wp_kses_post($separator) . ' </li>';\n \n if ( is_archive() && !is_tax() && !is_category() && !is_tag() ) {\n \n\t\t\t echo '<li class=\"item-current item-archive\"><span class=\"bread-current bread-archive\">' . esc_html__('Archive', 'arlo') . '</span></li>';\n\t\t\t\n } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {\n \n // If post is a custom post type\n $post_type = get_post_type();\n \n // If it is a custom post type display name and link\n if($post_type != 'post') {\n \n $post_type_object = get_post_type_object($post_type);\n $post_type_archive = get_post_type_archive_link($post_type);\n \n echo '<li class=\"item-cat item-custom-post-type-' . esc_attr($post_type) . '\"><a class=\"bread-cat bread-custom-post-type-' . esc_attr($post_type) . '\" href=\"' . esc_url($post_type_archive) . '\" title=\"' . esc_attr($post_type_object->labels->name) . '\">' . esc_attr($post_type_object->labels->name) . '</a></li>';\n echo '<li class=\"separator\"> ' . wp_kses_post($separator) . ' </li>';\n \n }\n \n $custom_tax_name = get_queried_object()->name;\n echo '<li class=\"item-current item-archive\"><span class=\"bread-current bread-archive\">' . esc_html($custom_tax_name) . '</span></li>';\n \n } else if ( is_single() ) {\n \n // If post is a custom post type\n $post_type = get_post_type();\n \n // If it is a custom post type display name and link\n if($post_type != 'post') {\n \n $post_type_object = get_post_type_object($post_type);\n $post_type_archive = get_post_type_archive_link($post_type);\n \n echo '<li class=\"item-cat item-custom-post-type-' . esc_attr($post_type) . '\"><a class=\"bread-cat bread-custom-post-type-' . esc_attr($post_type) . '\" href=\"' . esc_url($post_type_archive) . '\" title=\"' . esc_attr($post_type_object->labels->name) . '\">' . esc_html($post_type_object->labels->name) . '</a></li>';\n echo '<li class=\"separator\"> ' . wp_kses_post($separator) . ' </li>';\n \n }\n \n // Get post category info\n $category = get_the_category();\n \n if(!empty($category)) {\n \n // Get last category post is in\n $last_category = end(array_values($category));\n \n // Get parent any categories and create array\n $get_cat_parents = rtrim(get_category_parents($last_category->term_id, true, ','),',');\n $cat_parents = explode(',',$get_cat_parents);\n \n // Loop through parent categories and store in variable $cat_display\n $cat_display = '';\n foreach($cat_parents as $parents) {\n $cat_display .= '<li class=\"item-cat\">'.esc_html($parents).'</li>';\n $cat_display .= '<li class=\"separator\"> ' . esc_html($separator) . ' </li>';\n }\n \n }\n \n // If it's a custom post type within a custom taxonomy\n $taxonomy_exists = taxonomy_exists($custom_taxonomy);\n if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {\n $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );\n $cat_id = $taxonomy_terms[0]->term_id;\n $cat_nicename = $taxonomy_terms[0]->slug;\n $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);\n $cat_name = $taxonomy_terms[0]->name;\n \n }\n \n // Check if the post is in a category\n if(!empty($last_category)) {\n echo wp_kses_post($cat_display);\n echo '<li class=\"item-current item-' . esc_attr($post->ID) . '\"><span class=\"bread-current bread-' . esc_attr($post->ID) . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</span></li>';\n \n // Else if post is in a custom taxonomy\n } else if(!empty($cat_id)) {\n \n echo '<li class=\"item-cat item-cat-' . esc_attr($cat_id) . ' item-cat-' . esc_attr($cat_nicename) . '\"><a class=\"bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($cat_nicename) . '\" href=\"' . esc_url($cat_link) . '\" title=\"' . esc_attr($cat_name) . '\">' . esc_html($cat_name) . '</a></li>';\n echo '<li class=\"separator\"> ' . wp_kses_post($separator) . ' </li>';\n echo '<li class=\"item-current item-' . esc_attr($post->ID) . '\"><span class=\"bread-current bread-' . esc_attr($post->ID) . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</span></li>';\n \n } else {\n \n echo '<li class=\"item-current item-' . esc_attr($post->ID) . '\"><span class=\"bread-current bread-' . esc_attr($post->ID) . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</span></li>';\n \n }\n \n } else if ( is_category() ) {\n \n // Category page\n echo '<li class=\"item-current item-cat\"><span class=\"bread-current bread-cat\">' . single_cat_title('', false) . '</span></li>';\n \n } else if ( is_page() ) {\n \n // Standard page\n if( $post->post_parent ){\n \n // If child page, get parents \n $anc = get_post_ancestors( $post->ID );\n \n // Get parents in the right order\n $anc = array_reverse($anc);\n \n // Parent page loop\n if ( !isset( $parents ) ) $parents = null;\n foreach ( $anc as $ancestor ) {\n $parents .= '<li class=\"item-parent item-parent-' . esc_attr($ancestor) . '\"><a class=\"bread-parent bread-parent-' . esc_attr($ancestor) . '\" href=\"' . get_permalink($ancestor) . '\" title=\"' . get_the_title($ancestor) . '\">' . get_the_title($ancestor) . '</a></li>';\n $parents .= '<li class=\"separator separator-' . esc_attr($ancestor) . '\"> ' . wp_kses_post($separator) . ' </li>';\n }\n \n // Display parent pages\n echo wp_kses_post($parents);\n \n // Current page\n echo '<li class=\"item-current item-' . esc_attr($post->ID) . '\"><span title=\"' . get_the_title() . '\"> ' . get_the_title() . '</span></li>';\n \n } else {\n \n // Just display current page if not parents\n echo '<li class=\"item-current item-' . esc_attr($post->ID) . '\"><span class=\"bread-current bread-' . esc_attr($post->ID) . '\"> ' . get_the_title() . '</span></li>';\n \n }\n \n } else if ( is_tag() ) {\n \n // Tag page\n \n // Get tag information\n $term_id = get_query_var('tag_id');\n $taxonomy = 'post_tag';\n $args = 'include=' . $term_id;\n $terms = get_terms( $taxonomy, $args );\n $get_term_id = $terms[0]->term_id;\n $get_term_slug = $terms[0]->slug;\n $get_term_name = $terms[0]->name;\n \n // Display the tag name\n echo '<li class=\"item-current item-tag-' . esc_attr($get_term_id) . ' item-tag-' . esc_attr($get_term_slug) . '\"><span class=\"bread-current bread-tag-' . esc_attr($get_term_id) . ' bread-tag-' . esc_attr($get_term_slug) . '\">' . esc_html($get_term_name) . '</span></li>';\n \n } elseif ( is_day() ) {\n \n // Day archive\n \n // Year link\n echo '<li class=\"item-year item-year-' . get_the_time('Y') . '\"><a class=\"bread-year bread-year-' . get_the_time('Y') . '\" href=\"' . get_year_link( get_the_time('Y') ) . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . esc_html__(' Archives', 'arlo').'</a></li>';\n echo '<li class=\"separator separator-' . get_the_time('Y') . '\"> ' . wp_kses_post($separator) . ' </li>';\n \n // Month link\n echo '<li class=\"item-month item-month-' . get_the_time('m') . '\"><a class=\"bread-month bread-month-' . get_the_time('m') . '\" href=\"' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '\" title=\"' . get_the_time('M') . '\">' . get_the_time('M') . esc_html__(' Archives', 'arlo').'</a></li>';\n echo '<li class=\"separator separator-' . get_the_time('m') . '\"> ' . wp_kses_post($separator) . ' </li>';\n \n // Day display\n echo '<li class=\"item-current item-' . get_the_time('j') . '\"><span class=\"bread-current bread-' . get_the_time('j') . '\"> ' . get_the_time('jS') . ' ' . get_the_time('M') . esc_html__(' Archives', 'arlo').'</span></li>';\n \n } else if ( is_month() ) {\n \n // Month Archive\n \n // Year link\n echo '<li class=\"item-year item-year-' . get_the_time('Y') . '\"><a class=\"bread-year bread-year-' . get_the_time('Y') . '\" href=\"' . get_year_link( get_the_time('Y') ) . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . esc_html__(' Archives', 'arlo').'</a></li>';\n echo '<li class=\"separator separator-' . get_the_time('Y') . '\"> ' . wp_kses_post($separator) . ' </li>';\n \n // Month display\n echo '<li class=\"item-month item-month-' . get_the_time('m') . '\"><span class=\"bread-month bread-month-' . get_the_time('m') . '\" title=\"' . get_the_time('M') . '\">' . get_the_time('M') . esc_html__(' Archives', 'arlo').'</span></li>';\n \n } else if ( is_year() ) {\n \n // Display year archive\n echo '<li class=\"item-current item-current-' . get_the_time('Y') . '\"><span class=\"bread-current bread-current-' . get_the_time('Y') . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . esc_html__(' Archives', 'arlo').'</span></li>';\n \n } else if ( is_author() ) {\n \n // Auhor archive\n \n // Get the author information\n global $author;\n $userdata = get_userdata( $author );\n \n // Display author name\n echo '<li class=\"item-current item-current-' . esc_attr($userdata->display_name) . '\"><span class=\"bread-current bread-current-' . esc_attr($userdata->display_name) . '\" title=\"' . esc_attr($userdata->display_name) . '\">' . esc_html__('Author: ', 'arlo') . esc_html($userdata->display_name) . '</span></li>';\n \n } else if ( get_query_var('paged') ) {\n \n // Paginated archives\n echo '<li class=\"item-current item-current-' . get_query_var('paged') . '\"><span class=\"bread-current bread-current-' . get_query_var('paged') . '\" title=\"'.esc_attr__('Page ', 'arlo') . get_query_var('paged') . '\">'.esc_html__('Page', 'arlo') . ' ' . get_query_var('paged') . '</span></li>';\n \n } else if ( is_search() ) {\n \n // Search results page\n echo '<li class=\"item-current item-current-' . get_search_query() . '\"><span class=\"bread-current bread-current-' . get_search_query() . '\" title=\"'.esc_attr__('Search results for: ', 'arlo'). get_search_query() . '\">' .esc_html__('Search results for: ', 'arlo') . get_search_query() . '</span></li>';\n \n } elseif ( is_404() ) {\n \n // 404 page\n echo '<li>' . esc_html__('Error 404', 'arlo') . '</li>';\n }\n \n echo '</ul>';\n\t\techo '</div>';\n \n }\n \n}",
"function register_block_core_post_navigation_link()\n {\n }",
"public function process(BreadcrumbableModelInterface $entity): Breadcrumb;",
"function get_previous_posts_page_link()\n {\n }",
"public static function previous_post_link () : void\n {\n add_filter(\"previous_post_link\", function ($output) {\n $previousPost = get_adjacent_post();\n \n if ($previousPost !== '') {\n $previousPostTitle = strlen(get_the_title($previousPost)) > 30 ? substr(get_the_title($previousPost), 0, 30) . \"...\" : get_the_title($previousPost);\n\n $output = '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\">' . get_the_post_thumbnail($previousPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><span class=\"lnr text-white ti-arrow-left\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"detials\">';\n $output .= '<p>' . __(\"Prev Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><h4>' . $previousPostTitle . '</h4></a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n \n return $output;\n });\n }",
"function get_previous_posts_link($label = \\null)\n {\n }",
"function get_previous_post_link($format = '« %link', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"function breadcrumbs(BreadcrumbsParams $params) : string\n{\n $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n // This one removes 'oildiscovery' from the path in development environment\n $path = array_diff($path, ['oildiscovery']);\n\n // This is the base URL\n $base = URLROOT;\n \n\n // Initialize a temporary array with our breadcrumbs. (starting with our home page, which will be the base URL)\n $breadcrumbs = array(\"<a class='breadcrumbs__link' href=\\\"$base\\\">$params->home</a>\");\n\n // Find out the index for the last value in our path array\n $pathkeys = array_keys($path);\n $last = end($pathkeys);\n // Build the rest of the breadcrumbs\n foreach ($path as $key => $crumb) {\n // \"title\" is the text that will be displayed (strip out .php and turn '_' into a space)\n $title = ucwords(str_replace(array('.php', '_'), array('', ' '), $crumb));\n\n // If we are not on the last index, then display an <a> tag\n if ($key != $last) {\n $breadcrumbs[] = \"<a class='breadcrumbs__link' href=\\\"$base\\\\$crumb\\\">$title</a>\";\n }\n // Otherwise, just display the title (minus)\n if ($key === $last) {\n // If the last index is an integer then replace the post id with post title\n if (is_numeric($crumb)) {\n $breadcrumbs[] = $params->post_title;\n } else {\n $breadcrumbs[] = $title;\n }\n }\n\n if (is_numeric($crumb)) {\n }\n }\n\n // Build our temporary array (pieces of bread) into one big string :)\n return implode($params->separator, $breadcrumbs);\n}",
"function posts_nav_link($sep = '', $prelabel = '', $nxtlabel = '')\n {\n }"
] | [
"0.6725706",
"0.66608423",
"0.66464376",
"0.65852034",
"0.63035524",
"0.62786984",
"0.625521",
"0.62461954",
"0.6217614",
"0.6188396",
"0.61750376",
"0.61437464",
"0.60688186",
"0.6011111",
"0.5995619",
"0.59258574",
"0.5907754",
"0.590312",
"0.5887999",
"0.58823663",
"0.5872809",
"0.5858474",
"0.5848676",
"0.58149195",
"0.58083534",
"0.57717806",
"0.5739366",
"0.57381207",
"0.5731175",
"0.57309055",
"0.56951064",
"0.56942785",
"0.5674216",
"0.56661665",
"0.5653082",
"0.5650617",
"0.56494254",
"0.56317985",
"0.56285065",
"0.56266814",
"0.56194305",
"0.56155384",
"0.56134963",
"0.55978703",
"0.55978703",
"0.5590888",
"0.55849767",
"0.55799717",
"0.5576335",
"0.5560609",
"0.55575",
"0.5551486",
"0.5545397",
"0.5529613",
"0.5528921",
"0.55196893",
"0.55151707",
"0.55061984",
"0.5503123",
"0.5490505",
"0.54859215",
"0.54854923",
"0.54717034",
"0.5467622",
"0.5467302",
"0.5425144",
"0.5413149",
"0.5410718",
"0.5406361",
"0.5403042",
"0.5401426",
"0.5399101",
"0.53856397",
"0.5382962",
"0.5373241",
"0.53717554",
"0.536228",
"0.5359616",
"0.53512913",
"0.5349895",
"0.53420043",
"0.53386766",
"0.53373116",
"0.5333385",
"0.533005",
"0.5330038",
"0.53181607",
"0.5317855",
"0.5314204",
"0.529504",
"0.52887857",
"0.52869946",
"0.52863103",
"0.52835566",
"0.5276003",
"0.526277",
"0.5261557",
"0.5260593",
"0.5257304",
"0.52340657"
] | 0.5961281 | 15 |
Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress function get_category_parents() but handles any type of taxonomy. | public function termParents($term_id, $taxonomy)
{
$ancestors = get_ancestors($term_id, $taxonomy, 'taxonomy');
array_unshift($ancestors, $term_id);
if (count($ancestors)) {
$ancestors = array_reverse($ancestors);
foreach ($ancestors as $ancestor) {
$term = get_term($ancestor, $taxonomy);
$this->crumbs[] = new Crumb(esc_attr($term->name), get_term_link($term->term_id, $taxonomy));
}
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function penci_get_term_parents( $term_id = '', $taxonomy = 'category' ) {\n\t\t$list = array();\n\n\t\t// If no term ID or taxonomy is given, return an empty array.\n\t\tif ( empty( $term_id ) || empty( $taxonomy ) ) {\n\t\t\treturn $list;\n\t\t}\n\n\t\tdo {\n\t\t\t$list[] = $term_id;\n\n\t\t\t// Get next parent term\n\t\t\t$term = get_term( $term_id, $taxonomy );\n\t\t\t$term_id = $term->parent;\n\t\t} while ( $term_id );\n\n\t\t// Reverse the array to put them in the proper order for the trail.\n\t\t$list = array_reverse( $list );\n\t\tarray_pop( $list );\n\n\t\treturn $list;\n\t}",
"function wp_get_term_taxonomy_parent_id($term_id, $taxonomy)\n {\n }",
"function x_get_taxonomy_parents( $id, $taxonomy = 'category', $link = false, $separator = '/', $nicename = false, $visited = array() ) {\n\n\t$chain = '';\n\t$parent = get_term( $id, $taxonomy );\n\n\tif ( is_wp_error( $parent ) )\n\t\treturn $parent;\n\n\tif ( $nicename )\n\t\t$name = $parent->slug;\n\telse\n\t\t$name = $parent->name;\n\n\tif ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n\t\t$visited[] = $parent->parent;\n\t\t$chain .= x_get_taxonomy_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n\t}\n\n\tif ( $link )\n\t\t$chain .= '<a href=\"' . esc_url( get_term_link( $parent,$taxonomy ) ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n\telse\n\t\t$chain .= $name.$separator;\n\n\treturn $chain;\n}",
"function get_term_parents( $id, $taxonomy, $link = false, $separator = '/', $nicename = false, $visited = [] )\n {\n $chain = '';\n $parent = get_term( $id, $taxonomy );\n\n if ( is_wp_error( $parent ) ) {\n return $parent;\n }\n\n if ( $nicename ) {\n $name = $parent->slug;\n } else {\n $name = $parent->cat_name;\n }\n\n if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n $visited[] = $parent->parent;\n $chain .= get_term_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n }\n\n if ( $link ) {\n $chain .= '<a href=\"' . get_term_link( $parent->term_id, $taxonomy ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n } else {\n $chain .= $name.$separator;\n }\n\n return $chain;\n }",
"private function get_parent_categories(){\r\n\t\t$rslt = array();\r\n\r\n\t\t$args = array('taxonomy'=>'market_reports_category', 'hide_empty' => false, 'parent'=>0, 'orderby'=>'term_id','order'=>'ASC');\r\n\t\t$parent_cats = get_terms($args);\r\n\t\t// $rslt['-1'] = 'None';\r\n\t\t// wp_die(var_dump($parent_cats));\r\n\t\tforeach ($parent_cats as $key => $parent_cat) {\r\n\t\t\t$rslt[$parent_cat->term_id] = $parent_cat->name;\r\n\t\t}\r\n\t\t// rsort($rslt);\r\n\t\treturn $rslt;\r\n\t}",
"function ctools_term_parent_ctools_relationships() {\n return array(\n 'title' => t('Term parent'),\n 'keyword' => 'parent_term',\n 'description' => t('Adds a taxonomy term parent from a term context.'),\n 'required context' => new ctools_context_required(t('Term'), 'term'),\n 'context' => 'ctools_term_parent_context',\n 'settings form' => 'ctools_term_parent_settings_form',\n 'settings form validate' => 'ctools_term_parent_settings_form_validate',\n );\n return $args;\n}",
"function trail_parents( $post_id ) {\n\t\t$parent_trail = array();\n\t\t$parents = array();\n\n\t\t// Verify we have something to work with \n\t\tif ( empty( $post_id ) ) return $parent_trail;\n\t\t\n\t\t// Loop through post IDs until we run out of parents \n\t\twhile ( $post_id ) {\n\t\t\t$page \t\t= get_page( $post_id );\n\t\t\t$parents[] = '<a href=\"' . get_permalink( $post_id ) . '\" title=\"' . esc_attr( get_the_title( $post_id ) ) . '\">' . get_the_title( $post_id ) . '</a>';\n\t\t\t\n\t\t\t// Load the grandparent page if there is one \n\t\t\t$post_id\t = $page->post_parent;\n\t\t}\n\t\n\t\t// If parents were found, reverse their order\n\t\tif ( !empty( $parents ) ) \n\t\t\t$parent_trail = array_reverse( $parents );\n\t\t\t\n\t\t// Return the trail\n\t\treturn $parent_trail;\n\t}",
"public function get_parents(){\n\t\treturn $this->master->parent_list_construct();\n\t}",
"private function get_taxonomy_parents( $id, $taxonomy = 'category', $link = false, $separator = '/', $nicename = false, $visited = array() ) {\n\t\t$chain = '';\n\t\t$parent = &get_term( $id, $taxonomy, OBJECT, 'raw');\n\t\tif ( is_wp_error( $parent ) ) {\n\t\t\treturn $parent;\n\t\t}\n\n\t\tif ( $nicename ){\n\t\t\t$name = $parent->slug;\n\t\t}else {\n\t\t\t$name = $parent->name;\n\t\t}\n\n\t\tif ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n\t\t\t$visited[] = $parent->parent;\n\t\t\t$chain .= $this->get_taxonomy_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n\t\t}\n\n\t\tif ( $link ) {\n\t\t\t$chain .= '<a href=\"' . get_term_link( $parent->term_id, $taxonomy ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n\t\t}else {\n\t\t\t$chain .= $name.$separator;\n\t\t}\n\t\treturn $chain;\n\t}",
"public function getParents()\n\t{\n\t\tif ($this->get('parents'))\n\t\t{\n\t\t\treturn $this->get('parents');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->setParents();\n\t\t}\n\t}",
"function _get_term_hierarchy($taxonomy)\n {\n }",
"public function getParents()\n {\n \t$currentPos = trim($this->getPosition());\n \tif($currentPos === '' || $currentPos === '1')\n \t\treturn array($this);\n \t\n \t$posArray = array();\n \t$length = strlen($currentPos);\n \tfor($i = 0; $i < ($length - 1) / self::POS_LENGTH_PER_LEVEL ; $i++)\n \t{\n \t\t$posArray[] = trim(substr($currentPos, 0, ($i * self::POS_LENGTH_PER_LEVEL) + 1));\n \t}\n \treturn self::getAllByCriteria('rootId = ? and position in (' . implode(',', array_fill(0, count($posArray), '?')) . ')', array_merge(array($this->getRoot()->getId()), $posArray), false, null, DaoQuery::DEFAUTL_PAGE_SIZE, array('position' => 'asc'));\n }",
"function ctools_term_parent_context($context, $conf) {\n // If unset it wants a generic, unfilled context, which is just NULL.\n if (empty($context->data)) {\n return ctools_context_create_empty('term');\n }\n\n if (isset($context->data)) {\n $result = db_query('SELECT t1.* FROM {taxonomy_term_hierarchy} t1 INNER JOIN {taxonomy_term_hierarchy} t2 ON t1.tid = t2.parent WHERE t2.tid = :tid', array(':tid' => $context->data->tid))->fetchAssoc();\n\n // If top level term, keep looking up until we see a top level.\n if ($conf['type'] == 'top') {\n // If looking for top level, and there are no parents at all, make sure\n // the current term is the 'top level'.\n if (empty($result)) {\n $result['tid'] = $context->data->tid;\n }\n while (!empty($result['parent'])) {\n $result = db_query('SELECT * FROM {taxonomy_term_hierarchy} WHERE tid = :tid', array(':tid' => $result['parent']))->fetchAssoc();\n }\n }\n\n // Load the term.\n if ($result) {\n $term = taxonomy_term_load($result['tid']);\n return ctools_context_create('term', $term);\n }\n }\n}",
"public function getAllParents()\n {\n $parents = array();\n\n $parent = $this;\n\n while ($parent = $parent->getParent()) {\n $parents[] = $parent;\n }\n\n return $parents;\n }",
"function getParentCategories(){\n\t\t$categoryId = JRequest::getInt('category_id', 0);\n\t\t$parents = array();\t\t\n\t\twhile ( true ){\n\t\t\t$sql = \"SELECT id, name, parent FROM #__eb_categories WHERE id = \".$categoryId.\" AND published=1\";\n\t\t\t$this->_db->setQuery( $sql );\n\t\t\t$row = $this->_db->loadObject();\n\t\t\tif ($row){\n\t\t\t\t$sql = 'SELECT COUNT(*) FROM #__eb_categories WHERE parent='.$row->id.' AND published = 1 ';\n\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t$total = $this->_db->loadResult();\n\t\t\t\t$row->total_children = $total ;\t\t\t\t\n\t\t\t\t$parents[] = $row ;\n\t\t\t\t$categoryId = $row->parent ;\t\t\t\t\n\t\t\t} else {\t\t\t\t\t\t\t\n\t\t\t \tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $parents ;\t\n\t}",
"function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}",
"public function findParents($selector) {\r\n\t\t$parents = array();\r\n\t\t$cur = $this->getParent();\r\n\t\twhile($cur) {\r\n\t\t\tif ($cur->matchSelector($selector)) {\r\n\t\t\t\t$parents[] = $cur;\r\n\t\t\t}\r\n\t\t\t$cur = $cur->getParent();\r\n\t\t}\r\n\t\treturn $parents;\r\n\t}",
"function term_is_ancestor_of($term1, $term2, $taxonomy)\n {\n }",
"public function getParents()\n {\n return $this->parents;\n }",
"function find_parents($term,$type)\n{\n\topenConn();\n\n\tswitch($type)\n\t{\n\t\tcase 'o':\n\t\t\t$query=\"SELECT p from locality WHERE o = '$term'\";\n\t\t\t$query_result=mysql_query($query);\n\t\t\t$num=mysql_num_rows($query_result);\n\t\t\t$loc[0] = mysql_result($query_result,0);\n\t\tbreak;\n\n\t\tcase 'm':\n\t\t\t$query=\"SELECT * from locality WHERE m = '$term'\";\n\t\t\t$query_result=mysql_query($query);\n\t\t\t$num=mysql_num_rows($query_result);\n\t\t\t$loc[0] = mysql_result($query_result,0,p);\n\t\t\t$loc[1] = mysql_result($query_result,0,o);\n\t\tbreak;\n\n\t\tcase 't':\n\t\t\t$query=\"SELECT * from locality WHERE t = '$term'\";\n\t\t\t$query_result=mysql_query($query);\n\t\t\t$num=mysql_num_rows($query_result);\n\t\t\t$loc[0] = mysql_result($query_result,0,p);\n\t\t\t$loc[1] = mysql_result($query_result,0,o);\n\t\t\t$loc[2] = mysql_result($query_result,0,m);\n\t\tbreak;\n\t}\n\t\t\t\n\n\tmysql_close();\n\treturn $loc;\n}",
"function penci_get_post_parents( $post_id = '' ) {\n\t\t$list = array();\n\n\t\t// If no post ID is given, return an empty array.\n\t\tif ( empty( $post_id ) ) {\n\t\t\treturn $list;\n\t\t}\n\n\t\tdo {\n\t\t\t$list[] = $post_id;\n\n\t\t\t// Get next parent post\n\t\t\t$post = get_post( $post_id );\n\t\t\t$post_id = $post->post_parent;\n\t\t} while ( $post_id );\n\n\t\t// Reverse the array to put them in the proper order for the trail.\n\t\t$list = array_reverse( $list );\n\t\tarray_pop( $list );\n\n\t\treturn $list;\n\t}",
"public function getParents()\n {\n return $this->Parents_->filter(function ($persona) {\n return $persona->approved;\n })->pluckNamed('Parent');\n }",
"function get_parent_cats($context) {\n global $COURSE;\n\n switch ($context->contextlevel) {\n // a category can be the parent of another category\n // there is no limit of depth in this case\n case CONTEXT_COURSECAT:\n static $categoryparents = null; // cache for parent categories\n if (!isset($categoryparents)) {\n $categoryparents = array();\n }\n if (array_key_exists($context->instanceid, $categoryparents)) {\n return $categoryparents[$context->instanceid];\n }\n\n if (!$cat = get_record('course_categories','id',$context->instanceid)) {\n //error?\n return array();\n }\n $parents = array();\n while (!empty($cat->parent)) {\n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $cat->parent)) {\n debugging('Incorrect category parent');\n break;\n }\n $parents[] = $catcontext->id;\n $cat = get_record('course_categories','id',$cat->parent);\n }\n return $categoryparents[$context->instanceid] = array_reverse($parents);\n break;\n \n // a course always fall into a category, unless it's a site course\n // this happens when SITEID == $course->id\n // in this case the parent of the course is site context\n case CONTEXT_COURSE:\n static $courseparents = null; // cache course parents\n if (!isset($courseparents)) {\n $courseparents = array();\n }\n if (array_key_exists($context->instanceid, $courseparents)) {\n return $courseparents[$context->instanceid];\n }\n\n if (count($courseparents) > 1000) {\n $courseparents = array(); // max cache size when looping through thousands of courses\n }\n if ($context->instanceid == SITEID) {\n return $courseparents[$context->instanceid] = array(); // frontpage course does not have parent cats\n }\n if ($context->instanceid == $COURSE->id) {\n $course = $COURSE;\n } else if (!$course = get_record('course', 'id', $context->instanceid)) {\n //error?\n return array();;\n }\n\n if (empty($course->category)) {\n // this should not happen\n return $courseparents[$context->instanceid] = array();\n }\n \n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $course->category)) {\n debugging('Incorect course category');\n return array();;\n }\n\n return $courseparents[$context->instanceid] = array_merge(get_parent_cats($catcontext), array($catcontext->id)); //recursion :-)\n break;\n\n default:\n // something is very wrong!\n return array();\n break;\n }\n}",
"public function get_parents()\n {\n $hierarchy = array();\n $hierarchy[] = $this;\n\n $d = dirname($this->path);\n while (strlen($d) >= strlen(App::config('src_path')))\n {\n $hierarchy[] = new folder($d);\n $d = dirname($d);\n }\n\n return array_reverse($hierarchy);\n }",
"protected final function get_ancestors()\n\t{\n\t\tif(!isset($this->parent))\n\t\t\treturn array($this->id);\n\t\t\t\n\t\treturn array_merge($this->parent->get_ancestors(),array($this->id));\t\n\t}",
"public function getParents();",
"private function getParents($channel, array $parents = array())\n {\n try {\n $parent = $channel->getParent();\n } catch (EntityNotFoundException $exception) {\n $this->addViolationAt($this->parent->getPrimaryKey(), $this->entity->getPrimaryKey(), null, 'Parent #%s of object #%s does not exist');\n return $parents;\n }\n\n if (!is_null($parent)) {\n $parents[] = $parent;\n if ($parent !== $this->parent) {\n return $this->getParents($parent, $parents);\n }\n }\n return $parents;\n }",
"public function get_parent_links()\n\t {\n\t\t $parent = array();\n\t\t foreach ($this->get_links() as $link)\n\t\t {\n\t\t\t if (!$link->get_parent_id())\n\t\t\t {\n\t\t\t\t $parent[] = $link;\n\t\t\t }\n\t\t }\n\t\t return $parent;\n\t }",
"public function getParents() {}",
"public function ancestors()\r\n {\r\n $return = array();\r\n \r\n $item = $this;\r\n while (!empty($item->parent))\r\n {\r\n $clone = (new static())->load(array(\r\n '_id' => new \\MongoId((string) $item->parent)\r\n ));\r\n unset($item);\r\n if (!empty($clone->id))\r\n {\r\n array_unshift($return, $clone);\r\n if (!empty($clone->parent))\r\n {\r\n $item = $clone;\r\n }\r\n }\r\n }\r\n \r\n return $return;\r\n }",
"public static function parentCategories()\n {\n return Category::with('children')\n ->orderBy('priority')\n ->where([\n 'category_type' => static::class,\n 'parent_id' => null,\n ])->get();\n }",
"public function parents()\n\t{\n\t\t$stack = new \\SplStack;\n\t\t\n\t\t$working = $this;\n\t\twhile ( $working = $working->parent() )\n\t\t{\n\n\t\t\tif( ! $working instanceof \\IPS\\Node\\Model )\n\t\t\t{\n\t\t\t\treturn $stack;\n\t\t\t}\n\n\t\t\t$stack->push( $working );\n\t\t}\n\t\t\n\t\treturn $stack;\n\t}",
"function getAncestors () {\r\n\t\t$ancestors = array ($this);\r\n\t\t$parent = $this->_parent;\r\n\t\twhile ($parent != null) {\r\n\t\t\tarray_unshift ($ancestors, $parent);\r\n\t\t\t$parent = $parent->getParent();\r\n\t\t}\r\n\t\treturn $ancestors;\r\n\t}",
"function getAncestors () {\r\n\t\t$ancestors = array ($this);\r\n\t\t$parent = $this->_parent;\r\n\t\twhile ($parent != null) {\r\n\t\t\tarray_unshift ($ancestors, $parent);\r\n\t\t\t$parent = $parent->getParent();\r\n\t\t}\r\n\t\treturn $ancestors;\r\n\t}",
"protected function getTreePathParents(): array\n {\n $primaryKey = $this->owner->getAttribute($this->ownerParentIdAttribute);\n if ($primaryKey === null) {\n return [];\n }\n\n return $this->treePathModelClass::find()\n ->byChildId($primaryKey)\n ->orderBy('child_level')\n ->all();\n }",
"public function getParents() {\n\t\tif ($this->_parents === null) {\n\t\t\t$this->_parents = array();\n\t\t\t$command = 'show --pretty=\"format:%P\" '.$this->hash;\n\t\t\tforeach(explode(' ',$this->branch->repository->run($command)) as $commitHash) {\n\t\t\t\tif (!empty($commitHash)) {\n\t\t\t\t\t$this->_parents[$commitHash] = $this->branch->getCommit($commitHash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_parents;\n\t}",
"function get_post_ancestors($post)\n {\n }",
"function GetPossibleParents($parentid = 0, $prefix = '')\n\t{\n\t\t$parents = array();\n\t\t$sql = 'SELECT * FROM pages WHERE parentid=' . (int)$parentid;\n\t\tif ($this->id)\n\t\t{\t$sql .= ' AND NOT pageid=' . $this->id;\n\t\t}\n\t\t$sql .= ' ORDER BY pageorder';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif (!$this->subpages[$row['pageid']])\n\t\t\t\t{\t$parents[$row['pageid']] = $prefix . $this->InputSafeString($row['pagetitle']);\n\t\t\t\t\tif ($children = $this->GetPossibleParents($row['pageid'], '- ' . $prefix))\n\t\t\t\t\t{\tforeach ($children as $pid=>$ptitle)\n\t\t\t\t\t\t{\t$parents[$pid] = $ptitle;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $parents;\n\t\t\n\t}",
"function ancestors() {\n\t\t$ancestors = array();\n\t\tfor ($here = $this ; $here !== NULL ; $here = $here->_parent) {\n\t\t\t$ancestors []= $here;\n\t\t}\n\t\treturn array_reverse($ancestors);\n\t}",
"public function getAllParentsIds()\n\t{\n\t\t$parentsIds = array();\n\t\tif ($this->getParentId()){\n\t\t\t$parentsIds[] = $this->getParentId();\n\t\t\t$parentsIds = array_merge($parentsIds, $this->getParentCategory()->getAllParentsIds());\n\t\t}\n\n\t\treturn $parentsIds;\n\t}",
"public function getParents()\n {\n if (!isset($this->_objects['Parents'])) {\n $this->_objects['Parents'] = $this->_getRepository()->fetchParents($this->id);\n }\n\n return $this->_objects['Parents'];\n }",
"public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }",
"private function parents() {\n return array_map(array($this, 'page_info_from_id'), $this->parent_ids());\n }",
"function acf_get_field_ancestors($field)\n{\n}",
"public function get_ancestors()\n {\n $ancestors = array();\n $aid = $this->get_parent_id();\n while ($aid > 0)\n {\n $ancestor = DataManager::retrieve_by_id(ContentObject::class_name(), $aid);\n $ancestors[] = $ancestor;\n $aid = $ancestor->get_parent_id();\n }\n\n return $ancestors;\n }",
"public function getParents()\r\n\t{\r\n\t\treturn $this->parentNodes;\r\n\t}",
"function get_ancestors($object_id = 0, $object_type = '', $resource_type = '')\n {\n }",
"public static function getTermAncestors($term_id, $taxonomy)\n {\n $ancestors = array();\n foreach (get_ancestors($term_id, $taxonomy) as $term_id) {\n array_push($ancestors, get_term_by('id', $term_id, $taxonomy));\n }\n\n return $ancestors;\n }",
"function get_all_nodes_belong_to_taxonomy_hierarchy($tids) {\n if (is_array($tids)) {\n foreach ($tids as $key => $value) {\n if ($value <= 0) {\n return \"Please Enter a valid taxonomy term id set\";\n }\n }\n }\n if (is_array($tids) && !empty($tids)) {\n foreach ($tids as $key => $value) {\n $term = taxonomy_term_load($value);\n $hierarchical_terms_object[] = taxonomy_get_tree($term->vid, $term->tid);\n }\n $flat_terms_object = multitosingle($hierarchical_terms_object);\n if (is_array($flat_terms_object) && !empty($flat_terms_object)) {\n foreach ($flat_terms_object as $key => $value) {\n $flat_tids[] = $value->tid;\n }\n $flat_tids[] = $tids;\n return array_unique(get_nodes_directly_mapped_to_term($flat_tids));\n }\n else {\n $flat_tids = $tids;\n return array_unique(get_nodes_directly_mapped_to_term($flat_tids));\n }\n }\n elseif (!is_array($tids) && $tids > 0) {\n $flat_tids = $tids;\n return get_all_nodes_belong_to_taxonomy_hierarchy(array($flat_tids));\n }\n else {\n return \"Please Enter a valid term id\";\n }\n}",
"public function testTermQueryWithParentTerm() {\n\n\t\t$parent_id = $this->createTermObject( [\n\t\t\t'name' => 'Parent Category',\n\t\t\t'taxonomy' => 'category',\n\t\t] );\n\n\t\t$child_id = $this->createTermObject( [\n\t\t\t'name' => 'Child category',\n\t\t\t'taxonomy' => 'category',\n\t\t\t'parent' => $parent_id,\n\t\t] );\n\n\t\t$global_parent_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $parent_id );\n\t\t$global_child_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $child_id );\n\n\t\t$query = \"\n\t\tquery {\n\t\t\tcategory(id: \\\"{$global_child_id}\\\") {\n\t\t\t\tid\n\t\t\t\tcategoryId\n\t\t\t\tancestors {\n\t\t\t\t\tid\n\t\t\t\t\tcategoryId\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\";\n\n\t\t$actual = do_graphql_request( $query );\n\n\t\t$expected = [\n\t\t\t'data' => [\n\t\t\t\t'category' => [\n\t\t\t\t\t'id' => $global_child_id,\n\t\t\t\t\t'categoryId' => $child_id,\n\t\t\t\t\t'ancestors' => [\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'id' => $global_parent_id,\n\t\t\t\t\t\t\t'categoryId' => $parent_id,\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\n\t\t$this->assertEquals( $expected, $actual );\n\n\t}",
"public function parents ($selector = null) { \r\n\t\t\r\n\t\t$list = new XDTNodeList();\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\twhile (!$node->isSameNode($node->ownerDocument)) {\r\n\t\t\t\t$node = $node->parentNode;\r\n\t\t\t\t\r\n\t\t\t\tif (!($node instanceof DOMElement)) continue;\r\n\t\t\t\t\r\n\t\t\t\t$list->add($node);\r\n\t\t\t}\r\n\t\t\t\r\n\t\tif (!isset($selector)) return $list;\r\n\t\t\r\n\t\t$this->xml_query = $list;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}",
"function get_field_parents($field_name, $id)\n{\n global $post;\n\n for($i=1; ; $i++) {\n $field_value = get_field($field_name, $id);\n\n if($field_value) {\n // Field data was found, return it!\n return $field_value;\n break;\n\n } else {\n\n // No field data was found\n if($id == $post->post_parent){\n // Current page is top parent\n break;\n } else {\n // Current page doesnt have a value, check parent page\n $id = $post->post_parent;\n $field_value = get_field($field_name, $id);\n return $field_value;\n break;\n }\n\n }\n\n }\n\n}",
"public function getAncestors($role)\n {\n $parents = array();\n $model = Pi::model('acl_inherit');\n $rowset = $model->select(array('child' => $role));\n\n foreach ($rowset as $row) {\n $parents[] = $row->parent;\n $sub = $this->getAncestors($row->parent);\n $parents = array_unique(array_merge($parents, $sub));\n }\n\n return $parents;\n }",
"function get_primary_category($id = 0) {\n\t\n\t$category = get_the_terms($id, 'category');\t\t\n\t$parent_cat = \"\";\n\t\n\tforeach((array) $category as $term) {\n\t\tif($term->slug == \"featured\" || $term->slug == \"spotlight-featured\" || $term->slug == \"spotlight-left\" || $term->slug == \"spotlight-right\") { continue; }\n\t\t\n\t\t// if the first term is parent, return it\n\t\tif($term->parent == 0) {\n\t\t\t$parent_cat = $term;\n\t\t\tbreak;\n\t\t} else {\n\t\t\t// if the category isn't the parent, find the parent\n\t\t\t$parent_cat = get_parent_of_category($term->term_id); \n\t\t}\n\t}\n\t\t\n\treturn $parent_cat;\t\t\n}",
"function get_parent_post_type ($post) {\n /* Get an array of Ancestors and Parents if they exist */\n\t$parents = get_post_ancestors( $post->ID );\n /* Get the top Level post->ID count base 1, array base 0 so -1 */ \n\t$id = ($parents) ? $parents[count($parents)-1]: $post->ID;\n\t/* Get the parent type */\n $parent = get_post( $id );\n\t$type = $parent->post_type;\n\t\nreturn $type;\n}",
"public function getParents()\n {\n return Menu::where('locale', getCurrentSessionAppLocale())\n ->where(function ($query){\n $query->whereNull('parent_slug')\n ->orWhere('parent_slug', '');\n })\n ->orderBy('menu_order', 'asc')\n ->get();\n }",
"public static function get_parents( $post, $include_current = false, $reverse = false ) {\n\t\tif ( is_numeric( $post ) ) {\n\t\t\t$post = get_post( $post );\n\n\t\t} else if ( isset( $post->ID ) ) {\n\t\t\t$post = get_post( $post->ID );\n\t\t}\n\n\t\tif ( ! $post ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$tree = $include_current ? array( $post ) : array();\n\n\t\tif ( $post->post_parent ) {\n\t\t\t$tmp_post = $post;\n\n\t\t\twhile ( $tmp_post->post_parent ) {\n\t\t\t\t$tmp_post = get_post( $tmp_post->post_parent );\n\n\t\t\t\tif ( ! $tmp_post ) {\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else {\n\t\t\t\t\t$tree[] = $tmp_post;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $reverse ? $tree : array_reverse( $tree );\n\t}",
"function _get_post_ancestors(&$post)\n {\n }",
"function lb_get_root_category($product_id) {\n $prod_terms = get_the_terms( $product_id, 'product_cat' );\n \n foreach ($prod_terms as $prod_term) {\n // gets product cat id\n $product_cat_id = $prod_term->term_id;\n\n // gets an array of all parent category levels\n $product_parent_categories_all_hierachy = get_ancestors( $product_cat_id, 'product_cat' ); \n \n // This cuts the array and extracts the last set in the array\n $last_parent_cat = array_slice($product_parent_categories_all_hierachy, -1, 1, true);\n \n foreach($last_parent_cat as $last_parent_cat_value){\n // $last_parent_cat_value is the id of the most top level category, can be use whichever one like\n }\n }\n \n $category = &get_category((int)$last_parent_cat_value);\n \n if(isset($category->slug)) {\n return $category->slug;\n } else {\n return '';\n } \n}",
"function acf_location_rule_match_category_ancestor($match, $rule, $options) {\n $terms = 0;\n if (array_key_exists('post_taxonomy', $options)){\n $terms = $options['post_taxonomy'];\n }\n $data = acf_decode_taxonomy_term($rule['value']);\n $term = get_term_by('slug', $data['term'], $data['taxonomy']);\n if (!$term && is_numeric($data['term'])) {\n $term = get_term_by('id', $data['term'], $data['taxonomy']);\n }\n // this is where it's different than ACf\n // get terms so we can look at the parents\n if (is_array($terms)) {\n foreach ($terms as $index => $term_id) {\n $terms[$index] = get_term_by('id', intval($term_id), $term->taxonomy);\n }\n }\n if (!is_array($terms) && $options['post_id']) {\n $terms = wp_get_post_terms(intval($options['post_id']), $term->taxonomy);\n }\n if (!is_array($terms)) {\n $terms = array($terms);\n }\n $terms = array_filter($terms);\n $match = false;\n // collect a list of ancestors\n $ancestors = array();\n if (count($terms)) {\n foreach ($terms as $term_to_check) {\n $ancestors = array_merge(get_ancestors($term_to_check->term_id, $term->taxonomy));\n } // end foreach terms\n } // end if\n // see if the rule matches any term ancetor\n if ($term && in_array($term->term_id, $ancestors)) {\n $match = true;\n }\n\n if ($rule['operator'] == '!=') {\n // reverse the result\n $match = !$match;\n }\n return $match;\n}",
"public function getMenuParents()\n {\n return $this->db->select('*')->from('admin_menu')->where('parent',0)->get()->result_array();\n }",
"function get_all_parents( $lft, $rgt)\n\t{\n\n\t\tif ( ! isset($this->cache['parents'][$this->tree_id][$lft.'|'.$rgt] ))\n\t\t{\n\n\t\t\tee()->db->select('node_id')\n\t\t\t\t\t\t ->where('lft <', $lft)\n\t\t\t\t\t\t ->where('rgt >', $rgt)\n\t\t\t\t\t\t ->group_by(\"lft\")\n\t\t\t\t\t\t ->order_by(\"lft\", \"asc\");\n\n\t\t\t$data = ee()->db->get( $this->tree_table )->result_array();\n\n\t\t\t$return = array();\n\t\t\t\n\t\t\tforeach($data as $parent)\n\t\t\t{\n\t\t\t\t$return[] = $parent['node_id'];\n\t\t\t}\n\n\t\t\t$this->cache['parents'][$this->tree_id][$lft.'|'.$rgt] = $return;\n\n\t\t}\n\t\treturn $this->cache['parents'][$this->tree_id][$lft.'|'.$rgt];\n\n\t}",
"private function getCatParent() {\r\n $rCat = new Read;\r\n $rCat->ExeRead(\"ml_categories\", \"WHERE category_id = :id\", \"id={$this->Data['post_category']}\");\r\n if ($rCat->getResult()):\r\n return $rCat->getResult()[0]['category_parent'];\r\n else:\r\n return null;\r\n endif;\r\n }",
"public function taxonomy() {\n $parents = array_reverse( $this->get_all_parents( $this->id ) );\n $taxonomy = '';\n\n foreach ( $parents as $category ) {\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n $taxonomy .= $category->name;\n }\n\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n return $taxonomy . $this->name;\n }",
"public function getParentingKelas()\n {\n return $this->parenting_kelas;\n }",
"public function get_parents($request) {\n $doc = $this->get_doc( $request['id'] );\n\n if ( is_wp_error($doc) ) {\n return $doc;\n }\n\n // forcefully set the context\n $request['context'] = 'sidebar';\n\n $ancestors = [];\n $root = $parent = false;\n\n if ($doc->post_parent) {\n $ancestors = get_post_ancestors($doc->ID);\n $root = count($ancestors) - 1;\n $parent = $ancestors[$root];\n } else {\n $parent = $doc->ID;\n }\n\n $docs = get_pages( [\n 'order' => 'menu_order',\n 'child_of' => $parent,\n 'post_type' => 'docs',\n ] );\n\n $result = [];\n\n // add the parent by-default as the first element\n $parent_doc = ($parent == $doc->ID) ? $doc : get_post($parent);\n\n if ($parent_doc) {\n $data = $this->prepare_item_for_response($parent_doc, $request);\n $result[] = $this->prepare_response_for_collection($data);\n }\n\n // now, process the child\n foreach ($docs as $key => $doc) {\n $data = $this->prepare_item_for_response($doc, $request);\n $data = $this->set_pagination($data, $doc, $request);\n\n $result[] = $this->prepare_response_for_collection($data);\n }\n\n $response = rest_ensure_response($result);\n\n return $response;\n }",
"public function getParents()\n\t{\n\t\tif ($this->_parents === null) {\n\t\t\t$this->_parents = array();\n\t\t\t$command = 'log --pretty=%P -n 1 '.$this->hash;\n\t\t\tforeach(explode(' ',$this->repository->run($command)) as $commitHash) {\n\t\t\t\tif (!empty($commitHash)) {\n\t\t\t\t\t$this->_parents[$commitHash] = $this->repository->getCommit($commitHash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_parents;\n\t}",
"public function ancestors($depth=null)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'<'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'>'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute),\n\t\t));\n\n\t\tif($depth!==null)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->levelAttribute).'>='.($owner->{$this->levelAttribute}+$depth));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner;\n\t}",
"public function get_admin_module_parents()\n\t{\n\t\t$this->db->where(array('module_user' => 1, 'module_parent' => 0));\n\t\t$this->db->order_by('module_position');\n\t\treturn $this->db->get('module');\n\t}",
"public function terms_clauses_multiple_parents( $pieces, $taxonomies, $args )\n {\n // Bail if we are not currently handling our specified taxonomy\n if (!in_array('nomenclature_beta', $taxonomies))\n return $pieces;\n\n // Check if our custom argument, 'wpse_parents' is set, if not, bail\n if (!isset ($args['wpse_parents'])\n || !is_array($args['wpse_parents'])\n )\n return $pieces;\n\n // If 'wpse_parents' is set, make sure that 'parent' and 'child_of' is not set\n if ($args['parent']\n || $args['child_of']\n )\n return $pieces;\n\n // Validate the array as an array of integers\n $parents = array_map('intval', $args['wpse_parents']);\n\n // Loop through $parents and set the WHERE clause accordingly\n $where = [];\n foreach ($parents as $parent) {\n // Make sure $parent is not 0, if so, skip and continue\n if (0 === $parent)\n continue;\n\n $where[] = \" tt.parent = '$parent'\";\n }\n\n if (!$where)\n return $pieces;\n\n $where_string = implode(' OR ', $where);\n $pieces['where'] .= \" AND ( $where_string ) \";\n\n return $pieces;\n }",
"function get_parent_of_category($category_id) {\n\twhile($category_id) {\n\t\t$category = get_category($category_id); // get the object for the catid\n\t\t$category_id = $category->category_parent; // assign parent ID (if exists) to $catid\n\t\t\n\t\t$category_parent = $category->cat_ID;\n\t}\n\treturn get_category($category_parent);\n}",
"public function getAllCatparentsAdminQB()\n {\n $qb = $this->getEntityManager()\n ->createQueryBuilder()\n ->select('c')\n ->from('ShopBundle:Catparent', 'cp');\n\n return $qb;\n }",
"function iwj_walk_tax_tree($terms, $parent = 0, $terms_request, $limit, $filter_name, $taxonomy) {\n $i = 0;\n foreach ( $terms as $term ) {\n if( isset($term->parent) && $term->parent == $parent ) {\n $style = '';\n if($parent == 0){\n $i++;\n $style = ( $i > $limit ) ? 'style=\"display:none\"' : '';\n }\n $checked = ( iwj_filter_tax_checked( $term->term_id, $terms_request ) != '' ) ? 'open' : '';\n $child_terms = get_term_children( $term->term_id, $taxonomy );\n ?>\n\n <li <?php echo ( $parent == 0 )? $style : '' ?> class=\"iwj-input-checkbox <?php echo $taxonomy;?> tax-tree\" data-order=\"<?php echo $term->total_post; ?>\">\n <a href=\"javascript:void(0)\" class=\"item-tax\">\n <div class=\"filter-name-item\">\n <input type=\"checkbox\" <?php echo iwj_filter_tax_checked( $term->term_id, $terms_request ); ?> name=\"<?php echo $taxonomy;?>[]\"\n id=\"iwjob-filter-<?php echo $filter_name ?>-cbx-<?php echo $term->term_id; ?>\" class=\"iwjob-filter-<?php echo $filter_name ?>-cbx\"\n value=\"<?php echo $term->term_id; ?>\" data-title=\"<?php echo $term->name; ?>\">\n <label for=\"iwjob-filter-<?php echo $filter_name ?>-cbx-<?php echo $term->term_id; ?>\">\n <?php echo $term->name; ?></label>\n <?php if( count($child_terms) > 0 ) {\n echo '<span class=\"iwj-show-sub-cat '. $checked .'\"> <i class=\"fa fa-angle-down\"></i></span>';\n } ?>\n </div>\n <span id=\"iwj-count-<?php echo $term->term_id; ?>\" class=\"iwj-count\">\n <?php echo $term->total_post; ?>\n </span>\n </a>\n <?php\n\n if ( count( $child_terms ) > 0 ) :\n $checked = false;\n foreach ($terms_request as $term_request){\n foreach ($child_terms as $term_id){\n if($term_request == $term_id){\n $checked = true;\n break;\n }\n }\n\n if($checked == true){\n break;\n }\n }\n ?>\n <ul class=\"sub-cat <?php echo $checked ? 'open' : ''; ?>\">\n <?php iwj_walk_tax_tree( $terms, $term->term_id, $terms_request, $limit, $filter_name , $taxonomy); ?>\n </ul>\n <?php endif ?>\n </li>\n <?php\n }\n }\n if ( $i > $limit) : ?>\n <li class=\"show-more\">\n <a class=\"theme-color\" href=\"#\">\n <?php echo __('Show more', 'iwjob'); ?>\n </a>\n </li>\n <li class=\"show-less\" style=\"display: none\">\n <a class=\"theme-color\" href=\"#\">\n <?php echo __('Show less', 'iwjob'); ?>\n </a>\n </li>\n <?php endif;\n}",
"public function ancestorsNames()\n {\n $ancestors = explode('/', array_get($this->route, 'path'));\n\n if (empty($ancestors)) {\n return null;\n }\n\n array_pop($ancestors);\n\n return array_map('ucfirst', $ancestors);\n }",
"public function getAncestors();",
"function kilman_get_parent_positions ($questions) {\n $parentpositions = array();\n foreach ($questions as $question) {\n foreach ($question->dependencies as $dependency) {\n $dependquestion = $dependency->dependquestionid;\n if (isset($dependquestion) && $dependquestion != 0) {\n $childid = $question->id;\n $parentpos = $questions[$dependquestion]->position;\n\n if (!isset($parentpositions[$childid])) {\n $parentpositions[$childid] = $parentpos;\n }\n if (isset ($parentpositions[$childid]) && $parentpos > $parentpositions[$childid]) {\n $parentpositions[$childid] = $parentpos;\n }\n }\n }\n }\n return $parentpositions;\n}",
"function dev_sort_terms_hierarchicaly( &$cats = array(), &$into = array(), $parentId = 0 ) {\n\n\tforeach ( $cats as $i => $cat ) {\n\t\tif ( $cat->parent == $parentId ) {\n\t\t\t$into[ $cat->term_id ] = $cat;\n\t\t\tunset( $cats[ $i ] );\n\t\t}\n\t}\n\n\tforeach ( $into as $topCat ) {\n\t\t$topCat->children = array();\n\t\tdev_sort_terms_hierarchicaly( $cats, $topCat->children, $topCat->term_id );\n\t}\n}",
"function recursive_parent_child_relations($xml_object, $relations, $parent = \"\")\n{\n\t$parent = mb_strtolower($parent, 'UTF-8'); //lowering parent name\n\n\t$count_array = array(); // empty array will be used to count all of the occurrences of sub elements in table\n\n\tforeach($xml_object as $key => $sub_xml_object)\n\t{\n\t\t$key = mb_strtolower($key, 'UTF-8');\n\n\t\tif(!array_key_exists($key, $relations)) // if there is no evidence of key in relations, create an empty one\n\t\t\t$relations[$key] = array();\n\n\t\tif(!empty($parent)) //counting occurrences of same children under parental table\n\t\t{\n\t\t\tif(array_key_exists($key, $count_array))\n\t\t\t\t$count_array[$key]++;\n\t\t\telse\n\t\t\t\t$count_array[$key] = 1;\n\t\t}\n\n\t\t$relations = recursive_parent_child_relations($sub_xml_object, $relations, $key);\n\t}\n\n\t// will compare each each child occurrences and set the highest one to the relations array\n\tforeach($count_array as $child => $value)\n\t{\n\t\t$child = mb_strtolower($child, 'UTF-8'); //lowering keyword\n\t\tif(!empty($parent) && (!array_key_exists($child, $relations[$parent]) || $relations[$parent][$child] < $count_array[$child]))\n\t\t\t$relations[$parent][$child] = $count_array[$child];\n\t}\n\n\treturn $relations;\n}",
"private function getNodeParents(&$node)\n\t{\n\t\t// It is already checked in the caller whether this $node is a context with Practices\n\t\t// pointing to it, that is not the case since this function is called.\n\t\n\t\t// Is $node an IE with Part-of, skosembroader or Context prop?\n\t\t$query = \"[[Category:Intentional Element]][[{$node->getName()}]]|?\".PARTOFPROPERTY.\"|?\".SKOSEMBROADERPROPERTY.\"|?\".CONTEXTPROPERTY;\n\t\t//FIXME: SKOSEMBROADER should be SKOSBROADER, but will not work in printout section, use page selection part, possibly reversed query for the prop? prop::thispage?\n\t\t$result = $this->askAPI->ask($query);\n\t\tif(count($result['query']['results']) > 0){\n\t\t\t$result = $result['query']['results'][$node->getName()]['printouts'];\n\t\t\t\n\t\t\t/* EXPERIMENTAL! JIRA EMT-276 Background: if there are contexts (of this IE $node), they \n\t\t\t * should be prefered (before taking partofs and skosembroaders into account) \n\t\t\t * TODO WME: discuss with HdB*/\n\t\t\t$parents = $this->getNodesFromQueryResult($result[CONTEXTPROPERTY]);\n\t\t\t\n\t\t\tif(count($parents) == 0){\t\n\t\t\t\t$parents = $this->getNodesFromQueryResult($result[PARTOFPROPERTY]);\n\t\t\t}\n\t\t\tif(count($parents) == 0){\n\t\t\t\t$parents = $this->getNodesFromQueryResult($result[SKOSEMBROADERPROPERTY]);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//not an IE and no practices pointing to it, is it a context which has a supercontext?\n\t\t\t$query = \"[[Category:Context]][[{$node->getName()}]]|?\".SUPERCONTEXTPROPERTY;\n\t\t\t$result = $this->askAPI->ask($query);\n\t\t\tif(count($result['query']['results']) > 0){\n\t\t\t\t$result = $result['query']['results'][$node->getName()]['printouts'];\n\t\t\t\t$parents = $this->getNodesFromQueryResult($result[SUPERCONTEXTPROPERTY]);\n\t\t\t}\n\t\t\telse{\t//no: is it a practice which has a part-of?\n\t\t\t\t//NB add contextproperty for breadcrumb fixing, see below\n\t\t\t\t$query = \"[[Category:Practice]][[{$node->getName()}]]|?\".PARTOFPROPERTY.\"|?\".CONTEXTPROPERTY;\n\t\t\t\t$result = $this->askAPI->ask($query);\n\t\t\t\tif(count($result['query']['results']) > 0){\n\t\t\t\t\t$result = $result['query']['results'][$node->getName()]['printouts'];\n\t\t\t\t\t//breadcrumb fixing: if this node has breadcrumb value \"practice\" then replace it by a list \n\t\t\t\t\t//of Context property values (there may be more than one Context value, isn't it?)\n\t\t\t\t\tif($node->getBreadCrumb() == \"practice\")\n\t\t\t\t\t\t$node->setBreadCrumb($this->getNodesFromQueryResult($result[CONTEXTPROPERTY]));\n\t\t\t\t\t$parents = $this->getNodesFromQueryResult($result[PARTOFPROPERTY], \"practice\");\n\t\t\t\t}\n\t\t\t\t// else: NO PARENTS FOUND\n\t\t\t}\n\t\t}\n\t\treturn $parents;\t//return array with parent elements found\n\t}",
"public function getParent()\n {\n return $this->hasOne(Taxonomy::className(), ['id' => 'parent_id']);\n }",
"public function getTermLevel(): int\n {\n $level = 0;\n $term = $this;\n\n while ($term->ParentID) {\n $level++;\n $term = $term->Parent();\n }\n\n return $level;\n }",
"function frg_ancestor_id()\n{\n global $post;\n\n if ( $post->post_parent ) {\n $ancestors = array_reverse( get_post_ancestors( $post->ID ) );\n return $ancestors[0];\n }\n\n return $post->ID;\n}",
"public function getGrandParent();",
"public function menu_get_ancestors($parts)\n {\n return menu_get_ancestors($parts);\n }",
"public function getModelParents(){\n if ($this->_modelParentCache !== null) return $this->_modelParentCache;\n $parents = $this->getClassParents();\n $return = array();\n if (is_string($this->_baseModelClass)) {\n $this->_baseModelClass = array($this->_baseModelClass);\n }\n $stop_at = array_merge((array)$this->_baseModelClass, array('AppModel', 'Model', 'MongoAppModel'));\n foreach($parents as $parent) {\n \n if (in_array($parent, $stop_at)){\n break;\n }\n array_push($return, $parent);\n }\n $this->_modelParentCache = $return;\n return $return;\n }",
"function get_previous_post($in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"function get_parent($obj = null){\n\tglobal $wp_query;\n\tif(!$obj){\n\t\t$obj = $wp_query->post;\n\t}\n\t\n\t// Checks to see if we've got a parent or not:\n\tif(empty($obj->post_parent))\n\t\treturn $obj->ID;\n\telse\n\t\treturn $obj->post_parent;\n}",
"function wp_find_hierarchy_loop($callback, $start, $start_parent, $callback_args = array())\n {\n }",
"public function foodbakery_restaurant_parent_categories($category_id) {\n $parent_cate_array = '';\n $category_obj = get_term_by('id', $category_id, 'restaurant-category');\n if (isset($category_obj->parent) && $category_obj->parent != '0') {\n $parent_cate_array .= $this->foodbakery_restaurant_parent_categories($category_obj->parent);\n }\n $parent_cate_array .= isset($category_obj->slug) ? $category_obj->slug . ',' : '';\n return $parent_cate_array;\n }",
"private function parseParents(): void\n {\n $key1 = $this->tokens->keyByOrdinal(0);\n $key2 = $this->tokens->findFirstToken('{');\n $tokens = $this->tokens->slice($key1, $key2);\n\n $weight = 0;\n $this->parseParentsExtends($tokens, $weight);\n $this->parseParentsInterfaces($tokens, $weight);\n $this->parseParentsTraits($weight);\n }",
"function ep_get_nav_menu_top_parent($menu_name) {\n\n\t$menulocations = get_nav_menu_locations();\n\t$menu_items = wp_get_nav_menu_items( $menulocations[$menu_name] );\n\t$top_parent_item = null;\n\t$current_item = null;\n\t$parent_item = null;\n\n\t// Find current post in menu\n\tforeach ($menu_items as $one_item) {\n\t\tif (get_queried_object_id() == $one_item->object_id) {\n\t\t\t$current_item = $one_item;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ($current_item) {\n\n\t\t// got current item, now look for top parent\n\t\t$parent_item = $current_item;\n\t\t$found_parent_item = null;\n\t\twhile ( $found_parent_item !== false ) {\n\t\t\t$found_parent_item = ep_get_nav_item_parent($parent_item, $menu_items);\n\t\t\tif ($found_parent_item !== false)\n\t\t\t\t$parent_item = $found_parent_item;\n\t\t}\n\n\t}\n\n\treturn $parent_item;\n\n}",
"public function buildParentsChildrenCategoriesHierarchy(): array\n {\n $categoriesDepths = $this->buildCategoriesDepths();\n $parentsChildrenDtos = [];\n $skippedCategoriesIds = [];\n\n foreach( $categoriesDepths as $categoryId => $depth ){\n\n $category = $this->app->repositories->myNotesCategoriesRepository->find($categoryId);\n $categoryId = $category->getId();\n\n $childCategoriesIds = $this->app->repositories->myNotesCategoriesRepository->getChildrenCategoriesIdsForCategoriesIds([$categoryId]);\n $parentChildDto = $this->buildParentChildDtoForHierarchy($category, $depth);\n\n //if we have a children then we already added it to parent so we don't want it as separated being\n $skippedCategoriesIds = array_merge($skippedCategoriesIds, $childCategoriesIds);\n\n if( in_array($categoryId, $skippedCategoriesIds) ){\n continue;\n }\n\n $parentsChildrenDtos[] = $parentChildDto;\n }\n\n // sort alphabetically by name\n uasort($parentsChildrenDtos, fn(ParentChildDTO $currentElement, ParentChildDTO $nextElement) =>\n $currentElement->getName() > $nextElement->getName()\n );\n\n return $parentsChildrenDtos;\n }",
"function get_depth($id = '', $depth = '', $i = 0)\n{\n\tglobal $wpdb;\n\n\tif($depth == '')\n\t{\n\t\tif(is_page())\n\t\t{\n\t\t\tif($id == '')\n\t\t\t{\n\t\t\t\tglobal $post;\n\t\t\t\t$id = $post->ID;\n\t\t\t}\n\t\t\t$depth = $wpdb->get_var(\"SELECT post_parent FROM $wpdb->posts WHERE ID = '\".$id.\"'\");\n\t\t\treturn get_depth($id, $depth, $i);\n\t\t}\n\t\telseif(is_category())\n\t\t{\n\n\t\t\tif($id == '')\n\t\t\t{\n\t\t\t\tglobal $cat;\n\t\t\t\t$id = $cat;\n\t\t\t}\n\t\t\t$depth = $wpdb->get_var(\"SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '\".$id.\"'\");\n\t\t\treturn get_depth($id, $depth, $i);\n\t\t}\n\t\telseif(is_single())\n\t\t{\n\t\t\tif($id == '')\n\t\t\t{\n\t\t\t\t$category = get_the_category();\n\t\t\t\t$id = $category[0]->cat_ID;\n\t\t\t}\n\t\t\t$depth = $wpdb->get_var(\"SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '\".$id.\"'\");\n\t\t\treturn get_depth($id, $depth, $i);\n\t\t}\n\t}\n\telseif($depth == '0')\n\t{\n\t\treturn $i;\n\t}\n\telseif(is_single() || is_category())\n\t{\n\t\t$depth = $wpdb->get_var(\"SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '\".$depth.\"'\");\n\t\t$i++;\n\t\treturn get_depth($id, $depth, $i);\n\t}\n\telseif(is_page())\n\t{\n\t\t$depth = $wpdb->get_var(\"SELECT post_parent FROM $wpdb->posts WHERE ID = '\".$depth.\"'\");\n\t\t$i++;\n\t\treturn get_depth($id, $depth, $i);\n\t}\n}",
"protected function getAllParents()\n {\n if ($this->params('parent')) {\n return [\n $this->params('parent') => $this->params('idParent'),\n ];\n } else {\n return [\n $this->params('parent1') => $this->params('idParent1'),\n $this->params('parent2') => $this->params('idParent2'),\n $this->params('parent3') => $this->params('idParent3'),\n ];\n }\n }",
"function get_post_parent($post = \\null)\n {\n }",
"public function ancestors()\n {\n return $this->belongsToMany(Node::class, 'rbac_paths','last_node_id','first_node_id')\n ->as('path')->using(Path::class);\n }",
"public function parentOf($parent){\n\t\t/*$parents = func_get_args();\n\t\tforeach($parents as $parent){\n\t\t\tif(!in_array($parent, $this->_parentOf)){\n\t\t\t\t$this->_parentOf[] = $parent;\n\t\t\t}\n\t\t}*/\n\t}",
"protected static function findAllParents($option, $categoryTableName, $categoryParentField, $root, &$allParents, $categoryIdentifier) {\n\t\tstatic $db;\n\t\tif (! $db) {\n\t\t\t$db = JFactory::getDbo ();\n\t\t}\n\t\t\n\t\t$query = \"SELECT \" . $db->quoteName ( $categoryParentField ) . \n\t\t\t\t \"\\n FROM \" . $db->quoteName ( $categoryTableName ) . \n\t\t\t\t \"\\n WHERE \" . $db->quoteName($categoryIdentifier) . \" = \" . ( int ) $root;\n\t\t$hasAParentCatId = $db->setQuery ( $query )->loadResult ();\n\t\tif ($hasAParentCatId) {\n\t\t\t$allParents [] = ( int ) $hasAParentCatId;\n\t\t\tself::findAllParents ( $option, $categoryTableName, $categoryParentField, $hasAParentCatId, $allParents, $categoryIdentifier);\n\t\t}\n\t\t\n\t\treturn $allParents;\n\t}",
"public function ancestors($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '<' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '>' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '>=' . ($this->{$this->levelAttribute} - $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }",
"function test_get_parents()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Create a new tree\r\n\t\t$relation_tree = $this->_create_sub_node($rnc, $depth, $npl);\r\n\t\t$allnodes = $this->_tree->get_all_nodes(); \r\n\t\t// Walk trough all nodes and compare it's relations whith the one provided\r\n\t\t// by the relation tree\r\n\t\tforeach($allnodes AS $nid => $node)\r\n\t\t{\r\n\t\t\t$parents = $this->_tree->get_parents($nid);\r\n\t\t\t$exp_parents = array_reverse($this->_traverse_parent_relations($relation_tree, $nid, true), true);\r\n\t\t\t$this->assertEqual($exp_parents, $parents, 'Differs from relation traversal result.');\r\n\t\t} \r\n\t\treturn true;\r\n\t}"
] | [
"0.7313571",
"0.7129667",
"0.7058357",
"0.67662877",
"0.61967045",
"0.6165676",
"0.6029577",
"0.59574336",
"0.59424204",
"0.5900447",
"0.5766153",
"0.57583064",
"0.57188976",
"0.5718115",
"0.5681629",
"0.5680445",
"0.5649787",
"0.5642658",
"0.5642601",
"0.562844",
"0.562545",
"0.56198424",
"0.5615877",
"0.5605084",
"0.55892146",
"0.55688924",
"0.5560423",
"0.5550843",
"0.5538503",
"0.5537502",
"0.5533666",
"0.55219537",
"0.55186105",
"0.55186105",
"0.55133456",
"0.55096877",
"0.54780495",
"0.547587",
"0.5458898",
"0.54546934",
"0.54225266",
"0.5409591",
"0.5399919",
"0.5394486",
"0.5387821",
"0.5362679",
"0.5362018",
"0.53601557",
"0.5359353",
"0.5342827",
"0.5334151",
"0.5327995",
"0.5326692",
"0.5322",
"0.5301517",
"0.52985245",
"0.5239928",
"0.52381396",
"0.52231044",
"0.5214777",
"0.52094096",
"0.5203316",
"0.5181487",
"0.5173974",
"0.5171108",
"0.51381373",
"0.5137086",
"0.5135994",
"0.5134289",
"0.5132664",
"0.5128881",
"0.5115885",
"0.51087826",
"0.50988805",
"0.50869036",
"0.5083456",
"0.507802",
"0.5075864",
"0.50730455",
"0.50727654",
"0.5059111",
"0.5051523",
"0.50474185",
"0.50324816",
"0.5030689",
"0.5028284",
"0.5000677",
"0.49956217",
"0.49941576",
"0.49793792",
"0.4972025",
"0.49589786",
"0.49306226",
"0.49301887",
"0.49271193",
"0.49158868",
"0.49061865",
"0.48943734",
"0.48893616",
"0.48735097"
] | 0.60955215 | 6 |
Adds a post's terms from a specific taxonomy to the items array. | public function postTerms($post_id)
{
$taxonomy_name = $this->getMostUsedTaxonomy($post_id);
$post_terms = wp_get_object_terms($post_id, $taxonomy_name, array('fields' => 'ids'));
if (is_array($post_terms) && isset($post_terms[0])) {
$branch = self::getBranchWithLargestAncestors(
$post_terms,
$taxonomy_name,
'taxonomy'
);
$this->termParents(key($branch), $taxonomy_name);
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function add_term_objects_to_posts() {\n \n $taxonomy = self::$taxonomy;\n \n foreach( $this->posts as $post_index => $current_post ) :\n // Get array of WP_Term category terms for the current post\n $terms = get_the_terms( $current_post, self::$taxonomy );\n // Save the first WP_Term object to the WP_Post object\n $current_post->$taxonomy = $terms;\n // Update the $posts array with the modified WP_Post object\n $this->posts[$post_index] = $current_post;\n\n endforeach;\n\n // Return array of modified WP_Post objects\n return $this;\n\n }",
"public function addTaxonomies() {\n foreach (self::getPostTypes() as $post_type) {\n register_rest_field($post_type, 'taxonomies', [\n 'get_callback' => function ($post) use ($post_type) {\n return self::getTermSchema($post_type, $post);\n },\n ]);\n }\n }",
"public function addTaxonomies() {\n\n echo \"\\nAdding taxonomies to post {$this->wp_post_id}...\\n\";\n\n if( is_array($this->taxonomy_info) ){\n foreach( $this->taxonomy_info as $taxonomy_name => $terms ){\n $term_ids = implode( \" \", $this->getRandomTerms($terms) );\n $set_terms_cmd = \"wp post term set {$this->wp_post_id} {$taxonomy_name} {$term_ids} --by=id\";\n $output = shell_exec( $set_terms_cmd );\n }\n }\n\n return true;\n }",
"function get_term_attach_post($post){\n\t$taxonomy = get_post_taxonomies( $post );\n\t$terms = get_the_terms( $post, $taxonomy );\n\treturn $terms;\n}",
"public function setTaxonomyTerms($terms);",
"function action_rest_insert_quotes( $post, $request, $true ) {\n $params = $request->get_json_params();\n if(array_key_exists(\"terms\", $params)) {\n foreach($params[\"terms\"] as $taxonomy => $terms) {\n wp_set_post_terms($post->ID, $terms, $taxonomy);\n }\n }\n}",
"function add_wp_taxonomy_to_recipe() {\n\t// Replace post_type with actual CPT slug.\n\tregister_taxonomy_for_object_type( 'category', 'recipe' );\n\tregister_taxonomy_for_object_type( 'post_tag', 'recipe' );\n}",
"public function setTerms(){\n\t\t$this->terms = new stdClass();\n\t\tforeach (get_taxonomies() as $taxonomy ) {\n\t\t\t$this->terms->$taxonomy = $this->getTerms( $taxonomy);\n\t\t\t//$this->{'terms_'.$taxonomy} = $this->terms[$taxonomy];\n\t\t}\n\t}",
"function _post_format_get_terms($terms, $taxonomies, $args)\n {\n }",
"public function taxonomy( $args, $assoc_args ) {\n if ( empty($args) ) {\n exit('Invalid entry.');\n }\n $from = $args[0];\n $to = $args[1];\n extract( $assoc_args );\n $preamble = \"Will migrate all $from to $to\";\n $get_posts = $this->get_specified_posts( $assoc_args, $args );\n $message = $get_posts['message'];\n $posts = $get_posts['posts'];\n $args = $get_posts['args'];\n $message = \"{$preamble} {$message}.\\n\";\n print_r($message);\n $count = count($posts);\n $set = array();\n foreach ( $posts as $p ) {\n $terms = wp_get_post_terms( $p->ID, $from );\n foreach ( $terms as $t ) {\n $new_term = wp_insert_term( $t->name, $to, array( 'slug' => $t->slug ) );\n if ( $new_term instanceof \\WP_Error ) {\n $new_term = get_term_by('slug', $t->slug, $from);\n array_push($set, $new_term->slug);\n } else {\n $added_term = get_term( $new_term['term_id'], $to, $output = OBJECT, $filter = 'raw' );\n array_push($set, $added_term->slug);\n }\n }\n $n = count($set);\n $message = \"Setting {$n} terms for {$to} on {$args['post_type']} #{$p->ID}.\\n\";\n print_r($message);\n $new = wp_set_object_terms( $p->ID, $set, $to );\n // clear all those posts out of $set to tee up the next \n $set = array();\n }\n $message = \"All {$from} successfully migrated to {$to} for {$count} {$args['post_type']}s. You did it!\";\n \\WP_CLI::success( $message );\n }",
"public function registerTaxonomyToObjects()\n {\n // register Taxonomy to each of the PostTypes assigned\n if (!empty($this->posttypes)) {\n foreach ($this->posttypes as $posttype) {\n register_taxonomy_for_object_type($this->name, $posttype);\n }\n }\n }",
"private function WP_Post_taxonomies($graph, $post) {\r\n $taxonomy_names = get_object_taxonomies( $post->post_type );\r\n foreach ( $taxonomy_names as $taxonomy_name ) {\r\n $terms = wp_get_post_terms($post->ID, $taxonomy_name);\r\n foreach ( $terms as $term ) {\r\n $post_resource = $graph->resource($post->guid);\r\n $post_resource->add('sioc:topic', $graph->resource(get_term_link( $term)));\r\n $taxonomy_resource = $graph->resource(get_term_link( $term));\r\n $taxonomy_resource->set('rdfs:seeAlso', $graph->resource($this->return_seeAlso_resource(get_term_link($term))));\r\n }\r\n }\r\n return $graph;\r\n }",
"function create_my_taxonomies()\n{\n register_taxonomy('utilities', 'post', array('hierarchical' => true, 'label' => 'Utilities'));\n}",
"protected function populate_terms($terms)\n {\n }",
"function OPS_copy_post_taxonomies($id, $new_id, $post_type) {\r\n\tglobal $wpdb;\r\n\tif (isset($wpdb->terms)) {\r\n\t\t// WordPress 2.3\r\n\t\t$taxonomies = get_object_taxonomies($post_type); //array(\"category\", \"post_tag\");\r\n\t\tforeach ($taxonomies as $taxonomy) {\r\n\t\t\t$post_terms = wp_get_object_terms($id, $taxonomy);\r\n\t\t\tfor ($i=0; $i<count($post_terms); $i++) {\r\n\t\t\t\twp_set_object_terms($new_id, $post_terms[$i]->slug, $taxonomy, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}",
"private function init_taxonomy_manager( $post ) {\n\t\t$out = array();\n\t\t$out[] = '<div class=\"cld-tax-order\">';\n\t\t$out[] = '<ul class=\"cld-tax-order-list\" id=\"cld-tax-items\">';\n\t\t$out[] = '<li class=\"cld-tax-order-list-item no-items\">' . esc_html__( 'No terms added', 'cloudinary' ) . '</li>';\n\t\t$terms = $this->get_terms( $post->ID );\n\t\t// Process Terms.\n\t\tif ( ! empty( $terms ) ) {\n\t\t\tforeach ( (array) $terms as $item ) {\n\t\t\t\t$out[] = $this->make_term_sort_item( $item['value'], $item['term']->name );\n\t\t\t}\n\t\t}\n\t\t$out[] = '</ul>';\n\t\t// Get apply Type.\n\t\t$type = get_post_meta( $post->ID, self::META_APPLY_KEY . '_terms', true );\n\t\t$out[] = '<label class=\"cld-tax-order-list-type\"><input ' . checked( 'overwrite', $type, false ) . ' type=\"checkbox\" value=\"overwrite\" name=\"cld_apply_type\" />' . __( 'Overwrite', 'cloudinary' ) . '</label>';\n\t\t$out[] = '</div>';\n\n\t\treturn implode( $out );\n\t}",
"public function addTerms(\\obiba\\mica\\TaxonomyEntityDto $value) {\n return $this->_add(2, $value);\n }",
"function acf_get_taxonomy_terms($taxonomies = array())\n{\n}",
"function insert_wp_term_relationships($wpdb, $id, $in_args){\n $args = explode(',' , $in_args);\n $table = $wpdb->prefix.\"terms\";\n foreach($args as $a)\n {\n $q = \"SELECT term_id FROM \".$table.\" WHERE name = '\".strtoupper($a).\"'\";\n $terms = $wpdb->get_results($wpdb->prepare($q));\n foreach($terms as $t)\n {\n $arr = array(\n 'object_id' => $id,\n 'term_taxonomy_id' => $t->term_id,\n );\n $wpdb->insert($wpdb->prefix.'term_relationships', $arr);\n }\n }\n}",
"public function terms()\n {\n return $this->hasManyThrough(\n 'Darryldecode\\Backend\\Components\\ContentBuilder\\Models\\ContentTypeTaxonomyTerm',\n 'Darryldecode\\Backend\\Components\\ContentBuilder\\Models\\ContentTypeTaxonomy',\n 'content_type_id',\n 'content_type_taxonomy_id'\n );\n }",
"function add_post_meta($term_id, $taxonomy, $meta_key, $meta_value, $unique = false) {\n\n return add_metadata('post', $post_id, $meta_key, $meta_value, $unique);\n}",
"function edd_duplicate_post_taxonomies( $id, $new_id, $post_type ) {\n\t$taxonomies = get_object_taxonomies( $post_type ); //array(\"category\", \"post_tag\");\n\tforeach ($taxonomies as $taxonomy) {\n\n\t\t$post_terms = wp_get_object_terms( $id, $taxonomy );\n\t\t$post_terms_count = sizeof( $post_terms );\n\n\t\tfor ( $i=0; $i<$post_terms_count; $i++ ) {\n\t\t\twp_set_object_terms( $new_id, $post_terms[ $i ]->slug, $taxonomy, true );\n\t\t}\n\n\t}\n}",
"function hello_pro_add_blog_categories( $content, $imported_post_ids ) {\n\n\t// Sample Category #1.\n\twp_insert_term(\n\t\t'Sample Category #1', // The name of the category.\n\t\t'category', // The taxonomy, which in this case is \"category\" (don't change).\n\t\tarray(\n\t\t\t'slug' => 'sample-category-1', // Slug to use for the term archive.\n\t\t)\n\t);\n\n\t// Sample Category #2.\n\twp_insert_term(\n\t\t'Sample Category #2', // The name of the category.\n\t\t'category', // The taxonomy, which in this case is \"category\" (don't change).\n\t\tarray(\n\t\t\t'slug' => 'sample-category-2', // Slug to use for the term archive.\n\t\t)\n\t);\n\n\t// Sample Category #3.\n\twp_insert_term(\n\t\t'Sample Category #3', // The name of the category.\n\t\t'category', // The taxonomy, which in this case is \"category\" (don't change).\n\t\tarray(\n\t\t\t'slug' => 'sample-category-3', // Slug to use for the term archive.\n\t\t)\n\t);\n\n}",
"function netrics_save_feed_items( $post_id, $items, $meta_key = 'nn_articles_new', $term_id = 6178 ) {\n if ( $items && isset( $items[0]['url'] ) ) { // Add post_meta and set term.\n update_post_meta( $post_id, $meta_key, $items );\n $terms = wp_set_post_terms( $post_id, $term_id, 'flag', true ); // Term: 'Articles'.\n } else {\n return false;\n }\n\n return $terms;\n}",
"function add_custom_taxonomies() {\n // Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_index', $types, array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => _x( 'ASN Index', 'taxonomy general name' ),\n 'singular_name' => _x( 'Competency', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Competencies' ),\n 'all_items' => __( 'All Competencies' ),\n 'parent_item' => __( 'Parent Competency' ),\n 'parent_item_colon' => __( 'Parent Competency:' ),\n 'edit_item' => __( 'Edit Competency' ),\n 'update_item' => __( 'Update Competency' ),\n 'add_new_item' => __( 'Add New Competency' ),\n 'new_item_name' => __( 'New Competency Name' ),\n 'menu_name' => __( 'Competency Index' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'competency_index', \n 'with_front' => false,\n 'hierarchical' => true \n ),\n ));\n add_custom_post_type();\n create_new_topic_index();\n add_metadata_taxonomies();\n}",
"private function add_taxonomy( $taxonomy_name ) {\n\t\t$this->taxonomies[] = $taxonomy_name;\n\t}",
"function create_taxonomies($tax,$val) {\n \n\n // register_taxonomy( 'genre', $taxonomies, $args );\n\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( $tax, 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( $tax, 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search '.$tax, 'textdomain' ),\n 'popular_items' => __( 'Popular '.$tax, 'textdomain' ),\n 'all_items' => __( 'All '.$tax, 'textdomain' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit '.$tax, 'textdomain' ),\n 'update_item' => __( 'Update '.$tax, 'textdomain' ),\n 'add_new_item' => __( 'Add New '.$tax, 'textdomain' ),\n 'new_item_name' => __( 'New '.$tax.' Name', 'textdomain' ),\n 'separate_items_with_commas' => __( 'Separate '.$tax.' with commas', 'textdomain' ),\n 'add_or_remove_items' => __( 'Add or remove '.$tax, 'textdomain' ),\n 'choose_from_most_used' => __( 'Choose from the most used '.$tax, 'textdomain' ),\n 'not_found' => __( 'No '.$tax.' found', 'textdomain' ),\n 'menu_name' => __( $tax, 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => $tax ),\n );\n\n register_taxonomy( $tax, $val, $args );\n}",
"function tu_add_tax_query_to_posts_endpoint( $args, $request ) {\n\t$params = $request->get_params();\n\t$tax_query = array();\n\tif ( isset( $params['category_slugs'] ) ) {\n\t\t$tax_query[] =\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => $params['category_slugs']\n\t\t\t);\n\t}\n\tif ( isset( $params['tag_slugs'] ) ) {\n\t\t$tax_query[] =\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'post_tag',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => $params['tag_slugs']\n\t\t\t);\n\t}\n\tif ( count( $tax_query ) > 0 ) {\n\t\t$args['tax_query'] = $tax_query;\n\t}\n\treturn $args;\n}",
"function process_terms() {\n\t\t$this->terms = apply_filters( 'wp_import_terms', $this->terms );\n\n\t\tif ( empty( $this->terms ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->terms as $term ) {\n\t\t\t// if the term already exists in the correct taxonomy leave it alone\n\t\t\t$term_id = term_exists( $term['slug'], $term['term_taxonomy'] );\n\t\t\tif ( $term_id ) {\n\t\t\t\tif ( is_array($term_id) ) $term_id = $term_id['term_id'];\n\t\t\t\tif ( isset($term['term_id']) )\n\t\t\t\t\t$this->processed_terms[intval($term['term_id'])] = (int) $term_id;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( empty( $term['term_parent'] ) ) {\n\t\t\t\t$parent = 0;\n\t\t\t} else {\n\t\t\t\t$parent = term_exists( $term['term_parent'], $term['term_taxonomy'] );\n\t\t\t\tif ( is_array( $parent ) ) $parent = $parent['term_id'];\n\t\t\t}\n\t\t\t$description = isset( $term['term_description'] ) ? $term['term_description'] : '';\n\t\t\t$termarr = array( 'slug' => $term['slug'], 'description' => $description, 'parent' => intval($parent) );\n\n\t\t\t$id = wp_insert_term( $term['term_name'], $term['term_taxonomy'], $termarr );\n\t\t\tif ( ! is_wp_error( $id ) ) {\n\t\t\t\tif ( isset($term['term_id']) )\n\t\t\t\t\t$this->processed_terms[intval($term['term_id'])] = $id['term_id'];\n\t\t\t} else {\n\t\t\t\tprintf( 'Failed to import %s %s', esc_html($term['term_taxonomy']), esc_html($term['term_name']) );\n\t\t\t\tif ( defined('IMPORT_DEBUG') && IMPORT_DEBUG )\n\t\t\t\t\techo ': ' . $id->get_error_message();\n\t\t\t\techo '<br />';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tunset( $this->terms );\n\t}",
"function five_register_my_taxonomies()\n{\n //five_register_taxonomy('custom-taxonomy', 'Custom Taxonomy', 'Custom Taxonomies', ['custom-post-type']);\n}",
"function register_block_core_post_terms()\n {\n }",
"public function setTaxonomies() {\n // ## TAXONOMIES ##\n $args = array(\n // ## Fields ##\n array(\n 'taxonomy' => self::TAX_FIELDS,\n 'object_type' => array(self::POST_TYPE_BADGES),\n 'args' => array(\n 'labels' => array(\n 'name' => _x('Fields of education', 'taxonomy general name'),\n 'singular_name' => _x('Field of education', 'taxonomy singular name'),\n 'search_items' => __('Search Fields of education'),\n 'all_items' => __('All Fields of education'),\n 'parent_item' => __('Parent Field'),\n 'parent_item_colon' => __('Parent Field:'),\n 'edit_item' => __('Edit Field'),\n 'update_item' => __('Update Field'),\n 'add_new_item' => __('Add New Field'),\n 'new_item_name' => __('New Field Name'),\n 'menu_name' => __('Field of Education'),\n ),\n 'rewrite' => array('slug' => self::TAX_FIELDS),\n 'hierarchical' => true,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true\n )\n ),\n // ## Levels ##\n array(\n 'taxonomy' => self::TAX_LEVELS,\n 'object_type' => self::POST_TYPE_BADGES,\n 'args' => array(\n 'labels' => array(\n 'name' => _x('Levels', 'taxonomy general name'),\n 'singular_name' => _x('Levels', 'taxonomy singular name'),\n 'search_items' => __('Search Levels'),\n 'all_items' => __('All Levels'),\n 'parent_item' => __('Parent Level'),\n 'parent_item_colon' => __('Parent Level:'),\n 'edit_item' => __('Edit Level'),\n 'update_item' => __('Update Level'),\n 'add_new_item' => __('Add New Level'),\n 'new_item_name' => __('New Level Name'),\n 'menu_name' => __('Level of Education'),\n ),\n 'rewrite' => array('slug' => self::TAX_LEVELS),\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true\n )\n ),\n );\n\n $this->settings->loadTaxonomies($args);\n }",
"function wpm_add_taxonomies() {\n\t// Taxonomie Lieux\n\n\t$labels_lieux = array(\n\t\t'name' => _x( 'Lieux', 'taxonomy general name'),\n\t\t'singular_name' => _x( 'Lieu', 'taxonomy singular name'),\n\t\t'search_items' => __( 'Rechercher un lieu'),\n\t\t'popular_items' => __( 'Lieux populaires'),\n\t\t'all_items' => __( 'Tous les lieux'),\n\t\t'edit_item' => __( 'Editer un lieu'),\n\t\t'update_item' => __( 'Mettre à jour un lieu'),\n\t\t'add_new_item' => __( 'Ajouter un nouveau lieu'),\n\t\t'new_item_name' => __( 'Nom du nouveau lieu'),\n\t\t'separate_items_with_commas' => __( 'Séparer les lieux avec une virgule'),\n\t\t'add_or_remove_items' => __( 'Ajouter ou supprimer un lieu'),\n\t\t'choose_from_most_used' => __( 'Choisir parmi les plus utilisés'),\n\t\t'not_found' => __( 'Pas de lieu trouvé'),\n\t\t'menu_name' => __( 'Lieux'),\n\t);\n\n\t$args_lieux = array(\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels_lieux,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'update_count_callback' => '_update_post_term_count',\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'lieux' ),\n\t);\n\n\tregister_taxonomy( 'lieux', 'actus', $args_lieux );\n}",
"private function register_taxonomies()\n {\n $this->register_service($this->get_taxonomy_services(), 'taxonomies');\n }",
"public function save_post_terms( $post_id , $terms , $append = false ){\n\t\t\n\t\tif ( ! $this->check_permissions( $post_id ) ) return false;\n\t\t\n\t\tforeach( $terms as $index => $term ){\n\t\t\t\n\t\t\t$terms[ $index ] = sanitize_text_field( $term );\n\t\t\t\n\t\t} // end foreach\n\t\t\t\n\t\twp_set_object_terms( $post_id, $terms, $this->get_slug(), $append );\n\t\t\t\n\t}",
"function get_post_taxonomies($post = 0)\n {\n }",
"public function register_taxonomies() {\n\n\t\t$options = $this->options;\n\t\t$this->remove_mb = array();\n\n\t\tforeach ( $options as $option ) {\n\n\t\t\tif ( 'taxonomy' == $option['args']['field_type'] ) {\n\n\t\t\t\t$name = ! empty( $option['args']['label'] ) ? sanitize_text_field( $option['args']['label'] ) : ucwords( str_replace( array( '_', '-' ), ' ', $option['name'] ) );\n\t\t\t\t$plural = ! empty( $option['args']['label_plural'] ) ? sanitize_text_field( $option['args']['label_plural'] ) : $name . 's';\n\t\t\t\t$column = true === $option['args']['taxo_std'] ? true : false;\n\t\t\t\t$hierarchical = $option['args']['taxo_hierarchical'];\n\n\t\t\t\t$labels = array(\n\t\t\t\t\t'name' => $plural,\n\t\t\t\t\t'singular_name' => $name,\n\t\t\t\t\t'search_items' => sprintf( __( 'Search %s', TEXTDOMAIN ), $plural ),\n\t\t\t\t\t'all_items' => sprintf( __( 'All %s', TEXTDOMAIN ), $plural ),\n\t\t\t\t\t'parent_item' => sprintf( __( 'Parent %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'parent_item_colon' => sprintf( _x( 'Parent %s:', 'Parent term in a taxonomy where %s is dynamically replaced by the taxonomy (eg. \"book\")', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'edit_item' => sprintf( __( 'Edit %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'update_item' => sprintf( __( 'Update %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'add_new_item' => sprintf( __( 'Add New %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'new_item_name' => sprintf( _x( 'New %s Name', 'A new taxonomy term name where %s is dynamically replaced by the taxonomy (eg. \"book\")', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'menu_name' => $plural,\n\t\t\t\t);\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'hierarchical' => $hierarchical,\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_admin_column' => $column,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array( 'slug' => $option['name'] ),\n\t\t\t\t\t'capabilities' => array(\n\t\t\t\t\t\t'manage_terms' => 'create_ticket',\n\t\t\t\t\t\t'edit_terms' => 'settings_tickets',\n\t\t\t\t\t\t'delete_terms' => 'settings_tickets',\n\t\t\t\t\t\t'assign_terms' => 'create_ticket'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif ( false !== $option['args']['update_count_callback'] && function_exists( $option['args']['update_count_callback'] ) ) {\n\t\t\t\t\t$args['update_count_callback'] = $option['args']['update_count_callback'];\n\t\t\t\t}\n\n\t\t\t\tregister_taxonomy( $option['name'], array( 'ticket' ), $args );\n\n\t\t\t\tif ( false === $option['args']['taxo_std'] ) {\n\t\t\t\t\tarray_push( $this->remove_mb, $option['name'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/* Remove metaboxes that won't be used */\n\t\tif ( ! empty( $this->remove_mb ) ) {\n\t\t\tadd_action( 'admin_menu', array( $this, 'remove_taxonomy_metabox' ) );\n\t\t}\n\n\t}",
"function create_taxonomies() {\n\t// taxonomy_init(\n\t// \t$settings = array(\n\t// \t\t'slug' \t=> 'sample',\t\t\t// Required\n\t// \t\t'singular' \t=> 'Sample',\t\t\t// Required\n\t// \t\t'plural' \t=> 'Samples',\t\t\t// Required\n\t// \t\t'post_types'\t=> 'your_CPT',\t\t\t// Required\n\t// \t)\n\t// );\n}",
"function custom_taxonomies_terms_links( $post_id ){\n // get post by post id\n $post = get_post( $post_id );\n\n // get post type by post\n $post_type = $post->post_type;\n\n // get post type taxonomies\n $taxonomies = get_object_taxonomies( $post_type, 'objects' );\n\n $out = array();\n foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){\n\n // get the terms related to post\n $terms = get_the_terms( $post_id, $taxonomy_slug );\n\n if ( !empty( $terms ) ) {\n $out[] = \"<h2>\" . $taxonomy->label . \"</h2>\\n<ul>\";\n foreach ( $terms as $term ) {\n $out[] =\n ' <li><a href=\"'\n . get_term_link( $term->slug, $taxonomy_slug ) .'\">'\n . $term->name\n . \"</a></li>\\n\";\n }\n $out[] = \"</ul>\\n\";\n }\n }\n\n return implode('', $out );\n}",
"function create_marque_taxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'Marques', 'taxonomy general name' ),\n 'singular_name' => _x( 'Marque', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Marques' ),\n 'all_items' => __( 'All Marques' ),\n 'parent_item' => __( 'Parent Marque' ),\n 'parent_item_colon' => __( 'Parent Marque:' ),\n 'edit_item' => __( 'Edit Marque' ),\n 'update_item' => __( 'Update Marque' ),\n 'add_new_item' => __( 'Add New Marque' ),\n 'new_item_name' => __( 'New Marque Name' ),\n 'menu_name' => __( 'Marque' ),\n );\n \n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'marque' ),\n );\n \n register_taxonomy( 'marque', array( 'product' ), $args );\n}",
"function register_part_of_speech_taxonomy () {\n\n $labels = array(\n 'name' => _x( 'Part of Speech', 'taxonomy general name' ),\n 'singular_name' => _x( 'Part of Speech', 'taxonomy singular name' ),\n 'search_items' => __( 'Parts of Speech' ),\n 'all_items' => __( 'All Parts of Speech' ),\n 'parent_item' => __( 'Parent Part of Speech' ),\n 'parent_item_colon' => __( 'Parent Part of Speech:' ),\n 'edit_item' => __( 'Edit Part of Speech' ),\n 'update_item' => __( 'Update Part of Speech' ),\n 'add_new_item' => __( 'Add New Part of Speech' ),\n 'new_item_name' => __( 'New Part of Speech Name' ),\n 'menu_name' => __( \"Parts of Speech\"),\n );\n\n register_taxonomy(\n 'sil_parts_of_speech',\n 'post',\n array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => true,\n 'public' => true,\n 'show_ui' => true\n )\n ) ;\n}",
"private function readTaxonomy( $taxonomy ){\n $this->taxonomy->clear();\n if ($taxonomy){\n foreach( $taxonomy as $term ){\n if (is_object($term))\n $id = $term->id;\n elseif(is_array($term))\n $id = $term['id'];\n else \n $id = $term;\n if ( $id ){\n $term = new TermTYPE();\n $term->getByID($id);\n $this->taxonomy->append( $term );\n }\n }\n }\n }",
"function my_register_taxonomies() {\r\n\t}",
"public function getTaxonomyTerms();",
"function add_tax_query_to_posts_endpoint( $args, $request ) {\n\t$params = $request->get_params();\n\t$tax_query = array();\n\tif ( isset( $params['category_slugs'] ) ) {\n\t\t$tax_query[] =\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => $params['category_slugs']\n\t\t\t);\n\t}\n\tif ( isset( $params['tag_slugs'] ) ) {\n\t\t$tax_query[] =\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'post_tag',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => $params['tag_slugs']\n\t\t\t);\n\t}\n\tif ( count( $tax_query ) > 0 ) {\n\t\t$args['tax_query'] = $tax_query;\n\t}\n\treturn $args;\n}",
"public function terms($taxonomy, array $query = [])\n {\n return $this->get(strtolower($taxonomy), $query);\n }",
"function add_custom_taxonomies() {\n register_taxonomy('mechanic', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Mechanics', 'taxonomy general name' ),\n 'singular_name' => _x( 'Mechanic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Mechanics' ),\n 'all_items' => __( 'All Mechanics' ),\n 'parent_item' => __( 'Parent Mechanic' ),\n 'parent_item_colon' => __( 'Parent Mechanic:' ),\n 'edit_item' => __( 'Edit Mechanic' ),\n 'update_item' => __( 'Update Mechanic' ),\n 'add_new_item' => __( 'Add New Mechanic' ),\n 'new_item_name' => __( 'New Mechanic Name' ),\n 'menu_name' => __( 'Mechanics' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'mechanics', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('family', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Families', 'taxonomy general name' ),\n 'singular_name' => _x( 'Family', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Families' ),\n 'all_items' => __( 'All Families' ),\n 'parent_item' => __( 'Parent Family' ),\n 'parent_item_colon' => __( 'Parent Family:' ),\n 'edit_item' => __( 'Edit Family' ),\n 'update_item' => __( 'Update Family' ),\n 'add_new_item' => __( 'Add New Family' ),\n 'new_item_name' => __( 'New Family Name' ),\n 'menu_name' => __( 'Families' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'family', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('publisher', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Publishers', 'taxonomy general name' ),\n 'singular_name' => _x( 'Publisher', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Publishers' ),\n 'all_items' => __( 'All Publishers' ),\n 'parent_item' => __( 'Parent Publisher' ),\n 'parent_item_colon' => __( 'Parent Publisher:' ),\n 'edit_item' => __( 'Edit Publisher' ),\n 'update_item' => __( 'Update Publisher' ),\n 'add_new_item' => __( 'Add New Publisher' ),\n 'new_item_name' => __( 'New Publisher Name' ),\n 'menu_name' => __( 'Publishers' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'publisher', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n register_taxonomy('artists', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Artists', 'taxonomy general name' ),\n 'singular_name' => _x( 'Artist', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Artists' ),\n 'all_items' => __( 'All Artists' ),\n 'parent_item' => __( 'Parent Artist' ),\n 'parent_item_colon' => __( 'Parent Artist:' ),\n 'edit_item' => __( 'Edit Artist' ),\n 'update_item' => __( 'Update Artist' ),\n 'add_new_item' => __( 'Add New Artist' ),\n 'new_item_name' => __( 'New Artist Name' ),\n 'menu_name' => __( 'Artists' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'artists', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n register_taxonomy('designers', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Designers', 'taxonomy general name' ),\n 'singular_name' => _x( 'Designer', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Designers' ),\n 'all_items' => __( 'All Designers' ),\n 'parent_item' => __( 'Parent Designer' ),\n 'parent_item_colon' => __( 'Parent Designer:' ),\n 'edit_item' => __( 'Edit Designer' ),\n 'update_item' => __( 'Update Designer' ),\n 'add_new_item' => __( 'Add New Designer' ),\n 'new_item_name' => __( 'New Designer Name' ),\n 'menu_name' => __( 'Designers' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'designers', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n\n register_taxonomy('awards', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Awards', 'taxonomy general name' ),\n 'singular_name' => _x( 'Award', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Awards' ),\n 'all_items' => __( 'All Awards' ),\n 'parent_item' => __( 'Parent Award' ),\n 'parent_item_colon' => __( 'Parent Award:' ),\n 'edit_item' => __( 'Edit Award' ),\n 'update_item' => __( 'Update Award' ),\n 'add_new_item' => __( 'Add New Award' ),\n 'new_item_name' => __( 'New Award Name' ),\n 'menu_name' => __( 'Awards' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'awards', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n }",
"function wpfolio_create_taxonomies() {\nregister_taxonomy('medium', 'post', array( \n\t'label' => 'Medium',\n\t'hierarchical' => false, \n\t'query_var' => true, \n\t'rewrite' => true,\n\t'public' => true,\n\t'show_ui' => true,\n\t'show_tagcloud' => true,\n\t'show_in_nav_menus' => true,));\n}",
"function ms_add_custom_taxonomies() {\n // Add new \"Placement Tag\" taxonomy to Articles\n register_taxonomy('placement_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'placement-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Placement Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Placement Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Placement Tags' ),\n 'popular_items' => __( 'Popular Placement Tags' ),\n 'all_items' => __( 'All Placement Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Placement Tag' ),\n 'update_item' => __( 'Update Placement Tag' ),\n 'add_new_item' => __( 'Add New Placement Tag' ),\n 'new_item_name' => __( 'New Origin Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove placement tags' ),\n 'separate_items_with_commas' => __( 'Separate placement tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used placement tags' ),\n 'not_found' => __( 'No placement tags found.' ),\n 'menu_name' => __( 'Placement Tags' ),\n ),\n ));\n\n // Add new \"Location Tag\" taxonomy to Articles\n register_taxonomy('location_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'location-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Location Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Location Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Location Tags' ),\n 'popular_items' => __( 'Popular Location Tags' ),\n 'all_items' => __( 'All Location Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Location Tag' ),\n 'update_item' => __( 'Update Location Tag' ),\n 'add_new_item' => __( 'Add New Location Tag' ),\n 'new_item_name' => __( 'New Location Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove location tags' ),\n 'separate_items_with_commas' => __( 'Separate location tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used location tags' ),\n 'not_found' => __( 'No location tags found.' ),\n 'menu_name' => __( 'Location Tags' ),\n ),\n ));\n\n // Add new \"Lifestyle Tag\" taxonomy to Articles\n register_taxonomy('lifestyle_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'lifestyle-tag' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Lifestyle Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Lifestyle Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Lifestyle Tags' ),\n 'popular_items' => __( 'Popular Lifestyle Tags' ),\n 'all_items' => __( 'All Lifestyle Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Lifestyle Tag' ),\n 'update_item' => __( 'Update Lifestyle Tag' ),\n 'add_new_item' => __( 'Add New Lifestyle Tag' ),\n 'new_item_name' => __( 'New Lifestyle Name' ),\n 'add_or_remove_items' => __( 'Add or remove lifestyle tags' ),\n 'separate_items_with_commas' => __( 'Separate lifestyle tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used lifestyle tags' ),\n 'not_found' => __( 'No lifestyle tags found.' ),\n 'menu_name' => __( 'Lifestyle Tags' ),\n ),\n ));\n\n // Add new \"Featured Tag\" taxonomy to Articles\n register_taxonomy('featured_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'featured-tag' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Featured Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Featured Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Featured Tags' ),\n 'popular_items' => __( 'Popular Featured Tags' ),\n 'all_items' => __( 'All Featured Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Featured Tag' ),\n 'update_item' => __( 'Update Featured Tag' ),\n 'add_new_item' => __( 'Add New Featured Tag' ),\n 'new_item_name' => __( 'New Featured Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove featured tags' ),\n 'separate_items_with_commas' => __( 'Separate featured tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used featured tags' ),\n 'not_found' => __( 'No locations found.' ),\n 'menu_name' => __( 'Featured Tags' ),\n ),\n ));\n // Add new \"Origin Tag\" taxonomy to Articles\n register_taxonomy('origin_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'origin-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Origin Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Origin Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Origin Tags' ),\n 'popular_items' => __( 'Popular Origin Tags' ),\n 'all_items' => __( 'All Origin Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Origin Tag' ),\n 'update_item' => __( 'Update Origin Tag' ),\n 'add_new_item' => __( 'Add New Origin Tag' ),\n 'new_item_name' => __( 'New Origin Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove origin tags' ),\n 'separate_items_with_commas' => __( 'Separate origin tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used origin tags' ),\n 'not_found' => __( 'No origin tags found.' ),\n 'menu_name' => __( 'Origin Tags' ),\n ),\n ));\n}",
"public function flo_register_form_entries_taxonomy(){\n\t\tregister_taxonomy(\n\t\t\t'entry_form',\n\t\t\t'flo_form_entry', // custom post type for which we register this taxonomy\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Forms','flo-forms' ),\n\t\t\t\t'rewrite' => array( 'slug' => 'entry_form' ),\n\t\t\t\t'show_admin_column' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t)\n\t\t);\n\t}",
"public function add_taxonomy( $name, $hierarchy, $args = array(), $labels = array() ){\r\n if( ! empty( $name ) ){\r\n // We need to know the post type name, so the new taxonomy can be attached to it.\r\n $post_type_name = $this->post_type_name;\r\n\r\n // Taxonomy properties\r\n $taxonomy_name = strtolower( str_replace( ' ', '_', $name ) );\r\n $taxonomy_labels = $labels;\r\n $taxonomy_args = $args;\r\n\r\n if( ! taxonomy_exists( $taxonomy_name ) ){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $name ) );\r\n $plural = $name . 's';\r\n\r\n // Default labels, overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'taxonomy general name' ),\r\n 'singular_name' => _x( $name, 'taxonomy singular name' ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'parent_item' => __( 'Parent ' . $name ),\r\n 'parent_item_colon' => __( 'Parent ' . $name . ':' ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'update_item' => __( 'Update ' . $name ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'new_item_name' => __( 'New ' . $name . ' Name' ),\r\n 'menu_name' => __( $plural ),\r\n ),\r\n\r\n // Given labels\r\n $taxonomy_labels\r\n\r\n );\r\n\r\n // Default arguments, overwritten with the given arguments\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'hierarchical' => $hierarchy,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_nav_menus' => true,\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given\r\n $taxonomy_args\r\n\r\n );\r\n\r\n // Add the taxonomy to the post type\r\n add_action( 'init',\r\n function() use( $taxonomy_name, $post_type_name, $args ){\r\n register_taxonomy( $taxonomy_name, $post_type_name, $args );\r\n }\r\n );\r\n }\r\n else{\r\n add_action( 'init',\r\n function() use( $taxonomy_name, $post_type_name ){\r\n register_taxonomy_for_object_type( $taxonomy_name, $post_type_name );\r\n }\r\n );\r\n }\r\n }\r\n }",
"public function add_custom_taxonomies() {\n\t\t// Add new \"Departments\" taxonomy to Posts\n\t\tregister_taxonomy(\n\t\t\t'department',\n\t\t\t'lrhoa_voting',\n\t\t\t[\n\t\t\t\t// Hierarchical taxonomy (like categories)\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t// This array of options controls the labels displayed in the WordPress Admin UI\n\t\t\t\t'labels' => [\n\t\t\t\t\t'name' => _x( 'Departments', 'taxonomy general name' ),\n\t\t\t\t\t'singular_name' => _x( 'Department', 'taxonomy singular name' ),\n\t\t\t\t\t'search_items' => __( 'Search Departments' ),\n\t\t\t\t\t'all_items' => __( 'All Departments' ),\n\t\t\t\t\t'parent_item' => __( 'Parent Department' ),\n\t\t\t\t\t'parent_item_colon' => __( 'Parent Department:' ),\n\t\t\t\t\t'edit_item' => __( 'Edit Department' ),\n\t\t\t\t\t'update_item' => __( 'Update Department' ),\n\t\t\t\t\t'add_new_item' => __( 'Add New Department' ),\n\t\t\t\t\t'new_item_name' => __( 'New Department Name' ),\n\t\t\t\t\t'menu_name' => __( 'Departments' ),\n\t\t\t\t],\n\t\t\t\t'query_var' => 'department',\n\t\t\t\t// Control the slugs used for this taxonomy\n\t\t\t\t'rewrite' => [\n\t\t\t\t\t'slug' => 'department', // This controls the base slug that will display before each term\n\t\t\t\t\t'with_front' => false, // Don't display the category base before \"/locations/\"\n\t\t\t\t\t'hierarchical' => true, // This will allow URL's like \"/locations/boston/cambridge/\"\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}",
"function bw_create_taxonomies() {\n//first do the translations part for GUI\n \n $labels = array(\n 'name' => _x( 'Years', 'taxonomy general name' ),\n 'singular_name' => _x( 'Year', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Years' ),\n 'all_items' => __( 'All Years' ),\n 'parent_item' => __( 'Parent Year' ),\n 'parent_item_colon' => __( 'Parent Year:' ),\n 'edit_item' => __( 'Edit Year' ), \n 'update_item' => __( 'Update Year' ),\n 'add_new_item' => __( 'Add New Year' ),\n 'new_item_name' => __( 'New Year Name' ),\n 'menu_name' => __( 'Years' ),\n ); \n \n// Now register the taxonomy\n \n register_taxonomy('years',array('post'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'topic' ),\n ));\n \n}",
"function ahr_add_tax_meta_box() {\r\n \r\n $taxonomies = get_taxonomies();\r\n $slugs = array();\r\n \r\n // Add only taxonomies that have pages attached to them\r\n foreach ( $taxonomies as $tax ) {\r\n if ( 'nav_menu' !== $tax && 'post_format' !== $tax && 'link_category' !== $tax && 'wpforms_log_type' !== $tax ) {\r\n array_push( $slugs, $tax );\r\n }\r\n }\r\n \r\n foreach ( $slugs as $slug ) {\r\n add_action( \"{$slug}_edit_form_fields\", 'ahr_tax_edit_form' );\r\n add_action( \"edited_{$slug}\", 'ahr_tax_edited_form' );\r\n \r\n add_action( \"{$slug}_add_form_fields\", 'ahr_tax_add_form' );\r\n add_action( \"create_{$slug}\", 'ahr_tax_edited_form' );\r\n }\r\n \r\n}",
"function _update_post_term_count($terms, $taxonomy)\n {\n }",
"static function importTaxonomies( $taxonomy_map ) {\n\t\t\n\t\techo_now( 'Importing categories and tags...' );\n\t\t\n\t\t# Import Drupal vocabularies as WP taxonomies\n\t\t\n\t\t$vocab_map = array();\n\t\t\n\t\t$dr_tax_prefix = '';\n\t\t\n\t\tif( isset( drupal()->vocabulary ) )\n\t\t\t$dr_tax_prefix = '';\n\t\telse if( isset( drupal()->taxonomy_vocabulary ) )\n\t\t\t$dr_tax_prefix = 'taxonomy_';\n\t\t\n\t\t$dr_tax_vocab = $dr_tax_prefix . 'vocabulary';\n\t\t\n\t\t$vocabs = drupal()->$dr_tax_vocab->getRecords();\n\t\t\n\t\tforeach( $vocabs as $vocab ) {\n\t\t\t\n\t\t\tif( 'skip' == $taxonomy_map[ $vocab['name'] ] )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tif( 'asis' == $taxonomy_map[ $vocab['name'] ] ) {\n\t\t\t\t\n\t\t\t\techo_now( 'Registering taxonomy for: ' . str_replace(' ','-',strtolower( $vocab['name'] ) ) );\n\t\t\t\t\n\t\t\t\t$vocab_map[ (int)$vocab['vid'] ] = str_replace(' ','-',strtolower( $vocab['name'] ) );\n\t\t\t\t\n\t\t\t\tregister_taxonomy(\n\t\t\t\t\tstr_replace(' ','-',strtolower( $vocab['name'] ) ),\n\t\t\t\t\tarray( 'post', 'page' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => $vocab['name'],\n\t\t\t\t\t\t'hierarchical' => (bool)$vocab['hierarchy']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\techo_now( 'Converting taxonomy: ' . str_replace(' ','-',strtolower( $vocab['name'] ) ) . ' to: ' . $taxonomy_map[ $vocab['name'] ] );\n\t\t\t\t$vocab_map[ (int)$vocab['vid'] ] = $taxonomy_map[ $vocab['name'] ];\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t# Import Drupal terms as WP terms\n\t\t\n\t\t$term_vocab_map = array();\n\t\t\n\t\t$term_data_table = $dr_tax_prefix . 'term_data';\n\t\t$term_hierarchy_table = $dr_tax_prefix. 'term_hierarchy';\n\t\t\n\t\t$terms = drupal()->$term_data_table->getRecords();\n\t\t\n\t\tforeach( $terms as $term ) {\n\n\t\t\t$parent = drupal()->$term_hierarchy_table->parent->getValue(\n\t\t\t\tarray(\n\t\t\t\t\t'tid' => $term['tid']\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tif( ! array_key_exists( (int)$term['vid'], $vocab_map ) )\n\t\t\t\tcontinue;\n\n\t\t\tif( apply_filters( 'import_term_skip_term', false, $term, $vocab_map[ (int)$term['vid'] ] ) )\n\t\t\t\tcontinue;\n\n\t\t\t$term_vocab_map[ $term['tid'] ] = $vocab_map[ (int)$term['vid'] ];\n\t\t\t\n//\t\t\techo 'Creating term: ' . $term['name'] . ' from: ' . $term['tid'] . \"<br>\\n\";\n\t\t\t\n\t\t\t$term_result = wp_insert_term(\n\t\t\t\t$term['name'],\n\t\t\t\t$vocab_map[ (int)$term['vid'] ],\n\t\t\t\tarray(\n\t\t\t\t\t'description' => $term['description'],\n\t\t\t\t\t'parent' => (int)$parent\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tif( is_wp_error( $term_result ) ) {\n\t\t\t\t\n\t\t\t\techo 'WARNING - Got error creating term: ' . $term['name']; \n\t\t\t\t\n\t\t\t\tif( in_array( 'term_exists', $term_result->get_error_codes() ) ) {\n\t\t\t\t\t\n\t\t\t\t\techo_now( ' -- term already exists as: ' . $term_result->get_error_data() );\n\t\t\t\t\t$term_id = (int)$term_result->get_error_data();\n\n\t\t\t\t\tself::$term_to_term_map[ (int)$term['tid'] ] = $term_id;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\techo_now( ' -- error was: ' . print_r( $term_result, true ) );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$term_id = $term_result['term_id'];\n\t\t\t\n\t\t\tself::$term_to_term_map[ (int)$term['tid'] ] = $term_id;\n\t\t\t\n\t\t}\n\t\t\n\t\t# Attach terms to posts\n\t\t\n\t\tif( isset( drupal()->term_node ) )\n\t\t\t$term_node_table = 'term_node';\n\t\telse if( isset( drupal()->taxonomy_index ) )\n\t\t\t$term_node_table = 'taxonomy_index';\n\t\t\n\t\t$term_assignments = drupal()->$term_node_table->getRecords();\n\t\t\n\t\tforeach( $term_assignments as $term_assignment ) {\n\t\t\t\n\t\t\tif( ! array_key_exists( $term_assignment['tid'], $term_vocab_map ) )\n\t\t\t\tcontinue;\n\n\t\t\tif( ! array_key_exists( (int)$term_assignment['tid'], self::$term_to_term_map ) )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tif( ! array_key_exists( $term_assignment['nid'], self::$node_to_post_map ) )\n\t\t\t\tcontinue;\n\t\t\t\n//\t\t\techo 'Adding term: ' . (int)$term_assignment['tid'] . ' from: ' . self::$term_to_term_map[ (int)$term_assignment['tid'] ] . ' to: ' . self::$node_to_post_map[ $term_assignment['nid'] ] . \"<br>\\n\";\n\t\t\t\n\t\t\t$term_result = wp_set_object_terms(\n\t\t\t\tself::$node_to_post_map[ $term_assignment['nid'] ],\n\t\t\t\tarray( (int)self::$term_to_term_map[ (int)$term_assignment['tid'] ] ),\n\t\t\t\t$term_vocab_map[ $term_assignment['tid'] ],\n\t\t\t\ttrue\n\t\t\t);\n\t\t\t\n\t\t\tif( is_wp_error( $term_result ) )\n\t\t\t\tdie( 'Got error setting object term: ' . print_r( $term_result, true ) );\n\n\t\t\tif( empty( $term_result ) )\n\t\t\t\tdie('Failed to set object term properly.');\n\n\t\t}\n\t\t\n\t\tdo_action( 'imported_taxonomies' );\n\t\t\n\t}",
"function register_taxonomies() {\n\t}",
"function register_taxonomies() {\n\t}",
"function register_taxonomies() {\n\t}",
"function nt_regsiter_taxonomy() {\n\t$labels = array(\n\t\t'name' => 'Course Note Categories',\n\t\t'singular_name' => 'Course Note Category',\n\t\t'search_items' => 'Search Course Notes Categories',\n\t\t'all_items' => 'All Course Note Categories',\n\t\t'edit_item' => 'Edit Course Note Category',\n\t\t'update_item' => 'Update Course Note Category',\n\t\t'add_new_item' => 'Add New Course Note Category',\n\t\t'new_item_name' => 'New Course Note Category',\n\t\t'menu_name' => 'Course Note Categories'\n\t);\n\t// register taxonomy\n\tregister_taxonomy( 'coursenotecat', 'coursenote', array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'query_var' => true,\n\t\t'show_admin_column' => true\n\t) );\n}",
"function news_add_taxonomy_categories() {\n global $typenow;\n\n // An array of all the taxonomyies you want to display. Use the taxonomy name or slug\n $taxonomies = array( 'news_category' );\n\n // must set this to the post type you want the filter(s) displayed on\n if ( $typenow == 'news' ) {\n\n foreach ( $taxonomies as $tax_slug ) {\n $current_tax_slug = isset( $_GET[$tax_slug] ) ? $_GET[$tax_slug] : false;\n $tax_obj = get_taxonomy( $tax_slug );\n $tax_name = $tax_obj->labels->name;\n $terms = get_terms($tax_slug);\n if ( count( $terms ) > 0) {\n echo \"<select name='$tax_slug' id='$tax_slug' class='postform'>\";\n echo \"<option value=''>$tax_name</option>\";\n foreach ( $terms as $term ) {\n echo '<option value=' . $term->slug, $current_tax_slug == $term->slug ? ' selected=\"selected\"' : '','>' . $term->name .' (' . $term->count .')</option>';\n }\n echo \"</select>\";\n }\n }\n }\n}",
"function kulam_acf_register_custom_taxonomies() {\n\n\t/**\n\t * Variables\n\t */\n\t$custom_tax\t= kulam_acf_get_global_option( 'acf-option_custom_taxonomies_generator' );\n\n\tif ( ! $custom_tax )\n\t\treturn;\n\n\tforeach ( $custom_tax as $tax ) {\n\n\t\t/**\n\t\t * Variables\n\t\t */\n\t\t$name\t\t= $tax[ 'name' ];\n\t\t$singular\t= $tax[ 'singular_name' ];\n\n\t\tif ( ! $name || ! $singular )\n\t\t\tcontinue;\n\n\t\t$labels = kulam_get_custom_taxonomy_labels( $name, $singular );\n\n\t\tif ( ! $labels )\n\t\t\tcontinue;\n\n\t\t$args = array(\n\t\t\t'labels'\t\t\t\t=> $labels,\n\t\t\t'public'\t\t\t\t=> true,\n\t\t\t'hierarchical'\t\t\t=> true,\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'show_admin_column'\t\t=> true,\n\t\t);\n\n\t\tregister_taxonomy( urldecode( sanitize_title( urldecode( 'post_tax_' . $singular ) ) ), 'post', $args );\n\n\t}\n\n}",
"private function pupulate_default_terms()\n {\n\n $taxonomies = get_taxonomies();\n if (is_array($taxonomies)) {\n foreach ($taxonomies as $taxonomy) {\n $current_values = get_terms($taxonomy, array('hide_empty' => false));\n if (empty($current_values)) {\n $defaults = $this->get_default_taxonomy_values($taxonomy);\n if (!empty($defaults)) {\n foreach ($defaults as $default) {\n if (!term_exists($default['name'], $taxonomy)) {\n wp_insert_term($default['name'], $taxonomy, array('slug' => $default['short']));\n }\n }\n }\n }\n }\n }\n }",
"function register_taxonomies(){\n }",
"public function create_taxonomies() {\n \n }",
"public static function auto_terms_post( $object, $taxonomy = 'post_tag', $options = array(), $counter = false ) {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t// Option exists ?\r\n\t\tif ( $options == false || empty( $options ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( get_the_terms( $object->ID, $taxonomy ) != false && $options['at_empty'] == 1 ) {\r\n\t\t\treturn false; // Skip post with terms, if term only empty post option is checked\r\n\t\t}\r\n\r\n\t\t$terms_to_add = array();\r\n\r\n\t\t// Merge title + content + excerpt to compare with terms\r\n\t\t$content = $object->post_content . ' ' . $object->post_title;\r\n\t\tif ( isset( $object->post_excerpt ) ) {\r\n\t\t\t$content .= ' ' . $object->post_excerpt;\r\n\t\t}\r\n\r\n\t\t$content = trim( strip_tags( $content ) );\r\n\t\tif ( empty( $content ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Auto term with specific auto terms list\r\n\t\tif ( isset( $options['auto_list'] ) ) {\r\n\t\t\t$terms = (array) maybe_unserialize( $options['auto_list'] );\r\n\t\t\tforeach ( $terms as $term ) {\r\n\t\t\t\tif ( ! is_string( $term ) && empty( $term ) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$term = trim( $term );\r\n\r\n\t\t\t\t// Whole word ?\r\n\t\t\t\tif ( isset( $options['only_full_word'] ) && (int) $options['only_full_word'] == 1 ) {\r\n\t\t\t\t\t$preg_term = preg_quote( $term, \"/\" );\r\n\t\t\t\t\tif ( preg_match( \"/\\b\" . $preg_term . \"\\b/i\", $content ) ) {\r\n\t\t\t\t\t\t$terms_to_add[] = $term;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( isset( $options['allow_hashtag_format'] ) && (int) $options['allow_hashtag_format'] == 1 && stristr( $content, '#' . $term ) ) {\r\n\t\t\t\t\t\t$terms_to_add[] = $term;\r\n\t\t\t\t\t}\r\n\t\t\t\t} elseif ( stristr( $content, $term ) ) {\r\n\t\t\t\t\t$terms_to_add[] = $term;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tunset( $terms, $term );\r\n\t\t}\r\n\r\n\t\t// Auto terms with all terms\r\n\t\tif ( isset( $options['at_all'] ) && $options['at_all'] == 1 ) {\r\n\t\t\t// Get all terms\r\n\t\t\t$terms = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT name\r\n\t\t\t\tFROM {$wpdb->terms} AS t\r\n\t\t\t\tINNER JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id\r\n\t\t\t\tWHERE tt.taxonomy = %s\", $taxonomy ) );\r\n\r\n\t\t\t$terms = array_unique( $terms );\r\n\r\n\t\t\tforeach ( $terms as $term ) {\r\n\t\t\t\t$term = stripslashes( $term );\r\n\r\n\t\t\t\tif ( ! is_string( $term ) && empty( $term ) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Whole word ?\r\n\t\t\t\tif ( isset( $options['only_full_word'] ) && (int) $options['only_full_word'] == 1 ) {\r\n\t\t\t\t\t$preg_term = preg_quote( $term, \"/\" );\r\n\t\t\t\t\tif ( preg_match( \"/\\b\" . $preg_term . \"\\b/i\", $content ) ) {\r\n\t\t\t\t\t\t$terms_to_add[] = $term;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( isset( $options['allow_hashtag_format'] ) && (int) $options['allow_hashtag_format'] == 1 && stristr( $content, '#' . $term ) ) {\r\n\t\t\t\t\t\t$terms_to_add[] = $term;\r\n\t\t\t\t\t}\r\n\t\t\t\t} elseif ( stristr( $content, $term ) ) {\r\n\t\t\t\t\t$terms_to_add[] = $term;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Clean memory\r\n\t\t\t$terms = array();\r\n\t\t\tunset( $terms, $term );\r\n\t\t}\r\n\r\n\t\t// Append terms if terms to add\r\n\t\tif ( ! empty( $terms_to_add ) ) {\r\n\t\t\t// Remove empty and duplicate elements\r\n\t\t\t$terms_to_add = array_filter( $terms_to_add, '_delete_empty_element' );\r\n\t\t\t$terms_to_add = array_unique( $terms_to_add );\r\n\r\n\t\t\tif ( $counter == true ) {\r\n\t\t\t\t// Increment counter\r\n\t\t\t\t$counter = ( (int) get_option( 'tmp_auto_terms_st' ) ) + count( $terms_to_add );\r\n\t\t\t\tupdate_option( 'tmp_auto_terms_st', $counter );\r\n\t\t\t}\r\n\r\n\t\t\t// Add terms to posts\r\n\t\t\twp_set_object_terms( $object->ID, $terms_to_add, $taxonomy, true );\r\n\r\n\t\t\t// Clean cache\r\n\t\t\tclean_post_cache( $object->ID );\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"function create_dpto_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Departamento', 'taxonomy general name' ),\n 'singular_name' => _x( 'Departamento', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Genres' ),\n 'all_items' => __( 'Departamentos' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar departamento' ), \n 'update_item' => __( 'Actualizar departamento' ),\n 'add_new_item' => __( 'Nuevo departamento' ),\n 'new_item_name' => __( 'Nuevo departamento' ),\n 'menu_name' => __( 'Departamentos' ),\n ); \t\n\n register_taxonomy('departamento',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'departamento' ),\n ));\n\n}",
"function create_portfolio_taxonomies () {\r\n $labels = [\r\n 'name' => _x('Tecnologías', 'taxonomy general name'),\r\n 'singular_name' => _x('Tecnología', 'taxonomy singular name'),\r\n 'search_items' => __('Busca Tecnologías'),\r\n 'popular_items' => __('Tecnologías más usadas'),\r\n 'all_items' => __('Todas las tecnologías'),\r\n 'parent_item' => null,\r\n 'parent_item_colon' => null,\r\n 'edit_item' => __('Editar tecnología'),\r\n 'update_item' => __('Actualizar tecnología'),\r\n 'add_new_item' => __('Añade una nueva tecnología'),\r\n 'new_item_name' => __('Nombre de nueva tecnología'),\r\n 'separate_items_with_commas' => __('Tecnologías. Separadas por comas.'),\r\n 'add_or_remove_items' => __('Añadir o quitar tecnologías'),\r\n 'choose_from_most_used' => __('Elige de las tecnologías más usadas.'),\r\n 'not_found' => __('No se han encontrado tecnologías.'),\r\n 'menu_name' => __('Tecnologías'),\r\n ];\r\n $args = [\r\n 'hierarchical' => FALSE,\r\n 'labels' => $labels,\r\n 'show_ui' => TRUE,\r\n 'show_admin_column' => TRUE,\r\n 'update_count_callback' => '_update_post_term_count',\r\n 'query_var' => TRUE,\r\n 'rewrite' => array( 'slug' => 'tecnologia' ),\r\n ];\r\n \r\n register_taxonomy( 'tecnologia', 'trabajo', $args );\r\n}",
"public function register()\n {\n if (function_exists('register_post_type')) {\n register_taxonomy($this->taxonomy, $this->objectTypes, $this->getArgs());\n }\n\n return [$this->taxonomy, $this->objectTypes, $this->getArgs()];\n }",
"function term_taxonomies_handler( $tt_ids ) {\n\t\tforeach( (array)$tt_ids as $tt_id ) {\n\t\t\t$this->term_taxonomy_handler( $tt_id );\n\t\t}\n\t}",
"function five_register_taxonomy($taxonomy, $singular, $plural, $object_type = ['post'], $args = [])\n{\n //first do the translations part for GUI\n\n $labels = [\n 'name' => _x($plural, 'five'),\n 'singular_name' => _x($singular, 'five'),\n 'search_items' => __('Search '.$plural),\n 'all_items' => __('All '.$plural),\n 'parent_item' => __('Parent '.$singular),\n 'parent_item_colon' => __('Parent '.$singular.':'),\n 'edit_item' => __('Edit '.$singular),\n 'update_item' => __('Update '.$singular),\n 'add_new_item' => __('Add New '.$singular),\n 'new_item_name' => __('New '.$singular.' Name'),\n 'menu_name' => __($plural),\n ];\n\n // Now register the taxonomy\n $args = array_merge([\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $taxonomy],\n ], $args);\n\n register_taxonomy($taxonomy, $object_type, $args);\n}",
"function register_taxonomies(){\n }",
"private function prepareTaxonomy(){\n $taxonomy = null;\n if ( $this->taxonomy->terms() ){\n foreach($this->taxonomy->terms() as $term){\n $taxonomy[] = array( \n \t'id'=>$term->getID(), \n \t'label'=>$term->label->label \n\t\t\t\t);\n }\n }\n return $taxonomy;\n }",
"function mds_custom_taxonomy() {\n $args = array(\n\n /**\n * Include a description of the taxonomy.\n */\n 'description' => '', // string (default is NONE)\n\n /**\n * A plural descriptive name for the taxonomy marked for translation.\n * Default: overridden by $labels->name\n */\n 'label' => __( 'Custom Taxonomies' ), // string (default overridden by $labels->name).\n\n /**\n * Labels used when displaying the taxonomy in the admin and sometimes on the front end.\n */\n 'labels' => array(\n 'name'\t\t\t\t => __( 'Custom Taxonomies' ),\n 'singular_name'\t\t\t => __( 'Custom Taxonomy' ),\n 'menu_name'\t\t\t => __( 'Custom Taxonomy'),\n 'all_items'\t\t\t => __( 'All Custom Taxonomies' ),\n 'view_item' => __( 'View Custom Taxonomy' ),\n 'edit_item'\t\t\t => __( 'Edit Custom Taxonomy' ),\n 'update_item'\t\t\t => __( 'Update Custom Taxonomy'),\n 'add_new_item'\t\t\t => __( 'Add New Custom Taxonomy'),\n 'new_item_name'\t\t\t => __( 'New Single Custom Taxonomy'),\n 'parent_item'\t\t\t => __( 'Parent Custom Taxonomy' ),\n 'parent_item_colon'\t\t => __( 'Parent Custom Taxonomy' ),\n 'search_items'\t\t\t => __( 'Search Custom Taxonomy' ),\n 'popular_items'\t\t\t => __( 'Popular Custom Taxonomy' ),\n 'separate_items_with_commas' => __( 'Separate Custom Taxonomy with commas' ),\n 'add_or_remove_items'\t => __( 'Add or remove Custom Taxonomy'),\n 'choose_from_most_used'\t => __( 'Choose from most used Custom Taxonomy'),\n 'not_found' => __( 'No Custom Taxonomy found.' )\n ),\n\n /**\n * If the taxonomy should be publicly queryable. This\n * argument is sort of a catchall for many of the following arguments.\n */\n 'public' => true, // bool (default is TRUE)\n\n /**\n * Whether to generate a default UI for managing this taxonomy.\n */\n 'show_ui' => true, // bool (defaults to 'public').\n\n /**\n * Whether taxonomy items are available for selection in navigation menus.\n */\n 'show_in_nav_menus' => true, // bool (defaults to 'public').\n\n /**\n * Whether to allow the Tag Cloud widget to use this taxonomy.\n */\n 'show_tagcloud' => false,// bool (defaults to 'show_ui').\n\n /**\n * Whether to show the taxonomy in the quick/bulk edit panel.\n */\n 'show_in_quick_edit' => true, // bool (defaults to 'show_ui').\n\n /**\n * Whether to allow automatic creation of taxonomy columns on associated post-types table.\n */\n 'show_admin_column' => false,// bool (default is FALSE)\n\n /**\n * Provide a callback function name for the meta box display.\n * No meta box is shown if set to false\n */\n 'meta_box_cb' => null, //callback function (default is NULL)\n\n /**\n * Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.\n */\n 'hierarchical' => false,// bool (default is FALSE)\n\n /**\n * A function name that will be called when the count of an associated $object_type, such as post, is updated.\n * Works much like a hook.\n */\n\n 'update_count_callback' => '', //string (default is NONE)\n\n /**\n * Sets the query_var key for this taxonomy. If set to TRUE, the post type name will be used.\n * You can also set this to a custom string to control the exact key.\n */\n 'query_var' => 'custom-taxonomy', // bool|string (defaults to TRUE - post type name)\n\n\n /**\n * How the URL structure should be handled with this post type. You can set this to an\n * array of specific arguments or true|false. If set to FALSE, it will prevent rewrite\n * rules from being created.\n */\n 'rewrite' => array(\n\n /* The slug to use for individual posts of this type. */\n 'slug' => 'custom-post-type', // string (defaults to taxonomy's name slug)\n\n /* Allowing permalinks to be prepended with front base*/\n 'with_front' => false, // bool (defaults to TRUE)\n\n /* true or false allow hierarchical urls*/\n 'hierarchical' => false, // bool (defaults to FALSE)\n\n /* Assign an endpoint mask to this permalink. */\n 'ep_mask' => EP_PERMALINK, // const (defaults to EP_NONE)\n ),\n\n /**\n * Provides more precise control over the capabilities than the defaults. By default, WordPress\n * will use the 'capability_type' argument to build these capabilities. More often than not,\n * this results in many extra capabilities that you probably don't need.\n */\n 'capabilities' => array( ),\n\n /**\n * Whether this taxonomy should remember the order in which terms are added to objects.\n */\n 'sort' => false, // bool (default is NONE)\n );\n\n /**\n * Set up the arguments for the post type where taxonomy will be displayed.\n * Can be a custom post type or any of the registered post types: post, page, attachment, revision, nav_menu_item\n */\n $args_post_type = array(\n 'custom-post-type'\n );\n\n register_taxonomy(\n 'custom-taxonomy', //Taxonomy name. Max of 32 characters. Uppercase and spaces not allowed.\n $args_post_type, //Name of the post type for the taxonomy,\n $args\n );\n\n}",
"function briavers_register_tips_and_tricks_taxonomies(){\n $labels = array(\n 'name' => 'Types',\n 'singular_name' => 'Type',\n 'search_items' => 'Search type',\n 'all_items' => 'All types',\n 'edit_item' => 'Edit type',\n 'update_item' => 'Update type',\n 'add_new_item' => 'Add New type',\n 'new_item_name' => ' New type name',\n 'menu_name' => 'Types',\n 'not_found' => __('Types not found', 'briavers'),\n 'not_found_in_trash' => __('Type not found in trash', 'briavers'),\n );\n $args = array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type'),\n 'show_in_rest' => true,\n 'rest_base' => 'type',\n\n );\n\n register_taxonomy('type', array('tips_and_tools'), $args);\n}",
"function custom_taxonomies() {\n }",
"public static function createTaxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'Card Categories', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Card Category', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Card Categories', 'textdomain' ),\n 'all_items' => __( 'All Card Categories', 'textdomain' ),\n 'parent_item' => __( 'Parent Card Category', 'textdomain' ),\n 'parent_item_colon' => __( 'Parent Card Category:', 'textdomain' ),\n 'edit_item' => __( 'Edit Card Category', 'textdomain' ),\n 'update_item' => __( 'Update Card Category', 'textdomain' ),\n 'add_new_item' => __( 'Add New Card Category', 'textdomain' ),\n 'new_item_name' => __( 'New Card Category Name', 'textdomain' ),\n 'menu_name' => __( 'Card Category', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'card_category' ),\n 'capabilities' => array(\n 'manage_terms' => 'edit_travelcards',\n 'edit_terms' => 'edit_travelcards',\n 'delete_terms' => 'edit_travelcards',\n 'assign_terms' => 'edit_travelcards'\n )\n );\n\n register_taxonomy( 'card_category', array( 'travelcard' ), $args );\n\n // Add 'card tags' taxonomy\n $labels = array(\n 'name' => _x( 'Card Tags', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Card Tag', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Card Tags', 'textdomain' ),\n 'popular_items' => __( 'Popular Card Tags', 'textdomain' ),\n 'all_items' => __( 'All Card Tags', 'textdomain' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Card Tag', 'textdomain' ),\n 'update_item' => __( 'Update Card Tag', 'textdomain' ),\n 'add_new_item' => __( 'Add New Card Tag', 'textdomain' ),\n 'new_item_name' => __( 'New Card Tag Name', 'textdomain' ),\n 'separate_items_with_commas' => __( 'Separate card tags with commas', 'textdomain' ),\n 'add_or_remove_items' => __( 'Add or remove card tags', 'textdomain' ),\n 'choose_from_most_used' => __( 'Choose from the most used card tags', 'textdomain' ),\n 'not_found' => __( 'No card tags found.', 'textdomain' ),\n 'menu_name' => __( 'Card Tags', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'card_tag' ),\n 'capabilities' => array(\n 'manage_terms' => 'edit_travelcards',\n 'edit_terms' => 'edit_travelcards',\n 'delete_terms' => 'edit_travelcards',\n 'assign_terms' => 'edit_travelcards'\n )\n );\n\n register_taxonomy( 'card_tag', 'travelcard', $args );\n }",
"function custom_taxonomies_terms_links($post_ID){\n // get post by post id\n $post = get_post( $post_ID );\n \n // get post type by post\n $post_type = $post->post_type;\n \n // get post type taxonomies\n $taxonomies = get_object_taxonomies( $post_type, 'objects' );\n \n $out = array();\n \n foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){\n \n // get the terms related to post\n $terms = get_the_terms( $post->ID, $taxonomy_slug );\n \n if ( !empty( $terms ) ) {\n foreach ( $terms as $term ) {\n $out[] = $term->slug;\n }\n }\n }\n \n return implode(' ', $out );\n}",
"function build_taxonomies() {\n// custom tax\n register_taxonomy( 'from', array('menu'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'menu-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'cpt-tag',array('menu','recipe','sources-resources','tips-quips','style-points'), \n array( \n 'hierarchical' => false, // true = acts like categories false = acts like tags\n 'label' => 'Tags',\n 'query_var' => true,\n 'show_admin_column' => true,\n 'public' => true,\n 'rewrite' => true,\n '_builtin' => true\n ) );\n register_taxonomy( 'from-5', array('recipe'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'recipe-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'from-2', array('sources-resources'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'sources-resources-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'from-3', array('tips-quips'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'tips-quips-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'from-4', array('style-points'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'style-points-from' ),\n\t\t\t'_builtin' => true\n ) );\n register_taxonomy( 'sub', array('menu'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'menu-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-5', array('recipe'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'recipe-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-2', array('sources-resources'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'sources-resources-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-3', array('tips-quips'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'tips-quips-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-4', array('style-points'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'style-points-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n}",
"function get_custom_taxonomies( $post_identity ) {\r\n\r\n // Get the post by ID\r\n $post = get_post( $post_identity );\r\n\r\n // Get the post type\r\n $post_type = $post->post_type;\r\n\r\n // Get taxonomies related to the post type\r\n $taxonomies = get_object_taxonomies( $post_type, 'objects' );\r\n\r\n $out = array();\r\n // Loop through taxonomies and put the terms in an array\r\n foreach ( $taxonomies as $taxonomy_slug => $taxonomy ) {\r\n\r\n $terms = get_the_terms( $post_identity, $taxonomy_slug );\r\n //var_dump($terms); die;\r\n\r\n if ( !empty( $terms ) ) {\r\n \r\n foreach ( $terms as $term ) {\r\n $out[] .= $term->name;\r\n }\r\n }\r\n }\r\n\r\n return $out;\r\n }",
"function additional_taxonomies() {\r\n\tregister_taxonomy(\r\n\t\t'gradelevel',\r\n\t\t'post',\r\n\t\tarray(\r\n 'hierarchical' => true,\r\n\t\t\t'label' => __( 'Grade Level' ),\r\n\t\t\t'sort' => true,\r\n\t\t\t'args' => array( 'orderby' => 'term_order' ),\r\n\t\t\t'rewrite' => array( 'slug' => 'gradelevel' )\r\n\t\t)\r\n\t);\r\n \r\n register_taxonomy(\r\n\t\t'logotype',\r\n\t\t'logo',\r\n\t\tarray(\r\n 'hierarchical' => true,\r\n\t\t\t'label' => __( 'Logo Types' ),\r\n\t\t\t'sort' => true,\r\n\t\t\t'args' => array( 'orderby' => 'term_order' ),\r\n\t\t\t'rewrite' => array( 'slug' => 'logotype' )\r\n\t\t)\r\n\t);\r\n}",
"function save_extra_taxonomy_fields($term_id)\n\n {\n\n if (isset($_POST['term_meta'])) {\n\n $t_id = $term_id;\n\n $term_meta = get_option(\"taxonomy_$t_id\");\n\n $cat_keys = array_keys($_POST['term_meta']);\n\n foreach ($cat_keys as $key) {\n\n if (isset($_POST['term_meta'][$key])) {\n\n $term_meta[$key] = $_POST['term_meta'][$key];\n\n }\n\n }\n\n update_option(\"taxonomy_$t_id\", $term_meta);\n\n }\n\n }",
"function create_new_topic_index() {\n\t// Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_topic_index', $types, array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => _x( 'ASN Topic Index', 'taxonomy general name' ),\n 'singular_name' => _x( 'Topic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Topics' ),\n 'all_items' => __( 'All Topics' ),\n 'parent_item' => __( 'Parent Topic' ),\n 'parent_item_colon' => __( 'Parent Topic:' ),\n 'edit_item' => __( 'Edit Topic' ),\n 'update_item' => __( 'Update Topic' ),\n 'add_new_item' => __( 'Add New Topic' ),\n 'new_item_name' => __( 'New Topic Name' ),\n 'menu_name' => __( 'Topic Index' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'topic_index', \n 'with_front' => false,\n 'hierarchical' => true \n ),\n ));\n}",
"function create_ha_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Habilidad artistica', 'taxonomy general name' ),\n 'singular_name' => _x( 'Habilidad artistica', 'taxonomy singular name' ),\n 'search_items' => __( 'Buscar Habilidad' ),\n 'all_items' => __( 'Habilidades artisticas' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar habilidad' ), \n 'update_item' => __( 'Actualizar habilidad' ),\n 'add_new_item' => __( 'Nueva habilidad artistica' ),\n 'new_item_name' => __( 'Nueva habilidad artistica' ),\n 'menu_name' => __( 'Habilidades artisticas' ),\n ); \t\n\n register_taxonomy('habilidad-artistica',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'habilidad-artistica' ),\n ));\n\n}",
"private function set_post_term( $post_id, $value, $taxonomy ) {\n\t\t$term = term_exists( $value, $taxonomy );\n\t\t// If the taxonomy doesn't exist, then we create it.\n\t\tif ( 0 === $term || null === $term ) {\n\t\t\t$term = wp_insert_term(\n\t\t\t\t$value,\n\t\t\t\t$taxonomy,\n\t\t\t\t[ 'slug' => strtolower( str_ireplace( ' ', '-', $value ) ) ]\n\t\t\t);\n\t\t}\n\t\t// Then we can set the post - term relationship.\n\t\twp_set_post_terms( $post_id, $term['term_id'], $taxonomy );\n\t}",
"public function register_taxonomies()\n {\n }",
"function add_taxonomies_to_pages() {\n register_taxonomy_for_object_type('post_tag', 'page');\n register_taxonomy_for_object_type('category', 'page');\n}",
"function add_educational_use() {\n\t// Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_educational_use', $types, array(\n 'hierarchical' => false,\n 'labels' => array(\n 'name' => _x( 'Educational Use', 'taxonomy general name' ),\n 'singular_name' => _x( 'Educational Use', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Educational Uses' ),\n 'all_items' => __( 'All Educational Uses' ),\n 'parent_item' => __( 'Parent Educational Use' ),\n 'parent_item_colon' => __( 'Parent Educational Use:' ),\n 'edit_item' => __( 'Edit Educational Use' ),\n 'update_item' => __( 'Update Educational Use' ),\n 'add_new_item' => __( 'Add New Educational Use' ),\n 'new_item_name' => __( 'New Educational Use Name' ),\n 'menu_name' => __( 'Educational Use' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'educational_use', \n 'with_front' => false,\n 'hierarchical' => false \n ),\n ));\t\n}",
"function get_post_terms($tax){\n\t$product_terms = get_the_terms(get_the_ID(), $tax);\n\t$term_list = [];\n\tif ($product_terms && !is_wp_error( $product_terms)) {\n\t\tforeach ($product_terms as $term){\n\t\t\t$term_list[] = esc_html( $term->name);\n\t\t}\n\t}\n\treturn implode(', ', $term_list);\n}",
"public function taxonomy();",
"function create_ht_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Habilidad tecnica', 'taxonomy general name' ),\n 'singular_name' => _x( 'Habilidad tecnica', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Genres' ),\n 'all_items' => __( 'Habilidades tecnicas' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar habilidad' ), \n 'update_item' => __( 'Actualizar habilidad' ),\n 'add_new_item' => __( 'Nueva habilidad tecnica' ),\n 'new_item_name' => __( 'Nueva habilidad tecnica' ),\n 'menu_name' => __( 'Habilidades tecnicas' ),\n ); \t\n\n register_taxonomy('habilidad-tecnica',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'habilidad-tecnica' ),\n ));\n\n}",
"public function loadTaxonomyTerms(Node $node) {\n $tids = [];\n $tids[] = $node->get('field_event_building')->target_id;\n $tids[] = $node->get('field_event_room')->target_id;\n $term_storage = $this->entityTypeManager->getStorage('taxonomy_term');\n $terms = $term_storage->loadMultiple(array_filter($tids));\n $taxonomy = [];\n foreach ($terms as $term) {\n $taxonomy[$term->bundle()] = $term->label();\n }\n return $taxonomy;\n }",
"function humcore_create_taxonomies() {\n\t// Add new taxonomy, make it hierarchical (like categories).\n\t$labels = array(\n\t\t'name' => _x( 'Subjects', 'taxonomy general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Subject', 'taxonomy singular name', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Subjects', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Subjects', 'humcore_domain' ),\n\t\t'parent_item' => __( 'Parent Subject', 'humcore_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Subject:', 'humcore_domain' ),\n\t\t'edit_item' => __( 'Edit Subject', 'humcore_domain' ),\n\t\t'update_item' => __( 'Update Subject', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Subject', 'humcore_domain' ),\n\t\t'new_item_name' => __( 'New Subject Name', 'humcore_domain' ),\n\t\t'menu_name' => __( 'Subjects', 'humcore_domain' ),\n\t);\n\n\t$args = array(\n\t\t'public' => false,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => false,\n\t\t'query_var' => false,\n\t\t'rewrite' => false,\n\t);\n\n\tregister_taxonomy( 'humcore_deposit_subject', array( 'humcore_deposit' ), $args );\n\tregister_taxonomy_for_object_type( 'humcore_deposit_subject', 'humcore_deposit' );\n\n\t// Add new taxonomy, NOT hierarchical (like tags).\n\t$labels = array(\n\t\t'name' => _x( 'Tags', 'taxonomy general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Tag', 'taxonomy singular name', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Tags', 'humcore_domain' ),\n\t\t'popular_items' => __( 'Popular Tags', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Tags', 'humcore_domain' ),\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => __( 'Edit Tag', 'humcore_domain' ),\n\t\t'update_item' => __( 'Update Tag', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Tag', 'humcore_domain' ),\n\t\t'new_item_name' => __( 'New Tag Name', 'humcore_domain' ),\n\t\t'separate_items_with_commas' => __( 'Separate tags with commas', 'humcore_domain' ),\n\t\t'add_or_remove_items' => __( 'Add or remove tags', 'humcore_domain' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used tags', 'humcore_domain' ),\n\t\t'not_found' => __( 'No tags found.', 'humcore_domain' ),\n\t\t'menu_name' => __( 'Tags', 'humcore_domain' ),\n\t);\n\n\t$args = array(\n\t\t'public' => false,\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => false,\n\t\t'update_count_callback' => '_update_post_term_count',\n\t\t'query_var' => false,\n\t\t'rewrite' => false,\n\t);\n\n\tregister_taxonomy( 'humcore_deposit_tag', array( 'humcore_deposit' ), $args );\n\tregister_taxonomy_for_object_type( 'humcore_deposit_tag', 'humcore_deposit' );\n\n}",
"public static function action_created_term( $term_id, $tt_id, $taxonomy ) {\n\t\tself::purge_term( $term_id );\n\t\tpantheon_wp_clear_edge_keys( array( 'rest-' . $taxonomy . '-collection' ) );\n\t}",
"function create_author_taxonomies() {\n\n\n\t$labels = array(\n\t\t'name' => _x( 'Autore', 'taxonomy general name', 'italiattivo' ),\n\n\t);\n\n\n\t$args = array(\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\n\t);\n\n\tregister_taxonomy( 'autore', array('frasi', 'quadri', 'esercizi'), $args );\n\n}",
"public function registerTaxonomy()\n {\n // Get the existing taxonomy options if it exists.\n $options = (taxonomy_exists($this->name)) ? (array) get_taxonomy($this->name) : [];\n\n // create options for the Taxonomy.\n $options = array_replace_recursive($options, $this->createOptions());\n\n // register the Taxonomy with WordPress.\n register_taxonomy($this->name, null, $options);\n }",
"function setupTaxonomy()\n\t{\n\t\t$labels = array(\n\t\t\t\t'name' => 'Skills',\n\t\t\t\t'add_new_item' => 'Add New Skill',\n\t\t\t\t'new_item_name' => \"New Skill\"\n\t\t);\n\t\t\n\t\t$args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'labels' \t=> $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'update_count_callback' => '_update_post_term_count',\n\t\t\t'query_var' => true,\n\t\t\t//'rewrite' => array( 'slug' => 'writer' ),\n\t\t\t'show_tagcloud' \t\t=> true\n\t\t);\n\n\t\tregister_taxonomy( 'skills', 'iru_positions', $args );\n\t\tregister_taxonomy_for_object_type( 'skills', 'iru_positions' );\n\t}",
"function create_my_taxonomies() {\n\t$labels_producto_productor = array(\n\t\t'name' => _x( 'Productores', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Productor', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar productores' ),\n\t\t'all_items' => __( 'Todos los productores' ),\n\t\t'parent_item' => __( 'Productor Padre' ),\n\t\t'parent_item_colon' => __( 'Productor Padre:' ),\n\t\t'edit_item' => __( 'Editar productor' ),\n\t\t'update_item' => __( 'Actualizar productor' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo productor' ),\n\t\t'new_item_name' => __( 'Nombre de Nuevo productor' ),\n\t\t'menu_name' => __( 'Productores' )\n\t);\n\n\t$args_producto_productor = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels_producto_productor,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_productor',\n\t\t\t'edit_terms' => 'edit_productor',\n\t\t\t'delete_terms' => 'delete_productor',\n\t\t\t'assign_terms' => 'assign_productor'\n\t\t)\n\t);\n\n\t$labels_producto_marca = array(\n\t\t'name' => _x( 'Marcas', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Marca', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Marcas' ),\n\t\t'all_items' => __( 'Todos las Marcas' ),\n\t\t'parent_item' => __( 'Marca Padre' ),\n\t\t'parent_item_colon' => __( 'Marca Padre:' ),\n\t\t'edit_item' => __( 'Editar Marca' ),\n\t\t'update_item' => __( 'Actualizar Marca' ),\n\t\t'add_new_item' => __( 'Agregar Nueva Marca' ),\n\t\t'new_item_name' => __( 'Nombre de Nueva Marca' ),\n\t\t'menu_name' => __( 'Marcas' )\n\t);\n\n\t$args_producto_marca = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels_producto_marca,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_marca',\n\t\t\t'edit_terms' => 'edit_marca',\n\t\t\t'delete_terms' => 'delete_marca',\n\t\t\t'assign_terms' => 'assign_marca'\n\t\t)\n\t);\n\n\t$labels_producto_lugar = array(\n\t\t'name' => _x( 'Lugares', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Lugar', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Lugares' ),\n\t\t'all_items' => __( 'Todos los Lugares' ),\n\t\t'parent_item' => __( 'Lugar Padre' ),\n\t\t'parent_item_colon' => __( 'Lugar Padre:' ),\n\t\t'edit_item' => __( 'Editar Lugar' ),\n\t\t'update_item' => __( 'Actualizar Lugar' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo Lugar' ),\n\t\t'new_item_name' => __( 'Nombre de Nuevo Lugar' ),\n\t\t'menu_name' => __( 'Lugares' )\n\t);\n\n\t$args_producto_lugar = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_producto_lugar,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_lugar',\n\t\t\t'edit_terms' => 'edit_lugar',\n\t\t\t'delete_terms' => 'delete_lugar',\n\t\t\t'assign_terms' => 'assign_lugar'\n\t\t)\n\t);\n\n\t$labels_producto_clasificacion = array(\n\t\t'name' => _x( 'Clasificaciones', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Clasificación', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Clasificaciones' ),\n\t\t'all_items' => __( 'Todos las Clasificaciones' ),\n\t\t'parent_item' => __( 'Clasificación Padre' ),\n\t\t'parent_item_colon' => __( 'Clasificación Padre:' ),\n\t\t'edit_item' => __( 'Editar Clasificación' ),\n\t\t'update_item' => __( 'Actualizar Clasificación' ),\n\t\t'add_new_item' => __( 'Agregar Nueva Clasificación' ),\n\t\t'new_item_name' => __( 'Nombre de Nueva Clasificación' ),\n\t\t'menu_name' => __( 'Clasificaciones' )\n\t);\n\n\t$args_producto_clasificacion = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_producto_clasificacion,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_clasificacion',\n\t\t\t'edit_terms' => 'edit_clasificacion',\n\t\t\t'delete_terms' => 'delete_clasificacion',\n\t\t\t'assign_terms' => 'assign_clasificacion'\n\t\t)\n\t);\n\n\t$labels_banner_posicion = array(\n\t\t'name' => _x( 'Posiciones', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Posición', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Posiciones' ),\n\t\t'all_items' => __( 'Todas las Posiciones' ),\n\t\t'parent_item' => __( 'Posición Padre' ),\n\t\t'parent_item_colon' => __( 'Posición Padre:' ),\n\t\t'edit_item' => __( 'Editar posición' ),\n\t\t'update_item' => __( 'Actualizar posición' ),\n\t\t'add_new_item' => __( 'Agregar Nueva posición' ),\n\t\t'new_item_name' => __( 'Nombre de Nueva posición' ),\n\t\t'menu_name' => __( 'Posiciones' )\n\t);\n\n\t$args_banner_posicion = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_banner_posicion,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_posicion',\n\t\t\t'edit_terms' => 'edit_posicion',\n\t\t\t'delete_terms' => 'delete_posicion',\n\t\t\t'assign_terms' => 'assign_posicion'\n\t\t)\n\t);\n\n\t$labels_documentos_tipos = array(\n\t\t'name' => _x( 'Tipos', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Tipo', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Tipos' ),\n\t\t'all_items' => __( 'Todos los Tipos' ),\n\t\t'parent_item' => __( 'Tipo Padre' ),\n\t\t'parent_item_colon' => __( 'Tipo Padre:' ),\n\t\t'edit_item' => __( 'Editar Tipo' ),\n\t\t'update_item' => __( 'Actualizar Tipo' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo Tipo' ),\n\t\t'new_item_name' => __( 'Nombre de Nuevo Tipo' ),\n\t\t'menu_name' => __( 'Tipos' )\n\t);\n\n\t$args_documentos_tipos = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_documentos_tipos,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_tipo',\n\t\t\t'edit_terms' => 'edit_tipo',\n\t\t\t'delete_terms' => 'delete_tipo',\n\t\t\t'assign_terms' => 'assign_tipo'\n\t\t)\n\t);\n\n\t$labels_convocatorias_categorias = array(\n\t\t'name' => _x( 'Categorías', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Categoría', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Categorías' ),\n\t\t'all_items' => __( 'Todas las Categorías' ),\n\t\t'parent_item' => __( 'Categoría Padre' ),\n\t\t'parent_item_colon' => __( 'Categoría Padre:' ),\n\t\t'edit_item' => __( 'Editar Categoría' ),\n\t\t'update_item' => __( 'Actualizar Categoría' ),\n\t\t'add_new_item' => __( 'Agregar Nueva Categoría' ),\n\t\t'new_item_name' => __( 'Nombre de Nueva Categoría' ),\n\t\t'menu_name' => __( 'Categorías' )\n\t);\n\n\t$args_convocatorias_categorias = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_convocatorias_categorias,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_cat-convocatorias',\n\t\t\t'edit_terms' => 'edit_cat-convocatorias',\n\t\t\t'delete_terms' => 'delete_cat-convocatorias',\n\t\t\t'assign_terms' => 'assign_cat-convocatorias'\n\t\t)\n\t);\n\n\t$labels_convocatorias_estados = array(\n\t\t'name' => _x( 'Estados', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Estado', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Estados' ),\n\t\t'all_items' => __( 'Todas los Estados' ),\n\t\t'parent_item' => __( 'Estado Padre' ),\n\t\t'parent_item_colon' => __( 'Estado Padre:' ),\n\t\t'edit_item' => __( 'Editar Estado' ),\n\t\t'update_item' => __( 'Actualizar Estado' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo Estado' ),\n\t\t'new_item_name' => __( 'Nombre de Nuevo Estado' ),\n\t\t'menu_name' => __( 'Estados' )\n\t);\n\n\t$args_convocatorias_estados = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_convocatorias_estados,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_est-convocatorias',\n\t\t\t'edit_terms' => 'edit_est-convocatorias',\n\t\t\t'delete_terms' => 'delete_est-convocatorias',\n\t\t\t'assign_terms' => 'assign_est-convocatorias'\n\t\t)\n\t);\n\n\t$labels_servicios_condiciones = array(\n\t\t'name' => _x( 'Condiciones', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Condición', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Condiciones' ),\n\t\t'all_items' => __( 'Todas las Condiciones' ),\n\t\t'parent_item' => __( 'Condición Padre' ),\n\t\t'parent_item_colon' => __( 'Condición Padre:' ),\n\t\t'edit_item' => __( 'Editar Condición' ),\n\t\t'update_item' => __( 'Actualizar Condición' ),\n\t\t'add_new_item' => __( 'Agregar Nueva Condición' ),\n\t\t'new_item_name' => __( 'Nombre de Nueva Condición' ),\n\t\t'menu_name' => __( 'Condiciones' )\n\t);\n\n\t$args_servicios_condiciones = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_servicios_condiciones,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_condiciones',\n\t\t\t'edit_terms' => 'edit_condiciones',\n\t\t\t'delete_terms' => 'delete_condiciones',\n\t\t\t'assign_terms' => 'assign_condiciones'\n\t\t)\n\t);\n\n\t$labels_directorios_grupos = array(\n\t\t'name' => _x( 'Grupos', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Grupo', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar Grupos' ),\n\t\t'all_items' => __( 'Todos los Grupos' ),\n\t\t'parent_item' => __( 'Grupo Padre' ),\n\t\t'parent_item_colon' => __( 'Grupo Padre:' ),\n\t\t'edit_item' => __( 'Editar Grupo' ),\n\t\t'update_item' => __( 'Actualizar Grupo' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo Grupo' ),\n\t\t'new_item_name' => __( 'Nombre de Nuevo Grupo' ),\n\t\t'menu_name' => __( 'Grupos' )\n\t);\n\n\t$args_directorios_grupos = array(\n\t\t'public' \t\t\t=> true,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels_directorios_grupos,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'capabilities'\t\t=> array(\n\t\t\t'manage_terms' => 'manage_grupos',\n\t\t\t'edit_terms' => 'edit_grupos',\n\t\t\t'delete_terms' => 'delete_grupos',\n\t\t\t'assign_terms' => 'assign_grupos'\n\t\t)\n\t);\n\n\tregister_taxonomy( 'productor', 'producto', $args_producto_productor );\n\tregister_taxonomy( 'marca', 'producto', $args_producto_marca );\n\tregister_taxonomy( 'lugar', 'producto', $args_producto_lugar );\n\tregister_taxonomy( 'clasificacion', 'producto', $args_producto_clasificacion );\n\tregister_taxonomy( 'posiciones', 'banners', $args_banner_posicion );\n\tregister_taxonomy( 'tipos', 'documentos', $args_documentos_tipos );\n\tregister_taxonomy( 'cat-convocatorias', 'convocatorias', $args_convocatorias_categorias );\n\tregister_taxonomy( 'est-convocatorias', 'convocatorias', $args_convocatorias_estados );\n\tregister_taxonomy( 'condiciones', 'servicios', $args_convocatorias_estados );\n\tregister_taxonomy( 'grupos', 'directorios', $args_directorios_grupos );\n}",
"function apachesolr_add_taxonomy_to_document(&$document, $node) {\r\n if (isset($node->taxonomy) && is_array($node->taxonomy)) {\r\n foreach ($node->taxonomy as $term) {\r\n // Double indexing of tids lets us do effecient searches (on tid)\r\n // and do accurate per-vocabulary faceting.\r\n\r\n // By including the ancestors to a term in the index we make\r\n // sure that searches for general categories match specific\r\n // categories, e.g. Fruit -> apple, a search for fruit will find\r\n // content categorized with apple.\r\n $ancestors = taxonomy_get_parents_all($term->tid);\r\n foreach ($ancestors as $ancestor) {\r\n $document->setMultiValue('tid', $ancestor->tid);\r\n $document->setMultiValue('im_vid_'. $ancestor->vid, $ancestor->tid);\r\n $name = apachesolr_clean_text($ancestor->name);\r\n $document->setMultiValue('vid', $ancestor->vid);\r\n $document->{'ts_vid_'. $ancestor->vid .'_names'} .= ' '. $name;\r\n // We index each name as a string for cross-site faceting\r\n // using the vocab name rather than vid in field construction .\r\n $document->setMultiValue('sm_vid_'. apachesolr_vocab_name($ancestor->vid), $name);\r\n }\r\n }\r\n }\r\n}",
"function add_term_select( int $post_id, string $key, string $label, string $taxonomy, string $field = 'slug' ): void {\n\t\t\\wpinc\\meta\\add_term_select( $post_id, $key, $label, $taxonomy, $field );\n\t}"
] | [
"0.67734736",
"0.66669804",
"0.66658217",
"0.6472775",
"0.63904774",
"0.6362235",
"0.6268447",
"0.61853176",
"0.61195606",
"0.60992706",
"0.6021164",
"0.6012034",
"0.5915025",
"0.5909547",
"0.5908359",
"0.5904129",
"0.58961135",
"0.58721566",
"0.5854551",
"0.5843004",
"0.57947433",
"0.5791438",
"0.5779852",
"0.5779204",
"0.57787055",
"0.57752097",
"0.5774916",
"0.5773837",
"0.57589346",
"0.5757656",
"0.574406",
"0.5734106",
"0.5731663",
"0.57288194",
"0.5713489",
"0.570377",
"0.5699428",
"0.56973064",
"0.5694909",
"0.56924105",
"0.56674916",
"0.5664854",
"0.566397",
"0.56606144",
"0.566017",
"0.5649035",
"0.56396514",
"0.56173897",
"0.56129843",
"0.5610231",
"0.56078535",
"0.55910313",
"0.5590938",
"0.55872804",
"0.5575392",
"0.55713123",
"0.5569483",
"0.5569483",
"0.5569483",
"0.5551021",
"0.55437934",
"0.5543175",
"0.55365413",
"0.55304974",
"0.5529734",
"0.5493015",
"0.54922825",
"0.54879427",
"0.54845184",
"0.5475398",
"0.5473928",
"0.5469368",
"0.5467744",
"0.54556435",
"0.5454883",
"0.54540133",
"0.5435555",
"0.543065",
"0.543055",
"0.542634",
"0.54245734",
"0.54239064",
"0.5423576",
"0.5422726",
"0.5421113",
"0.542088",
"0.54157233",
"0.5414767",
"0.54143924",
"0.5413281",
"0.541048",
"0.54063195",
"0.53961825",
"0.5388735",
"0.5382806",
"0.5379379",
"0.5375388",
"0.5373219",
"0.53686357",
"0.53676033"
] | 0.5937434 | 12 |
Get branch with largest ancestors | public static function getBranchWithLargestAncestors(array $object_ids, $object_type, $resource_type)
{
$sorting_list = array();
$ancestors = self::getAncestors($object_ids, $object_type, $resource_type);
if (!count($ancestors)) {
$main_key = key($ancestors);
} else {
foreach ($ancestors as $key => $value) {
$sorting_list[ $key ] = count((array) $value);
}
arsort($sorting_list);
reset($sorting_list);
$main_key = key($sorting_list);
}
return array($main_key => $ancestors[ $main_key ]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cognitivefactory_tree_get_upper_branch($id, $includeStart = false, $returnordering = false) {\n global $CFG, $DB;\n\n $nodelist = array();\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if ($includeStart) $nodelist[] = ($returnordering) ? $res->intvalue : $id ; \n while($res->itemdest != 0) {\n $res = $DB->get_record($table, array('id' => $res->itemdest, 'operatorid' => 'hierarchize'));\n $nodelist[] = ($returnordering) ? $res->intvalue : $res->itemdest;\n }\n $nodelist = array_reverse($nodelist);\n return $nodelist;\n}",
"function get_max_depth($cat_id)\n{\n\tglobal $db;\n\tif ($cat_id < 0) $cat_id = 0;\n\t$local_depth = 0;\n\t$sql = \"select * from \" . CATEGORIES_TABLE . \" where cat_main = $cat_id\";\n\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie parm', '', __LINE__, __FILE__, $sql);\n\twhile ( $row = $db->sql_fetchrow($result) )\n\t{\n\t\t$branch_depth = get_max_depth( $row['cat_id'] );\n\t\tif ( $cat_id > 0 ) $branch_depth++;\n\t\tif ( $branch_depth > $local_depth ) $local_depth = $branch_depth;\n\t}\n\treturn $local_depth;\n}",
"function bfs(Node $origin, $max, $visitFlag) {\n \n $list = [];\n $origin->_visited = $visitFlag;\n $origin->_depth = 0;\n $list[] = $origin;\n $maxDepth = -1;\n \n while (!empty($list)) {\n $node = array_pop($list);\n $n = $node->_first;\n //error_log(\"key: \" . $visitFlag . \", node: \" . $node->_id . \", depth: \" . $node->_depth);\n while ($n) {\n if ($n->_visited != $visitFlag) {\n $n->_visited = $visitFlag;\n $n->_depth = $node->_depth + 1;\n if ($max != -1 && $n->_depth >= $max) {\n return $max;\n }\n $list[] = $n;\n if ($n->_depth > $maxDepth || $maxDepth == -1) {\n $maxDepth = $n->_depth;\n }\n }\n $n = $n->_next;\n }\n $n = $node->_parent;\n if ($n && $n->_visited != $visitFlag) {\n $n->_visited = $visitFlag;\n $n->_depth = $node->_depth + 1;\n $list[] = $n;\n if ($n->_depth > $maxDepth || $maxDepth == -1) {\n $maxDepth = $n->_depth;\n }\n }\n }\n \n return $maxDepth;\n}",
"function get_smallest_leaf($tree)\n{\n $leaves = has_children($tree);\n return is_array($leaves)? min(get_values($leaves)) : $leaves;\n}",
"function get_post_top_ancestor_id(){\n global $post;\n \n if($post->post_parent){\n $ancestors = array_reverse(get_post_ancestors($post->ID));\n return $ancestors[0];\n }\n \n return $post->ID;\n}",
"function get_top_ancestor_id(){\n\tglobal $post;\n\tif($post->post_parent){\n\t\t$ancestors= array_reverse(get_post_ancestors($post->ID));\n\t\treturn $ancestors[0];\n\t}\t\n\treturn $post->ID;\n}",
"public function getDepthMaximum(): PositiveInteger;",
"function get_top_ancestor_id() {\n\n global $post;\n\n if ( $post->post_parent) {\n $ancestors = array_reverse(get_post_ancestors($post->ID));\n return $ancestors[0];\n }\n return $post->ID;\n}",
"public function getMaxBaths();",
"public function getMaxDepth(): ?int;",
"public function getMaxDepth(): ?int;",
"function cognitivefactory_tree_get_max_ordering($cognitivefactoryid, $userid=null, $groupid=0, $istree = false, $fatherid = 0) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n $operator = ($istree) ? 'hierarchize' : 'order' ;\n $treeClause = ($istree) ? \"AND itemdest = {$fatherid}\" : '';\n $sql = \"\n SELECT \n MAX(intvalue) as position\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}'\n {$accessClause}\n {$treeClause}\n \";\n\n if (!$result = $DB->get_record_sql($sql)) {\n $result->position = 1;\n }\n return $result->position;\n}",
"public function hierarchy() : int\n {\n return DB::table('ranks')\n ->join('user_ranks', 'ranks.rank_id', '=', 'user_ranks.rank_id')\n ->where('user_id', $this->id)\n ->max('ranks.rank_hierarchy');\n }",
"public function getMaximumDepth()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = 'SELECT MAX(depth) depth FROM '.$this->table_tree;\n\t\t$res = $ilDB->query($query);\t\t\n\t\t\n\t\t$row = $ilDB->fetchAssoc($res);\n\t\treturn $row['depth'];\n\t}",
"function frg_ancestor_id()\n{\n global $post;\n\n if ( $post->post_parent ) {\n $ancestors = array_reverse( get_post_ancestors( $post->ID ) );\n return $ancestors[0];\n }\n\n return $post->ID;\n}",
"protected function fetchAdjacentGreater(){\r\n $query = static::prepareSQL(\r\n 'SELECT *\r\n FROM %table\r\n WHERE %orderby_col > ?\r\n AND parent_id = ?\r\n ORDER BY %orderby_col\r\n LIMIT 1'\r\n );\r\n\r\n $query->execute([$this->{$this->orderby}, $this->parent_id]);\r\n return $query->fetch();\r\n }",
"public function getMainTalentBranch(){\r\n\t \t$result = 0;\r\n\t \t$branch1 = intval($this->getMainTalentBranch1());\r\n\t \t$branch2 = intval($this->getMainTalentBranch2());\r\n\t \t$branch3 = intval($this->getMainTalentBranch3());\r\n\t \tif(($branch1 <> 0) && ($branch1 > $branch2) && ($branch1 > $branch3)) {\r\n\t\t \t$result = 1;\r\n\t \t} elseif(($branch2 <> 0) && ($branch2 > $branch1) && ($branch2 > $branch3)) {\r\n\t\t \t$result = 2;\r\n\t \t} elseif(($branch3 <> 0) && ($branch3 > $branch1) && ($branch3 > $branch2)) {\r\n\t\t \t$result = 3;\r\n\t \t}\r\n\t\treturn $result;\r\n\t}",
"public function getAltTalentBranch(){\r\n\t \t$result = 0;\r\n\t \t$branch1 = intval($this->getAltTalentBranch1());\r\n\t \t$branch2 = intval($this->getAltTalentBranch2());\r\n\t \t$branch3 = intval($this->getAltTalentBranch3());\r\n\t \tif(($branch1 <> 0) && ($branch1 > $branch2) && ($branch1 > $branch3)) {\r\n\t\t \t$result = 1;\r\n\t \t} elseif(($branch2 <> 0) && ($branch2 > $branch1) && ($branch2 > $branch3)) {\r\n\t\t \t$result = 2;\r\n\t \t} elseif(($branch3 <> 0) && ($branch3 > $branch1) && ($branch3 > $branch2)) {\r\n\t\t \t$result = 3;\r\n\t \t}\r\n\t\treturn $result;\r\n\t}",
"public function getPostMaximumDepth($a_thr_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$res = $ilDB->queryf('\n\t\t\tSELECT MAX(depth) FROM frm_posts_tree\n\t\t\tWHERE thr_fk = %s',\n\t\t\tarray('integer'),array($a_thr_id));\n\t\t\t\n\t\t$row = $res->fetchRow();\n\t\t\n\t\treturn $row[0];\n\t}",
"protected function fetchAdjacentLesser(){\r\n $query = static::prepareSQL(\r\n 'SELECT *\r\n FROM %table\r\n WHERE %orderby_col < ?\r\n AND parent_id = ?\r\n ORDER BY %orderby_col DESC\r\n LIMIT 1'\r\n );\r\n\r\n $query->execute([$this->{$this->orderby}, $this->parent_id]);\r\n return $query->fetch();\r\n }",
"public static function getMaxGraphicStateNestingLevel() {}",
"public function countAncestors();",
"function solution($T) {\n if (!is_object($T) ) {\n return -1;\n }\n //elseif ((is_null($T->l) && is_null($T->r)) {\n // return 0; //no children\n //}\n \n $heightLeft = -1;\n $heightRight = -1;\n \n if($T->l != null) {\n $heightLeft = solution($T->l);\n }\n if($T->r != null) {\n $heightRight = solution($T->r);\n }\n \n if($heightLeft > $heightRight){\n return $heightLeft+1;\n }\n else{\n return $heightRight+1;\n }\n \n return -1; //empty\n}",
"function _wswwpx_page_get_ancestor_ids ( $child = 0, $inclusive=true, $topdown=true ) {\n \tif ( $child && $inclusive ) $ancestors[] = $child;\n \twhile ($parent = _wswwpx_page_get_parent_id ( $child ) ) {\n \t\t$ancestors[] = $parent;\n \t\t$child = $parent;\n \t}\n \t//\tIf there are ancestors, test for resorting, and apply\n \tif ($ancestors && $topdown) krsort($ancestors);\n\tif ( !$ancestors ) $ancestors[] = 0;\n \t//\n \treturn $ancestors;\n }",
"public function getAncestors();",
"public function getBranches();",
"public function getParents() {\n\t\tif ($this->_parents === null) {\n\t\t\t$this->_parents = array();\n\t\t\t$command = 'show --pretty=\"format:%P\" '.$this->hash;\n\t\t\tforeach(explode(' ',$this->branch->repository->run($command)) as $commitHash) {\n\t\t\t\tif (!empty($commitHash)) {\n\t\t\t\t\t$this->_parents[$commitHash] = $this->branch->getCommit($commitHash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_parents;\n\t}",
"public function GetMax() {\r\n if($this->root == null)\r\n return null;\r\n\r\n $node = $this->root;\r\n\r\n while($node->right != null)\r\n $node = $node->right;\r\n\r\n return $node;\r\n }",
"public function maxDepth()\n {\n if ($this->maxDepth === null) {\n return static::DEFAULT_MAX_DEPTH;\n }\n\n return $this->maxDepth;\n }",
"public function getMaxRecursionDepth() {\n\t\treturn $this->_maxRecursionDepth;\n\t}",
"function ancestors() {\n\t\t$ancestors = array();\n\t\tfor ($here = $this ; $here !== NULL ; $here = $here->_parent) {\n\t\t\t$ancestors []= $here;\n\t\t}\n\t\treturn array_reverse($ancestors);\n\t}",
"function find_gaps()\n\t{\n\t\t// Get all lfts and rgts and sort them in a list\n\t\tee()->db->select('lft, rgt');\n\t\tee()->db->order_by('lft','asc');\n\t\t$table = ee()->db->get( $this->tree_table );\n\n\t\t$nums = array();\n\n\t\tforeach($table->result() as $row)\n\t\t{\n\t\t\t$nums[] = $row->{'lft'};\n\t\t\t$nums[] = $row->{'rgt'};\n\t\t}\n\t\t\n\t\tsort($nums);\n\t\t\n\t\t// Init vars for looping\n\t\t$old = array();\n\t\t$current = 1;\n\t\t$foundgap = 0;\n\t\t$gaps = array();\n\t\t$current = 1;\n\t\t$i = 0;\n\t\t$max = max($nums);\n\t\twhile($max >= $current)\n\t\t{\n\t\t\t$val = $nums[$i];\n\t\t\tif($val == $current)\n\t\t\t{\n\t\t\t\t$old[] = $val;\n\t\t\t\t$foundgap = 0;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// have gap or duplicate\n\t\t\t\tif($val > $current)\n\t\t\t\t{\n\t\t\t\t\tif(!$foundgap)$gaps[] = array('start'=>$current,'size'=>1);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$gaps[count($gaps) - 1]['size']++;\n\t\t\t\t\t}\n\t\t\t\t\t$foundgap = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$current++;\n\t\t}\n\t\treturn count($gaps) > 0 ? $gaps : false;\n\t}",
"public function getMaxChildrenPerFamily()\n {\n return $this->maxChildrenPerFamily;\n }",
"public function ancestorsGetDepth()\r\n {\r\n if (!isset($this->depth))\r\n {\r\n $this->depth = substr_count($this->path, \"/\");\r\n }\r\n \r\n return (int) $this->depth;\r\n }",
"private function computeMaxDepth($node){\n\t\t$children = $node->getElements('DEPENDENCY');\n\t\tif(sizeof($children) == 0){\n\t\t\t$children = $node->getElements('DEPENDENCIES/DEPENDENCY');\n\t\t}\n\t\tif(sizeof($children) == 0){\n\t\t\t$children = $node->getElements('DEPENDENCIES');\n\t\t}\n\t\t$maxDepth = 0;\n\t\tforeach($children as $childNode){\n\t\t\t$childDepth = $this->computeMaxDepth($childNode);\n\t\t\tif($childDepth > $maxDepth){\n\t\t\t\t$maxDepth = $childDepth;\n\t\t\t}\n\t\t}\n\t\treturn 1 + $maxDepth;\n\t}",
"function max_parent( $dirpath, $prefix )\n{\n $dirpath = rtrim ( $dirpath, \"/\" ); // Trim any trailing slash\n $position = strrpos( $dirpath, \"/\" );\n $dirpath = substr ( $dirpath, 0, $position );\n\n $lines = http_get_file( $dirpath );\n\n $regex_match = \"#${prefix}[\\d\\.]+/#\";\n $regex_replace = \"#^.*(${prefix}[\\d\\.]+)/.*$#\";\n $max = find_max( $lines, $regex_match, $regex_replace );\n\n return \"$dirpath/$max\";\n}",
"public function last_level($n) {\n\t\t$levels = array();\n\t\t$levels[0] = $this;\n\t\t$c = 1;\n\t\t$link = $this->selected_link();\n\t\tif (!$link) return false;\n\t\twhile ($link) {\n\t\t\tif (!$link->sublinks) break;\n\t\t\t$sl = $link->sublinks->selected_link();\n\t\t\tif (!$sl) break;\n\t\t\t$levels[$c] = $link->sublinks;\n\t\t\t$link = $sl;\n\t\t\t$c++;\n\t\t}\n\t\tif (sizeof($levels)<$n+1) return false;\n\t\treturn $levels[sizeof($levels)-1-$n];\n\t}",
"public function getOuterMostParent() {}",
"function solution(iterable $a): int\n{\n $top = null;\n $bottom = null;\n $depth = null;\n\n foreach ($a as $altitude) {\n if ($top <= $altitude) {\n if ($bottom) {\n $tmpDepth = $top - $bottom;\n\n if (!$depth || $depth < $tmpDepth) {\n $depth = $tmpDepth;\n $bottom = null;\n }\n }\n\n $top = $altitude;\n } else {\n if (!$bottom || $bottom > $altitude) {\n $bottom = $altitude;\n }\n\n if ($bottom < $altitude) {\n $tmpDepth = $altitude - $bottom;\n\n if (!$depth || $depth < $tmpDepth) {\n $depth = $tmpDepth;\n }\n }\n }\n }\n\n return $depth ?? 0;\n}",
"public function getMaxComponentDepth() {}",
"public function getMaxNbChilds()\n {\n return $this->getOption('max', 0);\n }",
"protected function maxCompare()\n {\n if(! $this->isEmpty()) {\n\n if(is_null($this->maxComparator)) {\n $this->maxComparator = $this->first();\n }\n\n foreach($this->items as $comparator) {\n if($comparator->getPoints() > $this->maxComparator->getPoints()) {\n $this->maxComparator = $comparator;\n }\n }\n\n return $this->maxComparator;\n }\n }",
"function test_get_sub_branch()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Create a new tree\r\n\t\t$relation_tree = $this->_create_sub_node($rnc, $depth, $npl);\r\n\t\t//$allnodes = $this->_tree->get_all_nodes();\r\n\t\tforeach($relation_tree AS $nid => $relations)\r\n\t\t{\r\n\t\t\t$subbranch = $this->_tree->get_sub_branch($nid);\r\n\t\t\t$exp_sub_branch = $this->_traverse_child_relations($relation_tree, $nid, true, true);\r\n\t\t\t$this->assertEqual($subbranch, $exp_sub_branch, 'Differs from relation traversal result.');\r\n\t\t} \r\n\t\treturn true;\r\n\t}",
"function test_get_branch()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Create a new tree\r\n\t\t$this->_create_sub_node($rnc, $depth, $npl);\r\n\t\t$allnodes = $this->_tree->get_all_nodes();\r\n\t\t$branch = $this->_tree->get_branch($npl, true);\r\n\t\t$this->assertEqual($allnodes, $branch, 'Result differs from getAllNodes()');\r\n\t}",
"public function getMaxNesting()\n {\n return $this->maxNesting;\n }",
"function get_post_ancestors($post)\n {\n }",
"public function getBranchOf()\n {\n return $this->branchOf;\n }",
"public function getDepthCurrent(): PositiveInteger;",
"public function getMaxStackElements() {}",
"public function getDepth():int;",
"public function getDepth();",
"protected function determineBuildBranchAncestor($branch) {\n // Check whether the latest build of the production branch is something we\n // can start from with.\n $productionBranch = $this->phappManifest->getGitBranchProduction();\n $productionBuildBranch = $this->phappManifest->getGitBranchForBuild($productionBranch);\n $process = $this->_execSilent(\"git log --format=oneline $productionBuildBranch --grep \\\"Build .* commit \\\"\");\n\n if ($process->isSuccessful() && $output = $process->getOutput()) {\n // Parse the message to get the source commit hash.\n list($first_line) = explode(\"\\n\", $output, 2);\n $matches = [];\n if (preg_match('/Build .* commit (\\S*)./', $first_line, $matches)) {\n $sourceCommit = $matches[1];\n }\n }\n\n // If the source commit of the last build has been found, verify the\n // to-be-built branch is based upon it. Else, we need to start a new build\n // branch.\n if (!empty($sourceCommit)) {\n $process = $this->_execSilent(\"git log --format=oneline $sourceCommit..$branch\");\n $sourceIsParent = $process->isSuccessful() && $process->getOutput() != '';\n\n if ($sourceIsParent) {\n return $productionBuildBranch;\n }\n\n // Check whether the source commit is the same as to-be-built commit.\n $process = $this->_execSilent(\"git reflog $sourceCommit\");\n $hash1 = $process->isSuccessful() ? $process->getOutput() : FALSE;\n $process = $this->_execSilent(\"git reflog $branch\");\n $hash2 = $process->isSuccessful() ? $process->getOutput() : FALSE;\n if ($hash1 && $hash2 && $hash1 == $hash2) {\n return $productionBuildBranch;\n }\n }\n\n // No relationship between the to-be-built and the last built commit could\n // be found. Thus, start a new build branch based upon the to-be-built\n // branch.\n return $branch;\n }",
"function simple_pages_earliest_ancestor_page($pageId)\n{\n if ($pageId === null) {\n $page = get_current_record('simple_pages_page');\n } else {\n $page = get_db()->getTable('SimplePagesPage')->find($pageId);\n }\n\n $pageAncestors = get_db()->getTable('SimplePagesPage')->findAncestorPages($page->id);\n return end($pageAncestors);\n}",
"function getAncestors () {\r\n\t\t$ancestors = array ($this);\r\n\t\t$parent = $this->_parent;\r\n\t\twhile ($parent != null) {\r\n\t\t\tarray_unshift ($ancestors, $parent);\r\n\t\t\t$parent = $parent->getParent();\r\n\t\t}\r\n\t\treturn $ancestors;\r\n\t}",
"function getAncestors () {\r\n\t\t$ancestors = array ($this);\r\n\t\t$parent = $this->_parent;\r\n\t\twhile ($parent != null) {\r\n\t\t\tarray_unshift ($ancestors, $parent);\r\n\t\t\t$parent = $parent->getParent();\r\n\t\t}\r\n\t\treturn $ancestors;\r\n\t}",
"function get_highest($array, $key)\n {\n $n[$key] = -99999999999;\n foreach ($array as $value) {\n if ($value[$key] >= $n[$key]) {\n $n = $value;\n }\n }\n\n return $n;\n }",
"public function getBreadth() {\r\n return $this->breadth;\r\n }",
"public function getMinNbChilds()\n {\n return $this->getOption('min', 0);\n }",
"protected function getRemoteClassHierarchy()\n {\n return ClassInfo::ancestry($this->targetClass, true);\n }",
"function & get_sub_branch($id, $add_sql = array(), $include_parent = false)\r\n\t{\r\n\t\tif (!($parent = $this->get_node($id)))\r\n\t\t{\r\n \tdebug :: write_error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\t\tif ($this->_sort_mode == NESE_SORT_LEVEL)\r\n\t\t{\r\n\t\t\t$sql = sprintf('SELECT %s %s FROM %s %s\r\n\t WHERE %s.l BETWEEN %s AND %s AND %s.root_id=%s AND %s.id!=%s %s\r\n\t ORDER BY %s.level, %s.%s ASC',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(), \n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, \n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $parent['l'], $parent['r'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $parent['root_id'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $id,\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, \n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, \n\t\t\t\t\t\t\t\t\t\t\t$this->_secondary_sort);\r\n\t\t} \n\t\telseif ($this->_sort_mode == NESE_SORT_PREORDER)\r\n\t\t{\n\t\t\t$sql = sprintf('SELECT %s %s FROM %s %s\r\n\t WHERE %s.l BETWEEN %s AND %s AND %s.root_id=%s AND %s.id!=%s %s\r\n\t ORDER BY %s.l ASC',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(), \n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, \n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $parent['l'], $parent['r'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $parent['root_id'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $id,\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'), \r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table);\r\n\t\t} \n\t\t\r\n\t\t$node_set = array();\n\t\t\n\t\tif($include_parent)\n\t\t{\n\t\t\t$node_set[$id] = $parent;\n\t\t}\n\t\t\n\t\t$this->_assign_result_set($node_set, $sql);\r\n\r\n\t\tif ($this->_secondary_sort != $this->_default_secondary_sort)\r\n\t\t{\r\n\t\t\tuasort($node_set, array($this, '_sec_sort'));\r\n\t\t} \n\t\t\n\t\treturn $node_set;\r\n\t}",
"function get_hierarchy_filter($setting,$optparent=null,$branchparent=0,$published=null,$maxlevel=9999)\n {\n $data=$this->_prepareData(null,$optparent,$published) ;\n $children=$this->_make_relation($data) ;\n // echo \"<br>---list Child----<br>\"; print_r($children);\n $list = $this->_filter_recurse($branchparent, $children, '', $maxlevel,0,'',$setting);\n //echo \"<br>---list ----<br>\"; print_r($list);\n return $list;\n }",
"function ep_post_depth() {\n\tglobal $post;\n\t$depth = 0;\n\t$parents = get_post_ancestors($post);\n\tif ($parents) {\n\t\tforeach ($parents as $one_parent_id) {\n\t\t\t$parent_post = get_post($parent_post);\n\t\t\tif ($parent_post->post_parent) {\n\t\t\t\t$depth++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $depth;\n}",
"function Ancestors($page) {\n\n\t\t$breadcrumbs = array();\n\n\t\tif ( $page->URLSegment == 'home' )\n\t\t\treturn $breadcrumbs;\n\n\t\t//Debug::Log( 'Ancestors: ' . $page->ID . ' - ' .$page->MenuTitle . ' has parent ' . $page->ParentID );\n\n\t\t// Add ancestor pages to the array\n\t\tif ( $page->ParentID )\n\t\t\t$breadcrumbs += $this->Ancestors( $page->Parent() );\n\n\t\t// Add the page to the array\n\t\tif ( get_class($page) != 'SubmenuHolder' )\n\t\t\t$breadcrumbs[] = $page;\n\n\t\treturn $breadcrumbs;\n\t}",
"protected final function get_ancestors()\n\t{\n\t\tif(!isset($this->parent))\n\t\t\treturn array($this->id);\n\t\t\t\n\t\treturn array_merge($this->parent->get_ancestors(),array($this->id));\t\n\t}",
"private function maxOrderListOfParent($id_parent)\n {\n $max = 0;\n $tree = self::getRecursiveTreeWithSelf($id_parent);\n if ( $tree ) {\n foreach ( $tree as $comment ) {\n if ( $comment['order_list'] > $max ) {\n $max = $comment['order_list'];\n }\n }\n }\n return $max;\n }",
"protected function getOuterMostInstance() {}",
"public function getLastChild()\n\t{\n\t\treturn $this->children[count($this->children)-1];\n\t}",
"public function getNumberDescendants();",
"function testmaxDepth($A, $answer){\n\t\t$s = new Solution();\n\t\t\n\t\t// call fun\n\t\t// $s->maxDepth($root);\n\t\t$this->assertTrue(true);\n\t}",
"public function getDepth() {}",
"public function getDepth() {}",
"function _versioncontrol_git_log_get_branches() {\n $logs = _versioncontrol_git_log_exec('git show-ref --heads'); // Query branches.\n $branches = _versioncontrol_git_log_parse_branches($logs); // Parse output.\n return $branches;\n}",
"public function getMaxConfs()\n {\n return $this->max_confs;\n }",
"public function getLeafPrototype();",
"function getBrowseTree() {\n # -> list of top_basisklassen and their document count\n $bkls_top_facet = getBkltopFacet($GLOBALS['base_url'],\n $GLOBALS['bkl_top_query']);\n $bkls_top = array();\n $bkls_top_counts = array();\n foreach ($bkls_top_facet[\"bkl_top_caption\"] as $k => $v) {\n if ($k % 2 == 0) {\n if (strlen($v) > 0) {\n $bkls_top[] = $v;\n $bkls_top_counts[] = $bkls_top_facet[\"bkl_top_caption\"][$k+1];\n }\n }\n }\n array_multisort($bkls_top, SORT_ASC, $bkls_top_counts);\n # multicurl bkl_facet for top_bkls\n $bkl_facetdata = getBklFacetData($GLOBALS['base_url'],\n $GLOBALS['bkl_query'],\n $bkls_top);\n # build tree\n $bkl_tree = array();\n $bkl_top_rest = array();\n $bkl_top_rest_cumsum = 0;\n foreach ($bkls_top as $i => $bkl_top) {\n $bkl_facet = $bkl_facetdata[$bkl_top];\n $bkl_top_count = $bkls_top_counts[$i];\n $top_map_params = array();\n if ($bkl_top_count > 100) {\n $cleaned_bkl = array();\n $bkl_rest = array();\n $bkl_rest_cumsum = 0;\n foreach ($bkl_facet as $i => $bkl) {\n if ($bkl[\"count\"] >= 10) {\n $map_params = buildMaplink($GLOBALS['search_url'],\n array($bkl[\"bkl_caption\"]),\n \"bkl\",\n $bkl[\"count\"],\n $bkl_top);\n $cleaned_bkl[] = array(\"bkl_caption\" => $bkl[\"bkl_caption\"],\n \"count\" => $bkl[\"count\"],\n \"map_params\" => $map_params);\n } else {\n $bkl_rest[] = $bkl[\"bkl_caption\"];\n $bkl_rest_cumsum += $bkl[\"count\"];\n }\n }\n $top_map_params = buildMaplink($GLOBALS['search_url'],\n array($bkl_top),\n \"top\",\n $bkl_top_count,\n $bkl_top);\n $rest_map_params = buildMaplink($GLOBALS['search_url'],\n $bkl_rest,\n \"bkl\",\n $bkl_rest_cumsum,\n $bkl_top);\n $cleaned_bkl[] = array(\"bkl_caption\" => implode(\"; \", $bkl_rest),\n \"count\" => $bkl_rest_cumsum,\n \"map_params\" => $rest_map_params);\n $cleaned_bkl = array_filter($cleaned_bkl, function ($bkl) {\n return ($bkl[\"count\"] >= 10);\n });\n $bkl_tree[] = array(\"bkl_top_caption\" => $bkl_top,\n \"count\" => $bkl_top_count,\n \"bkl_facet\" => $cleaned_bkl,\n \"map_params\" => $top_map_params);\n }\n if ($bkl_top_count >= 10 and $bkl_top_count <= 100) {\n $top_map_params = buildMaplink($GLOBALS['search_url'],\n array($bkl_top),\n \"top\",\n $bkl_top_count,\n $bkl_top);\n $bkl_tree[] = array(\"bkl_top_caption\" => $bkl_top,\n \"count\" => $bkl_top_count,\n \"bkl_facet\" => array(),\n \"map_params\" => $top_map_params);\n }\n if ($bkl_top_count < 10) {\n $bkl_top_rest[] = $bkl_top;\n $bkl_top_rest_cumsum += $bkl_top_count;\n }\n }\n $rest_maplink = buildMaplink($GLOBALS['search_url'],\n $bkl_top_rest,\n \"top\",\n $bkl_top_rest_cumsum,\n \"\");\n $bkl_tree[] = array(\"bkl_top_caption\" => implode(\"; \", $bkl_top_rest),\n \"count\" => $bkl_top_rest_cumsum,\n \"bkl_facet\" => array(),\n \"map_params\" => $rest_maplink);\n $bkl_tree = array_filter($bkl_tree, function($bklt) {\n return(array($bklt[\"count\"] >= 10));\n });\n return json_encode($bkl_tree, JSON_UNESCAPED_UNICODE);\n}",
"public function last_level($n=0) {\n\t\treturn $this->sets[':default']->last_level($n);\n\t}",
"function & get_branch($id, $add_sql = array())\r\n\t{\r\n\t\tif (!($this_node = $this->get_node($id)))\r\n\t\t{\r\n \tdebug :: write_error('NESE_ERROR_NOT_FOUND',\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\t\tif ($this->_sort_mode == NESE_SORT_LEVEL)\r\n\t\t{\r\n\t\t\t$sql = sprintf('SELECT %s %s FROM %s %s WHERE %s.root_id=%s %s ORDER BY %s.level, %s.%s ASC',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $this_node['root_id'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $this->_secondary_sort);\r\n\t\t} \n\t\telseif ($this->_sort_mode == NESE_SORT_PREORDER)\r\n\t\t{\r\n\t\t\t$sql = sprintf('SELECT %s %s FROM %s %s WHERE %s.root_id=%s %s ORDER BY %s.l ASC',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $this_node['root_id'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table);\r\n\t\t} \r\n\r\n\t\t$node_set =& $this->_get_result_set($sql);\r\n\r\n\t\tif ($this->_sort_mode == NESE_SORT_PREORDER && ($this->_secondary_sort != $this->_default_secondary_sort))\r\n\t\t{\r\n\t\t\tuasort($node_set, array($this, '_sec_sort'));\r\n\t\t} \r\n\t\treturn $node_set;\r\n\t}",
"function ww_get_top_parent( $id = null ) {\n global $post;\n $temp_post = $id ? get_post( $id ) : $post;\n while( $temp_post->post_parent != 0 ) {\n $temp_post = get_post( $temp_post->post_parent );\n }\n return $temp_post;\n}",
"public function getBranchesBranch()\n {\n return $this->hasOne(Branches::className(), ['branch_id' => 'branches_branch_id']);\n }",
"function cognitivefactory_tree_down($cognitivefactoryid, $userid, $groupid, $id, $istree=1) {\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n $operator = ($istree) ? 'hierarchize' : 'order' ;\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n $sql = \"\n SELECT \n MAX(intvalue) AS ordering\n FROM \n {cognitivefactory_opdata} AS od\n WHERE\n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}'\n {$treeClause}\n {$accessClause}\n \";\n $resmaxordering = $DB->get_record_sql($sql);\n $maxordering = $resmaxordering->ordering;\n if ($res->intvalue < $maxordering) {\n $newordering = $res->intvalue + 1;\n\n $sql = \"\n SELECT \n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}' AND\n intvalue = {$newordering}\n {$treeClause}\n {$accessClause}\n \";\n $result = $DB->get_record_sql($sql);\n $resid = $result->id;\n\n // swapping\n $opdata = new StdClass();\n $opdata->id = $resid;\n $opdata->intvalue = $res->intvalue;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n\n $opdata = new StdClass();\n $opdata->id = $id;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}",
"public function getMinBaths();",
"function get_x_max()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\t$values[] = $value['right'];\n\t\t}\n\n\t\t$x = array_values($values);\n\t\tsort($x);\n\t\treturn array_pop($x);\n\t}",
"public function getLevel()\n {\n return sizeof($this->getParentsID());\n }",
"function _get_post_ancestors(&$post)\n {\n }",
"function five_get_ancestors(){\n\t\t\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_results(\"SELECT ID, post_title, guid FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = 0 AND post_status = 'publish'\");\n\t\treturn $result;\n\t\t}",
"public function ancestors()\r\n {\r\n $return = array();\r\n \r\n $item = $this;\r\n while (!empty($item->parent))\r\n {\r\n $clone = (new static())->load(array(\r\n '_id' => new \\MongoId((string) $item->parent)\r\n ));\r\n unset($item);\r\n if (!empty($clone->id))\r\n {\r\n array_unshift($return, $clone);\r\n if (!empty($clone->parent))\r\n {\r\n $item = $clone;\r\n }\r\n }\r\n }\r\n \r\n return $return;\r\n }",
"public function getParents()\n\t{\n\t\tif ($this->_parents === null) {\n\t\t\t$this->_parents = array();\n\t\t\t$command = 'log --pretty=%P -n 1 '.$this->hash;\n\t\t\tforeach(explode(' ',$this->repository->run($command)) as $commitHash) {\n\t\t\t\tif (!empty($commitHash)) {\n\t\t\t\t\t$this->_parents[$commitHash] = $this->repository->getCommit($commitHash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_parents;\n\t}",
"function find_last($id){\n $query=\"SELECT ID FROM comments WHERE PARENT_ID=\".$id; // looking for parents\n $q=$this->my->query($query); // while there are some\n while($row=$q->fetch_assoc()){ // *\n $this->del=$row['ID']; // *\n $this->find_last($this->del); // we need to go deeper. another recursion\n } // *\n if(!$q->fetch_assoc()){ // looks like he is child-free\n $this->del_magic($this->del); // time to kill\n }\n }",
"public function getMaxBeds();",
"public static function getLastSet() \n\t{\n\t\treturn Set::find(Set::max('id'));\n\t}",
"public function leaves()\n {\n if (($root = $this->roothunt()) === NULL) return NULL;\n return $this->leafhunt($root);\n }",
"public function max() {\n return count($this->flats);\n }",
"static public function getAncestors($visitor_id)\n {\n return Ancestor::where('visitor_id', $visitor_id)->get();\n //return DB::table('ancestors')->where('visitor_id', '=', $visitor_id)->orderBy('surname', 'ASC')->orderBy('forename', 'ASC')->get();\n }",
"public function get_last_level()\n {\n return $this->levels()->order_by(\"dungeon_level\", \"desc\")->first();\n }",
"function max_from_right($values) {\n return array_reverse(max_from_left(array_reverse($values)));\n}",
"public function getNumber_branch()\n {\n return $this->fv_number_branch;\n }",
"public function depth() {\n\t\treturn Hash::depth($this->_value);\n\t}",
"public function withDepthMaximum(PositiveInteger $depthMaximum): static;",
"public function getGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"public function getLowestTopChild()\n {\n $current = $this->getCurrent();\n while (!\\is_null($current)) {\n if ($current instanceof TopMenuItem) {\n return $current;\n }\n $current = $current->getParent();\n }\n\n return null;\n }"
] | [
"0.6419409",
"0.6216446",
"0.6116643",
"0.5980297",
"0.5977099",
"0.5919731",
"0.58947027",
"0.5887451",
"0.5854866",
"0.5827365",
"0.5827365",
"0.57830614",
"0.5723122",
"0.5613739",
"0.5566877",
"0.5552228",
"0.5552221",
"0.5510757",
"0.5488893",
"0.5467931",
"0.5343768",
"0.53400874",
"0.5333463",
"0.5329221",
"0.52806294",
"0.5256091",
"0.5210761",
"0.51453805",
"0.51419824",
"0.51368755",
"0.5122672",
"0.51184005",
"0.5116252",
"0.51045763",
"0.50908595",
"0.5083185",
"0.50731236",
"0.5060225",
"0.50353664",
"0.503424",
"0.500918",
"0.5001529",
"0.49240407",
"0.4912484",
"0.48853597",
"0.48614544",
"0.48568824",
"0.4852207",
"0.4846635",
"0.48460838",
"0.48437238",
"0.48431778",
"0.48373452",
"0.48361033",
"0.48361033",
"0.48274565",
"0.48264554",
"0.48224515",
"0.47830883",
"0.47818628",
"0.47787002",
"0.47756246",
"0.47725165",
"0.47639713",
"0.47637033",
"0.4759879",
"0.47577563",
"0.47547644",
"0.47546437",
"0.47513136",
"0.47510672",
"0.47252753",
"0.47252738",
"0.47197828",
"0.47170573",
"0.47069913",
"0.47016063",
"0.4698058",
"0.46969843",
"0.46925306",
"0.4689892",
"0.4684013",
"0.46817106",
"0.46730378",
"0.46699676",
"0.466849",
"0.46639502",
"0.46620363",
"0.46527648",
"0.4651519",
"0.4646996",
"0.46381435",
"0.4625373",
"0.46181113",
"0.46121502",
"0.46107224",
"0.46082154",
"0.46038124",
"0.46025008",
"0.45955324"
] | 0.5448543 | 20 |
Get the most used taxonomy | public function getMostUsedTaxonomy($post_id)
{
$term_count_taxonomies = array();
$taxonomies = get_object_taxonomies(get_post($post_id));
foreach ($taxonomies as $taxonomy) {
$terms = get_object_term_cache($post_id, $taxonomy);
if (false === $terms) {
$terms = wp_get_object_terms($post_id, $taxonomy, array());
}
$term_count_taxonomies[count($terms)] = $taxonomy;
}
krsort($term_count_taxonomies);
reset($term_count_taxonomies);
return current($term_count_taxonomies);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function get_taxonomy() {\n\t\treturn filter_input( INPUT_GET, 'taxonomy', FILTER_DEFAULT, array( 'options' => array( 'default' => '' ) ) );\n\t}",
"public function getTaxonomy()\n {\n return $this->taxonomy;\n }",
"public function taxonomy();",
"protected function get_current_taxonomy() {\n\t\treturn $this->current_taxonomy;\n\t}",
"public function taxonomy() {\n $parents = array_reverse( $this->get_all_parents( $this->id ) );\n $taxonomy = '';\n\n foreach ( $parents as $category ) {\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n $taxonomy .= $category->name;\n }\n\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n return $taxonomy . $this->name;\n }",
"public function get_taxonomy(){\r\n\t\t$this->tax_obj = get_taxonomy( $this->taxonomy );\r\n\t}",
"public function get()\n {\n if (null === $this->taxonomylist) {\n $this->taxonomylist = $this->build(Grav::instance()['taxonomy']->taxonomy());\n }\n\n return $this->taxonomylist;\n }",
"private function determine_scope() {\n\t\t$taxonomy = $this->get_taxonomy();\n\n\t\tif ( $taxonomy === 'category' ) {\n\t\t\treturn 'category';\n\t\t}\n\n\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\treturn 'tag';\n\t\t}\n\n\t\treturn 'term';\n\t}",
"function getTopGoTerms($ref_gf_id, $n_max) {\n $top_gos = array(\"BP\"=>array(), \"MF\"=>array(), \"CC\"=>array());\n $query\t\t= \"SELECT gf_fd.`name`, fd.`desc`, fd.`info` FROM `gf_functional_data` gf_fd, `functional_data` fd WHERE gf_fd.`gf_id`='\" . $ref_gf_id . \"' AND gf_fd.`type`='go' AND gf_fd.`is_hidden`='0' AND fd.`name`=gf_fd.`name` ORDER BY gf_fd.`f_score` DESC\";\n $res\t\t= $this->query($query);\n foreach($res as $r) {\n $go_aspect = $r['fd']['info'];\n $go_name = $r['gf_fd']['name'];\n $go_desc = $r['fd']['desc'];\n if(count($top_gos[$go_aspect]) < $n_max){\n $top_gos[$go_aspect][] = array(\"name\"=>$go_name, \"desc\"=>$go_desc);\n }\n }\n $top_gos = array_filter($top_gos);\n return $top_gos;\n }",
"public function getTaxonomyType()\n {\n return $this->taxonomy_type;\n }",
"function foucs_show_taxonomy($name_taxonomy, $order_by, $order, $number_term) {\n $args = array(\n 'taxonomy' => $name_taxonomy,\n 'orderby' => $order_by,\n 'order' => $order,\n 'number' => $number_term,\n 'hide_empty' => false,\n );\n $foucs_query = new WP_Term_Query($args);\n ?>\n <ul class=\"all-taxonomy\">\n <?php \n foreach ( $foucs_query->get_terms() as $term ) { ?>\n <li class=\"taxonomy\">\n <a href=\"<?php echo get_term_link( $term ) // Get The Category Link?>\">\n <span class=\"name\">\n <?php echo esc_html($term->name) // Show Category Name?>\n </span>\n </a>\n <span class=\"count-num\"><?php echo esc_html($term->count) // Show Count Post In Category?></span>\n </li>\n <?php\n }?>\n </ul>\n <?php\n}",
"public function getAutonomy()\n {\n return $this->autonomy;\n }",
"public function getTaxonomy()\n {\n return ucwords(\\Present::unslug($this->taxonomy));\n }",
"public function lifedesk_taxa()\n {\n if(isset($this->lifedesk_taxa)) return $this->lifedesk_taxa;\n $this->lifedesk_taxa = 0;\n \n $latest_published_lifedesk_resources = $this->latest_published_lifedesk_resources();\n $result = $this->mysqli_slave->query(\"SELECT COUNT(DISTINCT(he.taxon_concept_id)) count FROM harvest_events_hierarchy_entries hehe JOIN hierarchy_entries he ON (hehe.hierarchy_entry_id=he.id) WHERE hehe.harvest_event_id IN (\".implode($latest_published_lifedesk_resources, \",\").\")\");\n if($result && $row=$result->fetch_assoc()) $this->lifedesk_taxa = $row['count'];\n return $this->lifedesk_taxa;\n }",
"function get_taxonomy($taxonomy)\n {\n }",
"public function getTaxonomyTerms();",
"public function taxonomyName($taxonomy = null);",
"public function getTermTaxonomyTable(): string\n {\n return $this->wpDatabase->term_taxonomy;\n }",
"function wp_popular_terms_checklist($taxonomy, $default_term = 0, $number = 10, $display = \\true)\n {\n }",
"function get_primaryTermName($taxonomy,$id) {\n $primary_term = new WPSEO_Primary_Term($taxonomy,$id); \n $term = get_term_by('id',$primary_term->get_primary_term(),$taxonomy);\n return $term->name; \n}",
"public function getTerm(): int\n {\n return $this->_term;\n }",
"function get_weighted_terms( $taxonomy ) {\n\n $terms = get_terms( $taxonomy );\n foreach( $terms as $term ) {\n $term_weight = (int) get_term_meta( $term->term_id, 'weight', true );\n $term->weight = ($term_weight) ? $term_weight : 0;\n }\n usort($terms, 'sort_by_weight');\n\n //$terms = wp_cache_set( $cache_key, $terms, 'weighted_terms', 86400 ); // one day\n\n return $terms;\n}",
"function get_custom_type_terms($id, $tax) {\n $weekly_types = get_the_terms($id, $tax);\n if ($weekly_types) {\n return $weekly_types[0]->name;\n }\n return false;\n}",
"public function generateTaxonomy($field) {\r\n // will not result in any tags being added.\r\n $machine_name = $field['settings']['allowed_values'][0]['vocabulary'];\r\n $vocabulary = taxonomy_vocabulary_machine_name_load($machine_name);\r\n if ($max = db_query('SELECT MAX(tid) FROM {taxonomy_term_data} WHERE vid = :vid', array(':vid' => $vocabulary->vid))->fetchField()) {\r\n $candidate = mt_rand(1, $max);\r\n $query = db_select('taxonomy_term_data', 't');\r\n $tid = $query\r\n ->fields('t', array('tid'))\r\n ->condition('t.vid', $vocabulary->vid, '=')\r\n ->condition('t.tid', $candidate, '>=')\r\n ->range(0,1)\r\n ->execute()\r\n ->fetchField();\r\n return (int) $tid;\r\n }\r\n }",
"static function get_post_term( $taxonomy ) {\n\t\tglobal $post;\n\t\t$terms = get_the_terms( $post, $taxonomy );\n\t\tif ( ! empty( $terms ) ) {\n\t\t\t$term = reset( $terms );\n\t\t}\n\t\t$term = isset( $term ) ? $term : '';\n\t\treturn $term;\n\t}",
"function get_random_term( $taxonomy = '', $field = 'term_id' ) {\n\n\t// Bail without being passed a taxonomy.\n\tif ( empty( $taxonomy ) ) {\n\t\treturn false;\n\t}\n\n\t// Attempt to get all the terms.\n\t$terms = Datasets\\fetch_site_terms( $taxonomy );\n\n\t// If no terms, return the appropriate default.\n\tif ( empty( $terms ) ) {\n\n\t\t// Now switch between my taxonomy types.\n\t\tswitch ( $taxonomy ) {\n\n\t\t\tcase 'category' :\n\n\t\t\t\treturn get_option( 'default_category', 0 );\n\t\t\t\tbreak;\n\n\t\t\tcase 'product_cat' :\n\n\t\t\t\treturn get_option( 'default_product_cat', 0 );\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\treturn 0;\n\n\t\t\t// End all the case checks.\n\t\t}\n\n\t\t// Nothing left for the empty terms.\n\t}\n\n\t// Shuffle the term array.\n\tshuffle( $terms );\n\n\t// If we requested the entire object (or blanked it out), return that.\n\tif ( empty( $field ) || 'object' === sanitize_text_field( $field ) ) {\n\t\treturn $terms[0];\n\t}\n\n\t// Return the field from the first item.\n\treturn $terms[0][ $field ];\n}",
"function get_term_taxo_by_key( $meta_key = '' ) {\n\tglobal $wpdb;\n\n\t$key = md5( 'key-' . $meta_key );\n\n\t$result = wp_cache_get( $key, 'term_meta' );\n\tif ( false === $result ) {\n\t\t$result = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $wpdb->termmeta WHERE meta_key = %s\", $meta_key ) );\n\t\twp_cache_set( $key, $result, 'term_meta' );\n\t}\n\n\treturn $result;\n}",
"function _get_term_hierarchy($taxonomy)\n {\n }",
"protected function get_taxonomy_name($label) {\n\t\t\tif(!$options = $this->options) {\n\t\t\t\t$options = $this->pro_class->options;\n\t\t\t}\n\n\t\t\tforeach($options['taxonomies'] as $taxonomy => $value) {\n\t\t\t\tif($value['label'] == $label) {\n\t\t\t\t\treturn $taxonomy;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $label; // if no match found, try to use the label\n\t\t}",
"public function taxonomieen()\n\t{\n\t\t// bepaalde waarden worden opgeslagen\n\t\t// verwerkt de taxonomieen tot bv \"categorie\"\n\t\t// @TODO meervoud van taxonomieen dient nog correct ingesteld te worden in posttypes.php en die hier uitgedraaid te worden via\n\t\t// https://developer.wordpress.org/reference/functions/get_taxonomy_labels/\n\n\t\tif (!$this->taxonomieen || $this->is_categorie) return;\n\n\n\t\t$tl_str = $this->art->post_type . '-taxlijst';\n\t\t//niet iedere keer opnieuw doen.\n\t\tif (!array_key_exists($tl_str, $GLOBALS)) {\n\t\t\t$this->maak_taxlijst();\n\t\t}\n\n\n\t\t$terms = wp_get_post_terms($this->art->ID, $GLOBALS[$tl_str]);\n\n\t\t$overslaan = array('Geen categorie', 'Uncategorized');\n\n\t\t$print_ar = array();\n\n\t\tif (count($terms)) :\n\n\t\t\tforeach ($terms as $term) :\n\n\t\t\t\tif (in_array($term->name, $overslaan)) continue;\n\n\t\t\t\tif (array_key_exists($term->taxonomy, $print_ar)) {\n\t\t\t\t\t$print_ar[$term->taxonomy][] = $term->name;\n\t\t\t\t} else {\n\t\t\t\t\t$print_ar[$term->taxonomy] = array($term->name);\n\t\t\t\t}\n\n\t\t\tendforeach;\n\n\t\t\t///\n\n\t\t\tif (count($print_ar)) {\n\n\t\t\t\t$teller = 0;\n\n\t\t\t\tforeach ($print_ar as $tax_naam => $tax_waarden) :\n\n\t\t\t\t\tif ($tax_naam === 'category') $tax_naam = 'categorie';\n\n\t\t\t\t\t//als geen datum, dan eerste tax waarde geen streepje links.\n\n\t\t\t\t\t$str = \"- \";\n\n\t\t\t\t\tif ($this->geen_datum && $teller < 1) {\n\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t$teller++;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"<span class='tax tekst-zwart'> $str\" . strtolower(implode(', ', $tax_waarden)) . \"</span>\";\n\n\n\t\t\t\tendforeach; //iedere print_ar\n\t\t\t}\n\t\tendif; //als count terms\n\n\n\t}",
"public function getFrequencia() {\n return $this->sFrequencia;\n }",
"public static function most_frequent_Word($arr){\n $arr_freq = array_count_values($arr);\n\n // arranging the new $arr_freq in decreasing\n // order of occurrences\n arsort($arr_freq);\n\n // $new_arr containing the keys of sorted array\n $new_arr = array_keys($arr_freq);\n\n // Second most frequent element\n return $new_arr[0];\n }",
"function currentTypes($id){\n\t$term_id = get_the_terms($id, 'marcato_type');\n\t$terms = \"\";\n\tforeach($term_id as $genre){\n\t//\tprint_r($genre->name);\n\t\t$terms .= strtolower($genre->name) . \" \";\n\t}\n\n\treturn $terms;\n}",
"function getPopularIngredientHeading()\n{\n\t$root = $_SERVER[\"DOCUMENT_ROOT\"] . \"/RecipeFish/\";\n\t$INGREDIENT_PRIORITY_TOTAL = 292;\n\t$ingredientHeading = \"None\";\n\t\n\t$randomNum = rand(1, $INGREDIENT_PRIORITY_TOTAL);\n\t\n\t$handle = fopen($root . \"catalogs/popularIngredientsPriorities.txt\", \"r\");\n\t\n\t$prioritySum = 0;\n\t\n\twhile (($ingredient = fgets($handle)) !== false)\n\t{\n\t\t//remove new line char from string\n\t\t$ingredient = substr($ingredient, 0, strlen($ingredient)-2);\n\t\t\n\t\t//split ingredient string into name and priority value\n\t\t$tokens = explode(\"%\", $ingredient);\n\t\t\n\t\t$ingredientName = $tokens[0];\n\t\t$priority = $tokens[1];\n\t\t\n\t\t$prioritySum = $prioritySum + $priority;\n\t\t\n\t\tif ($prioritySum >= $randomNum)\n\t\t{\n\t\t\t$ingredientHeading = $ingredientName . \" Recipes\";\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tfclose($handle);\n\t\n\treturn $ingredientHeading;\n}",
"static function get_first_term_name( $taxonomy ) {\n\t\tglobal $post;\n\n\t\t$terms = get_the_terms( $post, $taxonomy );\n\t\tif ( ! empty( $terms ) ) {\n\t\t\treturn $terms[0]->name;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}",
"public function getBestRank()\n {\n return $this->get(self::_BEST_RANK);\n }",
"private static function getTid($name, array $vocabularies = []) {\n foreach ($vocabularies as $vid) {\n if ($terms = taxonomy_term_load_multiple_by_name($name, $vid)) {\n $tids = array_keys($terms);\n // if multiple, then ideally want the \"GB\" version\n if (count($terms) > 1) {\n foreach ($tids as $tid) {\n // thanks -> http://purencool.com/accessing-taxonomys-name-and-parent-tid-in-drupal-8\n $storage = \\Drupal::service('entity_type.manager')\n ->getStorage('taxonomy_term');\n if ($parents = $storage->loadParents($tid)) {\n foreach ($parents as $term) {\n $name = $term->getName(); // parent tid = $term->id();\n if ($name == 'GB') {\n return $tid;\n }\n }\n }\n }\n }\n return $tids[0];\n }\n }\n return FALSE;\n }",
"public function mostImportant()\n {\n return $this->setImportance(self::IMPORTANCE_MOST);\n }",
"public function getTaxCategory();",
"public function getTaxCategory();",
"public function getTaxCategory();",
"function jr_get_custom_taxonomy($post_id, $tax_name, $tax_class) {\r\n $tax_array = get_terms( $tax_name, array( 'hide_empty' => '0' ) );\r\n if ($tax_array && sizeof($tax_array) > 0) {\r\n foreach ($tax_array as $tax_val) {\r\n if ( is_object_in_term( $post_id, $tax_name, array( $tax_val->term_id ) ) ) {\r\n echo '<span class=\"'.$tax_class . ' '. $tax_val->slug.'\">'.$tax_val->name.'</span>';\r\n break;\r\n }\r\n }\r\n }\r\n}",
"function getTopKategori(){\n\t\t$this->db->select('*');\n\t\t$this->db->from('t_kategori');\n\t\t$this->db->order_by(\"id_kategori\", \"DESC\");\n\t\t$this->db->limit(1);\n\t\t$query = $this->db->get();\n\t\treturn $query->row()->id_kategori;\n\t\n\t}",
"function wp_get_word_count_type()\n {\n }",
"public function hasTaxonomy() {\n return $this->_has(1);\n }",
"public function hasTaxonomy() {\n return $this->_has(1);\n }",
"function dss_elc_get_taxonomy_term($term_value, $vocab_name) {\n\n // Check for the taxonomical term containing the term\n $terms = taxonomy_get_term_by_name($term_value, $vocab_name);\n \n // If the term has not been linked to this vocabulary yet, instantiate the term\n if(!empty($terms)) {\n\n return array_pop($terms);\n } else {\n\n $vocab = taxonomy_vocabulary_machine_name_load($vocab_name);\n \n $term = new stdClass();\n $term->name = $term_value;\n $term->vid = $vocab->vid;\n\n taxonomy_term_save($term);\n return $term;\n }\n}",
"function zwemlijst_taxonomy_get_groups() {\n\n $page = filter_input( INPUT_GET, 'page' , FILTER_SANITIZE_NUMBER_INT );\n $q = filter_input( INPUT_GET, 'q' , FILTER_SANITIZE_STRING );\n\n $max_per_page = 10;\n\n $terms = get_terms( [ 'taxonomy' => 'groep' , 'hide_empty' => false ] );\n\n $row = array();\n\n foreach ( $terms as $term ) {\n\n \t\tif ( $term->slug == 'gestopt' ) continue;\n\n $row[] = array( 'id' => $term->term_id , 'text' => $term->name . \" (aantal: {$term->count})\" );\n\n }\n\n // only return a select number of results\n $row = array_slice( $row , ( $page - 1 ) * $max_per_page , $max_per_page );\n\n echo json_encode( array( 'results' => $row , 'pagination' => array( 'more' => ( sizeof( $terms ) > ( $page * $max_per_page ) ) ) ) );\n\n\n wp_die();\n}",
"private function findRecommendation(){\n $placeModel = new Place();\n $places = $placeModel->getAllCategorized();\n $bestScore = PHP_INT_MAX;\n $idBest = 0;\n\n foreach($places as $place){\n $currScore = 0;\n $currScore += abs($place->heritage - $this->score['heritage'] );\n $currScore += abs($place->relax - $this->score['relax'] );\n $currScore += abs($place->sightseeing - $this->score['sightseeing']);\n $currScore += abs($place->weather - $this->score['weather']) ;\n $currScore += abs($place->populated - $this->score['populated'] );\n\n if($currScore < $bestScore){\n $bestScore = $currScore;\n $idBest = $place->id_plc;\n }\n\n }\n\n return $idBest;\n }",
"public function get_term()\n {\n }",
"function acf_get_term($term_id, $taxonomy = '')\n{\n}",
"function vcex_get_first_term( $post = '', $taxonomy = 'category', $terms = '' ) {\n\tif ( function_exists( 'wpex_get_first_term' ) ) {\n\t\treturn wpex_get_first_term( $post, $taxonomy, $terms );\n\t}\n}",
"private function getPostCategoryTaxonomy($postType){\n\t\t\n\t\tif(isset(self::$arrPostTypeTaxCache[$postType]))\n\t\t\treturn(self::$arrPostTypeTaxCache[$postType]);\n\t\t\n\t\t$taxonomy = \"category\";\n\t\t\n\t\tif($postType == \"post\" || $postType == \"page\")\n\t\t\treturn($taxonomy);\n\t\t\t\n\t\t$arrTax = UniteFunctionsWPUC::getPostTypeTaxomonies($postType);\n\t\t\t\n\t\tif(!empty($arrTax))\n\t\t\t$taxonomy = UniteFunctionsUC::getFirstNotEmptyKey($arrTax);\n\t\t\n\t\tself::$arrPostTypeTaxCache[$postType] = $taxonomy;\n\t\t\n\t\treturn($taxonomy);\n\t}",
"public function vocabulary() {\n $vocabularies = taxonomy_get_vocabularies();\n if (is_numeric($this->config['vocabulary'])) {\n return $vocabularies[$this->config['vocabulary']];\n }\n else {\n foreach ($vocabularies as $vocabulary) {\n if ($vocabulary->module == $this->config['vocabulary']) {\n return $vocabulary;\n }\n }\n }\n }",
"public function _get_current_taxonomy($instance)\n {\n }",
"public function getTermLevel(): int\n {\n $level = 0;\n $term = $this;\n\n while ($term->ParentID) {\n $level++;\n $term = $term->Parent();\n }\n\n return $level;\n }",
"public function getTaxCategoryId();",
"protected function getTermForAllResources() {\n return new Zend_Search_Lucene_Index_Term('fpost', 'doctype');\n }",
"function _ficalink_taxonomy_default_vocabularies() {\n $items = array(\n array(\n 'name' => 'Authors',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '1',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'authors',\n ),\n array(\n 'name' => 'Characters',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '1',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'characters',\n ),\n array(\n 'name' => 'Genres',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '0',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'genres',\n ),\n array(\n 'name' => 'Series',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '1',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'series',\n ),\n array(\n 'name' => 'Tags',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '0',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'tags',\n ),\n array(\n 'name' => 'Warnings',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '0',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'warnings',\n ),\n );\n return $items;\n}",
"public function get_tax() {\n\t\treturn $this->_tax;\n\t}",
"function bdpp_load_more_terms() {\n\n\t\t// Taking the shortocde parameters\n\t\t$atts = json_decode( wp_unslash($_POST['shrt_param']), true );\n\t\textract( $atts );\n\n\t\t// If valid data found\n\t\tif( !empty( $atts ) ) {\n\n\t\t\t$result = array(\n\t\t\t\t\t\t'status'\t=> 0,\n\t\t\t\t\t\t'msg'\t\t=> __('Sorry, Something happened wrong.', 'blog-designer-pack'),\n\t\t\t\t\t);\n\t\t\t$prefix\t\t\t= BDPP_META_PREFIX;\n\t\t\t$paged\t\t\t= bdpp_clean_number( $_POST['paged'] );\n\t\t\t$count\t\t\t= isset( $_POST['count'] ) ? $_POST['count'] : $atts['count'];\n\t\t\t$max_num_pages\t= ceil( $term_total / $limit );\n\t\t\t$query_shrt\t\t= str_replace('bdp_', 'bdpp_', $shortcode);\n\n\t\t\t// Taking some globals\n\t\t\tglobal $post;\n\n\t\t\t// Taking care of query offset with pagination\n\t\t\tif( $paged > 1 ) {\n\t\t\t\t$offset = $offset + ( ($paged - 1) * $limit );\n\t\t\t}\n\n\t\t\t// Taxonomy Arguments\n\t\t\t$cat_args = array(\n\t\t\t\t\t\t'taxonomy'\t\t=> $taxonomy,\n\t\t\t\t\t\t'number'\t\t=> $limit,\n\t\t\t\t\t\t'orderby'\t\t=> $orderby,\n\t\t\t\t\t\t'order'\t\t\t=> $order,\n\t\t\t\t\t\t'include'\t\t=> $include_cat,\n\t\t\t\t\t\t'exclude'\t\t=> $exclude_cat,\n\t\t\t\t\t\t'hide_empty'\t=> $hide_empty,\n\t\t\t\t\t\t'parent'\t\t=> $parent,\n\t\t\t\t\t\t'child_of'\t\t=> $child_of,\n\t\t\t\t\t\t'offset'\t\t=> $offset,\n\t\t\t\t\t\t'hierarchical'\t=> ( ! $child_of && '' === $parent ) ? false : true,\n\t\t\t\t\t);\n\t\t\t$query_taxonomy = get_terms( apply_filters( $query_shrt.'_query_args', $cat_args, $atts ) );\n\n\t\t\tob_start();\n\n\t\t\t// If taxonomy is there\n\t\t\tif ( ! is_wp_error( $query_taxonomy ) && ! empty( $query_taxonomy ) ) {\n\t\t\t\tforeach ( $query_taxonomy as $taxonomy_key => $taxonomy_data ) {\n\n\t\t\t\t\t$atts['term_data']\t\t= $taxonomy_data;\n\t\t\t\t\t$atts['term_img_id']\t= get_term_meta( $taxonomy_data->term_id, $prefix.'term_img_id', true );\n\t\t\t\t\t$atts['term_image']\t\t= bdpp_get_image_url( $atts['term_img_id'], $media_size );\n\t\t\t\t\t$atts['term_link']\t\t= bdpp_get_term_link( $taxonomy_data );\n\n\t\t\t\t\t// Creating image style\n\t\t\t\t\tif( $atts['term_image'] ) {\n\t\t\t\t\t\t$atts['image_style'] = 'style=\"background-image:url('.esc_url( $atts['term_image'] ).');\"';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$atts['image_style'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch ( $shortcode ) {\n\t\t\t\t\t\tcase 'bdp_cat_grid':\n\t\t\t\t\t\t\t$tempate_loc\t\t= 'grid';\n\t\t\t\t\t\t\t$atts['wrp_cls']\t= \"bdpp-term-grid bdpp-col-{$grid} bdpp-columns\";\n\t\t\t\t\t\t\t$atts['wrp_cls']\t.= ( $count % $grid == 0 ) ? ' bdpp-first' : '';\n\t\t\t\t\t\t\t$atts['wrp_cls']\t.= empty( $atts['term_image'] ) ? ' bdpp-no-thumb' : '';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Design Template\n\t\t\t\t\tbdpp_get_template( \"taxonomy/{$tempate_loc}/{$design}.php\", $atts );\n\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$content = ob_get_clean();\n\n\t\t\t$result['status']\t\t= 1;\n\t\t\t$result['msg']\t\t\t= __('Success', 'blog-designer-pack');\n\t\t\t$result['count']\t\t= $count;\n\t\t\t$result['data']\t\t\t= $content;\n\t\t\t$result['last_page']\t= ( $paged >= $max_num_pages ) ? 1 : 0;\n\t\t}\n\n\t\twp_send_json($result);\n\t}",
"private function prepareTaxonomy(){\n $taxonomy = null;\n if ( $this->taxonomy->terms() ){\n foreach($this->taxonomy->terms() as $term){\n $taxonomy[] = array( \n \t'id'=>$term->getID(), \n \t'label'=>$term->label->label \n\t\t\t\t);\n }\n }\n return $taxonomy;\n }",
"function voicewp_news_taxonomies() {\n\t$option = get_option( 'voicewp-settings' );\n\n\t$taxonomies = ( empty( $option['latest_taxonomies'] ) ) ? array() : $option['latest_taxonomies'];\n\n\t// Nonexistant taxonomies can shortcircuit get_terms().\n\treturn array_filter( $taxonomies, 'taxonomy_exists' );\n}",
"function emc_taxonomy_title() {\r\n\r\n\tglobal $wp_query;\r\n\t$term = $wp_query->get_queried_object();\r\n\t$title = $term->name;\r\n\r\n\techo esc_html( $title );\r\n\r\n}",
"function acf_get_taxonomy_terms($taxonomies = array())\n{\n}",
"function wp_defer_term_counting($defer = \\null)\n {\n }",
"public function fastestProduct()\n {\n return $this->productsSortedByFastest()[0] ?? null;\n }",
"public function getMainCategoryAttribute()\n {\n $mainCategory = 'Uncategorized';\n\n if (! empty($this->terms)) {\n $taxonomies = array_values($this->terms);\n\n if (! empty($taxonomies[0])) {\n $terms = array_values($taxonomies[0]);\n\n $mainCategory = $terms[0];\n }\n }\n\n return $mainCategory;\n }",
"function get_terms($value, $taxonomy = 'category')\n {\n }",
"public function getTerm() {\n return $this->_term;\n }",
"function charity_is_hope_trx_donations_get_current_taxonomy($tax, $page) {\n\t\tif (!empty($tax)) return $tax;\n\t\tif ( charity_is_hope_strpos($page, 'donations')!==false ) {\n\t\t\t$tax = TRX_DONATIONS::TAXONOMY;\n\t\t}\n\t\treturn $tax;\n\t}",
"public function get_popular_words() {\n \n return ORM::factory('Word')\n ->select([DB::expr('COUNT(`id`)'), 'word_count'])\n ->order_by('word_count', 'DESC')\n ->limit(20) \n ->group_by('name') \n ->find_all() \n ->as_array('name', 'word_count');\n \n }",
"function acf_get_taxonomy_labels($taxonomies = array())\n{\n}",
"protected function get_taxonomies() {\n\t\treturn apply_filters( 'appthemes_html_term_description_taxonomies', $this->taxonomies );\n\t}",
"function vendor_defined_taxonomy() {\n // The targeted product attribute taxonomy\n return 'pa_color'; \n}",
"function getTopIprTerms($ref_gf_id, $n_max) {\n $top_iprs = [];\n $query\t\t= \"SELECT gf_fd.`name`, fd.`desc` FROM `gf_functional_data` gf_fd, `functional_data` fd WHERE gf_fd.`gf_id`='\" . $ref_gf_id . \"' AND gf_fd.`type`='interpro' AND gf_fd.`is_hidden`='0' AND fd.`name`=gf_fd.`name` ORDER BY gf_fd.`f_score` DESC\";\n $res\t\t= $this->query($query);\n foreach($res as $r) {\n $ipr_name = $r['gf_fd']['name'];\n $ipr_desc = $r['fd']['desc'];\n if(count($top_iprs) < $n_max){\n $top_iprs[] = array(\"name\"=>$ipr_name, \"desc\"=>$ipr_desc);\n }\n }\n return $top_iprs;\n }",
"function wpfst_get_shared_terms( $force = false ) {\n\tstatic $terms;\n\tif ( ! $force && isset( $terms ) ) {\n\t\treturn $terms;\n\t}\n\n\t/** @var wpdb $wpdb */\n\tglobal $wpdb;\n\t$terms = array();\n\t$term_ids = $wpdb->get_col( \"SELECT `term_id` FROM {$wpdb->term_taxonomy} GROUP BY `term_id` HAVING COUNT(*) > 1\" );\n\tif ( ! empty( $term_ids ) ) {\n\t\t$terms = $wpdb->get_results(\n\t\t\t\"SELECT tt.term_taxonomy_id, tt.term_id, t.name, tt.taxonomy, tt.count\n\t\t\tFROM {$wpdb->term_taxonomy} AS tt\n\t\t\tINNER JOIN {$wpdb->terms} AS t ON tt.term_id=t.term_id\n\t\t\tWHERE tt.term_id IN (\" . implode( ',', $term_ids ) . ')'\n\t\t);\n\t}\n\treturn $terms;\n}",
"private function retrieve_term_title() {\n\t\t$replacement = null;\n\n\t\tif ( ! empty( $this->args->taxonomy ) && ! empty( $this->args->name ) ) {\n\t\t\t$replacement = $this->args->name;\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"public function categorize($text)\n {\n $that = $this;\n $maxProbability = -INF;\n $chosenCategory = null;\n\n if ($that->totalDocuments > 0) {\n $probabilities = $that->probabilities($text);\n\n // iterate thru our categories to find the one with max probability\n // for this text\n foreach ($probabilities as $category => $logProbability) {\n if ($logProbability > $maxProbability) {\n $maxProbability = $logProbability;\n $chosenCategory = $category;\n }\n }\n }\n\n return $chosenCategory;\n }",
"public function getTermType()\n {\n return $this->term_type;\n }",
"public function getNextTerm() {\n \treturn $this->next();\n }",
"function get_max_depth($cat_id)\n{\n\tglobal $db;\n\tif ($cat_id < 0) $cat_id = 0;\n\t$local_depth = 0;\n\t$sql = \"select * from \" . CATEGORIES_TABLE . \" where cat_main = $cat_id\";\n\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie parm', '', __LINE__, __FILE__, $sql);\n\twhile ( $row = $db->sql_fetchrow($result) )\n\t{\n\t\t$branch_depth = get_max_depth( $row['cat_id'] );\n\t\tif ( $cat_id > 0 ) $branch_depth++;\n\t\tif ( $branch_depth > $local_depth ) $local_depth = $branch_depth;\n\t}\n\treturn $local_depth;\n}",
"public function dashboardTaxonomies()\n {\n $taxonomies = get_taxonomies($args, $output, $operator);\n\n foreach ($taxonomies as $taxonomy) {\n $num_terms = wp_count_terms($taxonomy->name);\n $num = number_format_i18n($num_terms);\n $text = _n($taxonomy->labels->singular_name, $taxonomy->labels->name, intval($num_terms));\n\n if (current_user_can('manage_categories')) {\n $num = \"<a href='edit-tags.php?taxonomy=$taxonomy->name'>$num\";\n $text = \"$text</a>\";\n }\n\n echo '<li class=\"post-count\">' . $num . ' ' . $text . '</li>';\n }\n }",
"function charity_is_hope_team_get_current_taxonomy($tax, $page) {\n\t\tif (!empty($tax)) return $tax;\n\t\tif ( charity_is_hope_strpos($page, 'team')!==false ) {\n\t\t\t$tax = 'team_group';\n\t\t}\n\t\treturn $tax;\n\t}",
"public function getTaxonomyTerm($id, $taxonomy);",
"public function getMaxOccupancy()\n {\n return $this->maxOccupancy;\n }",
"function highest()\n\t{\n\t\tend($this->_data);\n\t\treturn key($this->_data);\n\t}",
"public function getTermtype()\n {\n return $this->termtype;\n }",
"function get_max_ordering() {\n $this->db->select_max('ordering');\n $query = $this->db->get($this->get_scope());\n $row = $query->row();\n return $row->ordering;\n }",
"function rew_genreic_taxonomy(){\n\n\t$args= array(\n\t\t'label'=>'Services'\n\t\t);\n\tregister_taxonomy( 'services', array('apartment', 'villa', 'land', 'store'), $args );\n}",
"function primary_category_name() {\n\n\tglobal $post_id;\n\t$term = get_the_terms( $post_id, 'primary-category' );\n\tif ( ! $term ) {\n\t\treturn;\n\t} else {\n\t\techo $term[0]->name;\n\t}\n\n}",
"public function getHighestPriority()\n {\n return max(array_keys($this->_mappersByPriority));\n }",
"function entity_translation_taxonomy_term_autocomplete($langcode = NULL, $field_name = '', $tags_typed = '') {\n // If the request has a '/' in the search text, then the menu system will have\n // split it into multiple arguments, recover the intended $tags_typed.\n $args = func_get_args();\n // Shift off the $langcode and $field_name arguments.\n array_shift($args);\n array_shift($args);\n $tags_typed = implode('/', $args);\n\n // Make sure the field exists and is a taxonomy field.\n if (!($field = field_info_field($field_name)) || $field['type'] !== 'taxonomy_term_reference') {\n // Error string. The JavaScript handler will realize this is not JSON and\n // will display it as debugging information.\n print t('Taxonomy field @field_name not found.', array('@field_name' => $field_name));\n exit;\n }\n\n // The user enters a comma-separated list of tags. We only autocomplete the\n // last tag.\n $tags_typed = drupal_explode_tags($tags_typed);\n $tag_last = drupal_strtolower(array_pop($tags_typed));\n\n $term_matches = array();\n if ($tag_last != '') {\n if (!isset($langcode) || $langcode == LANGUAGE_NONE) {\n $langcode = $GLOBALS['language_content']->language;\n }\n\n // Part of the criteria for the query come from the field's own settings.\n $vocabulary = _entity_translation_taxonomy_reference_get_vocabulary($field);\n\n $entity_type = 'taxonomy_term';\n $query = new EntityFieldQuery();\n $query->addTag('taxonomy_term_access');\n $query->entityCondition('entity_type', $entity_type);\n\n // If the Title module is enabled and the taxonomy term name is replaced for\n // the current bundle, we can look for translated names, otherwise we fall\n // back to the regular name property.\n if (module_invoke('title', 'field_replacement_enabled', $entity_type, $vocabulary->machine_name, 'name')) {\n $name_field = 'name_field';\n $language_group = 0;\n // Do not select already entered terms.\n $column = 'value';\n if (!empty($tags_typed)) {\n $query->fieldCondition($name_field, $column, $tags_typed, 'NOT IN', NULL, $language_group);\n }\n $query->fieldCondition($name_field, $column, $tag_last, 'CONTAINS', NULL, $language_group);\n $query->fieldLanguageCondition($name_field, array($langcode, LANGUAGE_NONE), NULL, NULL, $language_group);\n }\n else {\n $name_field = 'name';\n // Do not select already entered terms.\n if (!empty($tags_typed)) {\n $query->propertyCondition($name_field, $tags_typed, 'NOT IN');\n }\n $query->propertyCondition($name_field, $tag_last, 'CONTAINS');\n }\n\n // Select rows that match by term name.\n $query->propertyCondition('vid', $vocabulary->vid);\n $query->range(0, 10);\n $result = $query->execute();\n\n // Populate the results array.\n $prefix = count($tags_typed) ? drupal_implode_tags($tags_typed) . ', ' : '';\n $terms = !empty($result[$entity_type]) ? taxonomy_term_load_multiple(array_keys($result[$entity_type])) : array();\n foreach ($terms as $tid => $term) {\n $name = _entity_translation_taxonomy_label($term, $langcode);\n $n = $name;\n // Term names containing commas or quotes must be wrapped in quotes.\n if (strpos($name, ',') !== FALSE || strpos($name, '\"') !== FALSE) {\n $n = '\"' . str_replace('\"', '\"\"', $name) . '\"';\n }\n $term_matches[$prefix . $n] = check_plain($name);\n }\n }\n\n drupal_json_output($term_matches);\n}",
"function __get( $var_name ){\n\t\tif( $var_name == 'categories' ){\n\t\t\treturn $this->terms;\n\t\t}\n\t\treturn null;\n\t}",
"public function getTaxonomyUuid($reference);",
"public function getHighestHardcoreLevel()\n {\n return $this->getData(__FUNCTION__, 0);\n }",
"public function mostUsedWords(string $text, int $max_count = 10)\n {\n $words_arr = $this->createWordsListArray($text);\n $frequency = array_count_values($words_arr);\n arsort($frequency);\n $words_list = array_slice($frequency, 0, $max_count);\n\n return implode(', ', array_keys($words_list));\n }",
"private function scopeIsMostAppeared()\n {\n $mostAppearedId = $this->filmService->getOneBy([\n 'mostAppeared' => 'characters'\n ]);\n\n return $this->peopleService->getBy(['id' => $mostAppearedId['_id']])->current();\n }",
"function my_restrict_manage_unit() {\n global $typenow;\n $taxonomy = 'category_unit';\n if( $typenow != \"page\" && $typenow != \"post\" && $typenow == 'unit' ){\n $filters = array($taxonomy);\n foreach ($filters as $tax_slug) {\n $tax_obj = get_taxonomy($tax_slug);\n $tax_name = $tax_obj->labels->name;\n $terms = get_terms($tax_slug);\n echo \"<select name='$tax_slug' id='$tax_slug' class='postform'>\";\n echo \"<option value=''>$tax_name</option>\";\n foreach ($terms as $term) { echo '<option value='. $term->slug, $_GET[$tax_slug] == $term->slug ? ' selected=\"selected\"' : '','>' . __($term->name, 'tecnosinos') .' (' . $term->count .')</option>'; }\n echo \"</select>\";\n }\n }\n}",
"function cognitivefactory_tree_get_max_ordering($cognitivefactoryid, $userid=null, $groupid=0, $istree = false, $fatherid = 0) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n $operator = ($istree) ? 'hierarchize' : 'order' ;\n $treeClause = ($istree) ? \"AND itemdest = {$fatherid}\" : '';\n $sql = \"\n SELECT \n MAX(intvalue) as position\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}'\n {$accessClause}\n {$treeClause}\n \";\n\n if (!$result = $DB->get_record_sql($sql)) {\n $result->position = 1;\n }\n return $result->position;\n}"
] | [
"0.66029805",
"0.6394088",
"0.6349528",
"0.61322385",
"0.6112906",
"0.60148185",
"0.60064304",
"0.6004334",
"0.596449",
"0.5953205",
"0.58101404",
"0.5790296",
"0.57702893",
"0.57638943",
"0.5751057",
"0.5687597",
"0.5666659",
"0.56469077",
"0.5637444",
"0.5604992",
"0.5484021",
"0.548159",
"0.5465022",
"0.54295033",
"0.5399151",
"0.53989387",
"0.53970206",
"0.5390305",
"0.53736854",
"0.53687894",
"0.5360731",
"0.53405195",
"0.53397906",
"0.5320449",
"0.5300374",
"0.5280108",
"0.52612644",
"0.5249901",
"0.5238719",
"0.5238719",
"0.5238719",
"0.52365834",
"0.52304417",
"0.5220866",
"0.52040726",
"0.52040726",
"0.5201716",
"0.5201042",
"0.5194587",
"0.51798207",
"0.5164258",
"0.5162073",
"0.51567054",
"0.51452243",
"0.5145145",
"0.5143678",
"0.51425713",
"0.51362664",
"0.51339054",
"0.5129205",
"0.5085526",
"0.5083328",
"0.50806135",
"0.50723004",
"0.50682676",
"0.50646865",
"0.5055776",
"0.5055124",
"0.5053038",
"0.50340056",
"0.5025702",
"0.5021307",
"0.50118774",
"0.5005518",
"0.49837902",
"0.49817088",
"0.49761423",
"0.4968574",
"0.49607",
"0.49581656",
"0.49530765",
"0.49494728",
"0.4944656",
"0.4936629",
"0.49309233",
"0.4929004",
"0.49269724",
"0.49263114",
"0.49196923",
"0.49135765",
"0.4905502",
"0.48897946",
"0.48762333",
"0.48682624",
"0.48672223",
"0.48660848",
"0.486455",
"0.48597878",
"0.48578689",
"0.485542"
] | 0.6705054 | 0 |
Check db for username and public_id | public function admission_login() {
$user = $this->loadModel('User', input()->id);
$verified = false;
$_username = $user->email;
// Strip everything after @ from email address
$string = explode('@', input()->username);
// Check for a global company email extension
$emailExt = $this->loadModel('Company')->getEmailExt();
if (!empty ($emailExt)) {
$username = array(input()->username, $string[0] . $emailExt->global_email_ext);
foreach ($username as $uname) {
if ($uname == $_username) {
if (auth()->login($user->email, $user->password)) {
$user = auth()->getRecord();
if (input()->module != '') {
$module = input()->module;
} else {
$module = "HomeHealth";
}
$this->redirect(array('module' => $module));
} else {
$this->redirect(array('page' => 'login'));
}
// if the user is using a different email extension check login
} else {
if (auth()->login($user->email, $user->password)) {
$user = auth()->getRecord();
$this->redirect(array('module' => input()->module));
} else {
$this->redirect(array('page' => 'login'));
}
}
}
} elseif ($_username = input()->username) {
$this->redirect();
} else {
$this->redirect(array('page' => 'login'));
}
exit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verifyAuth(){\n // on the config values. In this case we just check for user 0.\n $query = \"SELECT name FROM users WHERE user_id = 0\";\n try {\n $sth = $this->spdo->prepare($query);\n $sth->execute();\n }\n catch(PDOException $e) {\n endProcess(0,\"Could not get user information because \".pdoError($e));\n }\n if($this->spdo->query(\"SELECT FOUND_ROWS()\")->fetchColumn() != 1)\n return false;\n return true;\n }",
"function check_owner ($username, $domain)\n{\n $result = db_query (\"SELECT * FROM domain_admins WHERE username='$username' AND domain='$domain' AND active='1'\");\n if ($result['rows'] != 1)\n {\n return false;\n }\n else\n {\n return true;\n }\n}",
"public function checkData()\n\t{\n\t\t$result = parent::checkData();\n\t\t$query = (new \\App\\Db\\Query())->from($this->baseTable)->where(['server_id' => $this->get('server_id'), 'user_name' => $this->get('user_name')]);\n\t\tif ($this->getId()) {\n\t\t\t$query->andWhere(['<>', 'id', $this->getId()]);\n\t\t}\n\t\treturn !$result && $query->exists() ? 'LBL_DUPLICATE_LOGIN' : $result;\n\t}",
"function radius_sql_exists($name)\n{\n $exists = false;\n global $environments;\n \n if(!array_key_exists($name, $environments)) return $exists;\n\n $id = $environments[$name]['_id'] . \"@miiicasa.com\";\n\n $dbconn = pg_connect(\"host=localhost port=5432 dbname=radius user=postgres\");\n $result = pg_query_params($dbconn, 'SELECT * FROM radcheck WHERE username = $1', array($id));\n if(pg_num_rows($result) > 0) $exists = true;\n \n pg_close($dbconn);\n\n return $exists;\n}",
"function usernameExists(){\n\t $query = \"SELECT id, first_name, last_name, password\n\t FROM \" . $this->table_name . \"\n\t WHERE username = ?\n\t LIMIT 0,1\";\n\t \n\t $stmt = $this->conn->prepare( $query );\n\t $this->username=htmlspecialchars(strip_tags($this->username));\n\t $stmt->bindParam(1, $this->username);\n\t \n\t $stmt->execute();\n\t $num = $stmt->rowCount();\n\t \n\t if($num > 0){\n\t $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t \n\t $this->id = $row['id'];\n\t $this->first_name = $row['first_name'];\n\t $this->last_name = $row['last_name'];\n\t $this->password = $row['password'];\n\t \n\t return true;\n\t }\n\t return false;\n\t}",
"function username_in_db ( $ls_username, $link ) {\n\n\t\techo 'in username_in_db:: username:'. $ls_username . '<br>';\n\n\t\t$sql = \"SELECT * FROM `users` WHERE `username` LIKE '$ls_username'\";\n\n\t\techo 'sql='.$sql.\"<br>\";\n\n\t\t$result = mysqli_query( $link, $sql );\n\n\t\tif ( $result ) {\n\n\t\t\techo 'username_in_db:: query returned result<br>';\n\n \t\tif ( mysqli_num_rows( $result ) > 0) {\n\n \t\t\techo 'username_in_db: username '.$ls_username.' found in database<br>';\n\n \t\t\treturn true;\n\n \t\t}\n \t}\n\n \techo 'username_in_db: username '.$ls_username.' NOT found in database<br>';\n\n\t\treturn false;\n\n\t}",
"private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }",
"function id_matches_db($username, $password)\n{\n global $idStore;\n\n if($idStore->authenticate($username, $password))\n {\n return true;\n }else{\n return false;\n }\n}",
"public function auth(){\n\t\tif( !isset($_SESSION) || !isset($_SESSION['userId']) ) {\n\t\t\treturn false;\n\t\t} elseif( !parent::fetchFromDB($_SESSION['userId']) ){\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn ( $this->checkIp() && $this->checkSessionId() );\n\t\t}\n\t}",
"function db_user_is_member_of_vsite($username, $vsid, $snuuid)\n{\n\t$sql = \"SELECT username FROM virtual_site_members\n\t\tWHERE username=$1\n\t\tAND vsid=$2\n\t\tAND snuuid=$3\";\n\t$res = pg_query_params($sql, array($username, $vsid, $snuuid));\n\treturn pg_num_rows($res) != 0;\n}",
"public function check_insta_user() {\n \n }",
"function dbCheck($data){\n\t\t\t\t$sql = \"SELECT UID FROM user_info WHERE email = '$data'\";\n\n\t\t\t\t$result = mysqli_query($GLOBALS['db'], $sql);\n\t\t\t\t$count = mysqli_num_rows($result);\n\t\t\t\tif(!$result || $count == 0){\n\t\t\t\t\treturn \"This user does not exist.\";\n\t\t\t\t}//if\n\t\t\t\telse{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}//ifelse\n\t\t\t\treturn \"\";\n\n\t}",
"function member_exists($username){\n $username=trim($username);\n $con=mysqli_connect(DB_SERVER,DBASE_USER,DBASE_PASS,DBASE_NAME);\n $sql=\"SELECT * FROM member WHERE username = '$username'\"; \n $query = mysqli_query($con,$sql);\n $data = mysqli_fetch_array($query, MYSQLI_NUM);\n if($data[0] > 1) {\n return TRUE;\n }else{\n return FALSE;\n }\n}",
"public function checkUsernameExists(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t//echo \"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"'\";\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' LIMIT 1\");\r\n\t\t\t\t$count= mysql_num_rows($result);\r\n\t\t\t\tif($count==0){\r\n\t\t\t\t\t//Username is available\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return true;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Username already taken.\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t//return false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"function usernameExists($username) {\n require_once ('./../dat/connectDB.php');\n $query = \"SELECT username FROM ADMINS where username = '\" . $username . \"';\";\n $result = dbQuery($query);\n if ($result != null) {\n $rows = pg_num_rows($result);\n if ($rows > 0) {\n return true;\n } else {\n return false;\n }\n } else {\n return null;\n }\n}",
"function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }",
"function has_unique_username($username/*, $current_id=\"0\"*/) {\r\n global $db;\r\n\r\n $sql = \"SELECT * FROM admins \";\r\n $sql .= \"WHERE username='\" . $db->real_escape_string($username) . \"';\";\r\n //$sql .= \"AND id != '\" . $db->real_escape_string($current_id) . \"'\";\r\n\r\n $result = $db->query($sql);\r\n $user_count = $result->num_rows;\r\n $result->free_result();\r\n\r\n return $user_count === 0;\r\n}",
"static function checkUsername($username)\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('SELECT * FROM admin WHERE username=?');\n $req->execute(array($username));\n if($req->rowCount()==0)\n {\n return true;\n }\n return false;\n }",
"function isUser($username){\n $results = sqlSelectOne(\"SELECT * FROM users WHERE user_username='$username'\", 'user_username');\n if ($results === null) {\n return false;\n }\n return true;\n}",
"function checkAdminUsernameExists($data) {\r\n\t\t$admin = $this->query(' SELECT * FROM \r\n\t\t\t\t\t\t\t\tadmins WHERE username=\"'. $data['username'] . '\";' );\r\n\t\tif(empty($admin) == false) //If the $admin array isn't empty return false because it does not exist in the database\r\n\t\t return true;\r\n\t\treturn false;\r\n\t}",
"public function checkUsername() {\r\n if (isset($this->data[$this->name]['id'])) {\r\n $condition = array(\r\n \"conditions\" => array(\r\n \"id !=\" => $this->data[$this->name]['id'],\r\n \"Username\" => $this->data[$this->name]['Username'],\r\n ),\r\n \"limit\" => 1,\r\n );\r\n } else {\r\n $condition = array(\r\n \"conditions\" => array(\r\n \"Username\" => $this->data[$this->name]['Username'],\r\n ),\r\n \"limit\" => 1,\r\n );\r\n }\r\n\r\n $this->find(\"first\", $condition);\r\n $count = $this->getNumRows();\r\n if ($count > 0) {\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n }",
"function name_exists($name){\n\t\t\t\n\t\t\t//var_dump($name);\n\t\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'users' ;\n\t\t\t$user_id = $wpdb->get_var( \"SELECT ID FROM $table WHERE user_login='$name'\" ) ;\n\t\t\t\n\t\t\t//return ($user_id) ? false: true ;\n\t\t\treturn $user_id ;\n\t\t}",
"function auth_user_exists($username)\n{\n return dbFetchCell(\"SELECT * FROM `users` WHERE `username` = ?\", array($username));\n}",
"public function usernameExists(){\n\n // query to check if email exists\n $query = \"SELECT id, username, uid, password\n FROM \" . $this->table_name . \"\n WHERE username = ?\n LIMIT 0,1\";\n\n // prepare the query\n $stmt = $this->conn->prepare( $query );\n\n // sanitize\n $this->adminusername=htmlspecialchars(strip_tags($this->adminusername));\n\n // bind given email value\n $stmt->bindParam(1, $this->adminusername);\n\n // execute the query\n $stmt->execute();\n\n // get number of rows\n $num = $stmt->rowCount();\n\n // if email exists, assign values to object properties for easy access and use for php sessions\n if($num>0){\n\n // get record details / values\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // assign values to object properties\n $this->adminid = $row['id'];\n $this->adminusername = $row['username'];\n $this->uid = $row['uid'];\n $this->adminpassword = $row['password'];\n\n // return true because username exists in the database\n return true;\n }\n\n // return false if username does not exist in the database\n return false;\n }",
"function admin_exist ($username)\n{\n\t$result = db_query (\"SELECT * FROM admin WHERE username='$username'\");\n if ($result['rows'] != 1)\n {\n return false;\n }\n else\n {\n return true;\n }\n}",
"public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }",
"function verify_user($conn, $id, $hash){\n\t$sql = \"SELECT id from Session\n\tWHERE id=$id and hash='$hash'\";\n\n\t$result = $conn->query($sql);\n\n\treturn ($result->num_rows > 0);\n}",
"public function check_user()\n {\n $res = $this->CustomModel->checkUser(\n $this->input->get('index_no')\n );\n\n if (!$res) {\n echo 'not exists';\n }\n }",
"function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}",
"function AuthUsers($username) {\r\n //Can user login?\r\n global $dbUser;\r\n global $dbPass;\r\n global $dbName;\r\n global $connection;\r\n $huser=hash(\"SHA256\",strip_tags($username));\r\n $result=$connection->query(\"select * from users where aduser='$huser'\") or die(mysqli_error($connection));\r\n if($result->num_rows>0) return 1; \r\n else return 0;\r\n}",
"function v1_check_db_simple($name, $key, $code, $owners) {\n\t\n\tglobal $warnings;\n\t\n\t// If already in database, send a warning\n\t$id=v1_get_id($key, $code, $owners);\n\t\n\tif (!empty($id)) {\n\t\t// Warning: already in database\n\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t// 1st owner\n\t\tif (!empty($owners[0])) {\n\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t}\n\t\t// 2nd owner\n\t\tif (!empty($owners[1])) {\n\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t}\n\t\t// 3rd owner\n\t\tif (!empty($owners[2])) {\n\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t}\n\t\tarray_push($warnings, $warning_msg);\n\t}\n\t\n}",
"public function validateUsernameInDb($username)\n {\n $query = \"SELECT login_id FROM login WHERE username = '$username'\";\n if ($result = $this->connect->query($query)) {\n if ($result->num_rows > 0) {\n return 1;\n }\n return 0;\n }\n }",
"function name_exist($conn, $username) {\n\t$sql = \"SELECT * FROM Officer WHERE Officer_Username = '$username';\";\n\t$result = mysqli_query($conn, $sql);\n\tif (mysqli_num_rows($result) > 0) {\n\t\treturn True;\n\t} else {\n\t\treturn False;\n\t}\n}",
"function validations_users_usernameBelongsUser($id, $username){\n\t\t$con = new Conexion();\n\t\tif($con->connect()){\n\t\t\t$query = \"SELECT `id` FROM `users` WHERE '\".$username.\"'=`username`\";\n\t\t\t$rows = array();\n\t\t\tif($result = $con->query($query)){\n\t\t\t\twhile($r = mysqli_fetch_assoc($result)) {\n\t\t\t\t\t$rows[] = $r;\n\t\t\t\t}\n\t\t\t\treturn count($rows)==0 || $rows[0]['id']==$id;\n\t\t\t}\n\t\t}\n\t\t$con->close();\n\t\tthrow new Exception(\"Imposible conectarse a la base de datos.\");\n\t}",
"function dbUserExists($unm)\n{\n\t$result = false;\n\t$sql = \"SELECT username FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\t$count = $stmt -> rowCount();\n\t\tif ($count > 0) {\n\t\t\t$result = true; //Username already taken\n\t\t}\n\t\t$stmt->closeCursor ( ) ;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result;\n}",
"function checkUserLinkedbyId($id){\n global $db_php_path;\n require_once($db_php_path);\n \n $result = mysql_query(\"select passwd from user where id=\".$id);\n $num = mysql_num_rows($result);\n if($num == 0){\n return false;\n }\n elseif($num == 1){\n $row = mysql_fetch_row($result);\n if($row[0] != NULL){\n return true;\n }else{\n return false;\n }\n }\n else{\n throw new Exception(\"one sina id coresponse to more than one line\");\n }\n}",
"function checkUserName($connection, $username){\r\n $query = \"SELECT COUNT(*) AS count FROM users WHERE name=:username\";\r\n $statement = $connection->prepare($query);\r\n $statement->bindValue(\":username\", $username, PDO::PARAM_STR);\r\n $statement->execute();\r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n return $row[\"count\"] == \"0\";\r\n }",
"private function isPublicIdUnique($id) {\r\n\r\n\t\t\t$sql = Connection::getHandle()->prepare(\r\n \"SELECT COUNT(*) FROM bs_customer_addresses WHERE public_id = ?\");\r\n\r\n\t\t\t$sql->execute(array($id));\r\n\t\t\t$row = $sql->fetch(PDO::FETCH_ASSOC);\r\n\r\n\t\t\treturn ($row['count'] > 0 ? false : true);\r\n\t\t}",
"function CheckAvailableUsername($username, $DBH) {\n try {\n $STH = $DBH->prepare(\"SELECT username FROM users WHERE username=:username LIMIT 1\");\n $STH->bindParam(':username', strtolower($username));\n $STH->setFetchMode(PDO::FETCH_ASSOC);\n $STH->execute();\n if ($row = $STH->fetch()) {\n return False;\n } else {\n return True;\n }\n } catch (PDOException $e) {\n print $e->getMessage();\n }\n\n}",
"function isPersonInDBase($userName, $password){\n try {\n $conn = connectToDBase();\n $statement = $conn->prepare(\"select cred from users where user= :userName\");\n $statement->execute(array(':userName' => $userName ));\n $pwd = $statement->fetch();\n $hash = $pwd[0];\n\n $getSalt = $conn->prepare(\"SELECT security FROM users where user= :userName\");\n $getSalt->execute(array(':userName' => $userName ));\n $salty = $getSalt->fetch();\n $pass = $password . $salty[0];\n\n if ( password_verify( $pass, $hash) ){\n $personIDSetup = $conn->prepare(\"SELECT active FROM users where user= :userName AND cred= :hash\");\n $personIDSetup->execute(array(':userName' => $userName, ':hash' =>$hash ));\n $personID = $personIDSetup->fetchAll();\n\n if ( count($personID) == 1){\n return $personID[0];\n }else{\n return 0;\n }\n }\n }\n catch(PDOException $ex){\n //person doesn't exist\n return \"Something went wrong in while retreiving person.\";\n }\n closeDBase($conn);\n}",
"function checkExistingUser($username) {\n $db = get_db();\n $sql = 'SELECT username FROM users WHERE username = :username';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':username', $username, PDO::PARAM_STR);\n $stmt->execute();\n $matchUser = $stmt->fetch(PDO::FETCH_NUM);\n $stmt->closeCursor();\n if(empty($matchUser)){\n return 0;\n // echo 'Nothing found';\n // exit;\n } else {\n return 1;\n // echo 'Match found';\n // exit;\n }\n}",
"function user_is_valid($username, $hash_pw)\n {\n // Connect to MySQL\n $link = get_link(TRUE);\n\n $username = mysqli_real_escape_string($link, $username);\n $query = \"\n SELECT * FROM User\n WHERE name = '$username' AND hash_pw = '$hash_pw'\";\n $result = mysqli_query($link, $query);\n if ($row = mysqli_fetch_array($result))\n return TRUE;\n mysqli_free_result($result);\n mysqli_close($link);\n return FALSE;\n }",
"public function verify() {\r\n $stmp = $this->_db->prepare(\"SELECT `id`,`email` FROM `anope_db_NickCore` WHERE `display`= ? AND `pass` = ?;\");\r\n $stmp->execute(array($this->_username,$this->_password));\r\n \r\n if ($stmp->rowCount() == \"1\") {\r\n $row = $stmp->fetch(PDO::FETCH_ASSOC);\r\n $this->_id = $row['id'];\r\n $this->_email = $row['email'];\r\n return $this->_id;\r\n }\r\n else {\r\n return false;\r\n }\r\n }",
"public function exist_pg_user($id_user, $pg_name){\n\n\t\t\t$q = new Query();\n\t\t\t$q->tables = array(\"pg_view\");\n\t\t\t$q->fields = array(\"id\");\n\t\t\t$q->filters = \"idUt=\".$id_user.\" and pg_view.Username = '\".$pg_name.\"'\";\n\t\t\t\n\t\t\tif($q->Open()){\n\t\t\t\t$row=$q->GetNextRecord();\t\t\t\t\n\t\t\t\tif(is_array($row)){\n\t\t\t\t\treturn $row[0];\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"function checkUsername($id){\n\t\n\tglobal $link;\n\t$sql=\"SELECT username FROM user WHERE username='$id'\";\n\t\n\t$result=mysqli_query($link,$sql) or die(mysqli_error($link));\n\t\n\t$num=mysqli_num_rows($result);\n\t\n\tif($num>0){\n\t\treturn false;\t//this means that the user already exists and the user have to choose another one\n\t}else{\n\t\treturn true;\n\t}\n}",
"private function usr(){\r\n\r\n if(defined(\"USER_ID\")){ return true;}else{return false;}\r\n\r\n }",
"function checkUsername($username) {\n $db = dbConnect();\n $sql = 'SELECT username FROM students WHERE username = :username';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':username', $username, PDO::PARAM_STR);\n $stmt->execute();\n \n $userExists = $stmt->fetch(PDO::FETCH_NUM);\n $stmt->closeCursor();\n \n if(empty($userExists)) {\n return 0;\n } else {\n return 1;\n }\n}",
"public function GetisOwnerThisRecord(){\n return ($this->{$this->nameFieldUserId}==h::userId());\n}",
"function does_exist($username) \n{\n global $conn; // inorderto use a global variable\n \n $sql = \"SELECT * from Users where (Username = '$username')\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) // check the number of selected rows\n return true;\n else\n return false;\n}",
"function check_user_existence($username, $password) \n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE user_name = '$username' AND password = '$password'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}",
"public function CheckUsername($username, $userId);",
"function isOwner($table,$referenceKey,$userReferenceKey,$referenceId){\n\t// var_dump('select * from '.$table.' where '.$referenceKey.' =\"'.$referenceId.'\" and '.$userReferenceKey.'='.Auth::user()->id);\n\n \tif(Auth::check() && $table){\n \t\t$isOwner = \\DB::select('select * from '.$table.' where '.$referenceKey.' =\"'.$referenceId.'\" and '.$userReferenceKey.'='.Auth::user()->id);\n\n \t\t$result = (!empty($isOwner)) ? true :false;\n \t}\n \telse\n \t\t$result = false;\n\n\treturn $result;\n}",
"function doesUserExist($username) {\n global $db;\n\n $query = \"SELECT * FROM user WHERE username=:username\";\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username); \n $statement->execute();\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return (count($results) > 0);\n}",
"function usernameExists($username)\r\n{\r\n\tglobal $db,$db_table_prefix;\r\n\r\n \tif(returns_result(\"SELECT Active FROM \".$db_table_prefix.\"Users WHERE Username_Clean = '\".$db->sql_escape(sanitize($username)).\"' LIMIT 1\") > 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}",
"public function existsInDb($dh) {\n $info = $this->getDbInfo($dh);\n return isset($info[\"user\"]);\n }",
"function checkUsernameExists($pSql, $pUser) {\n // Look up in db\n $stmt = $pSql->prepare(\"SELECT * FROM user WHERE user = ?\");\n $stmt->bind_param('s', $pUser);\n $stmt->execute();\n $results = $stmt->get_result();\n $stmt->close();\n\n // Check results\n return ($results->num_rows != 0);\n }",
"public function checkname(){\t\t\n\t\tDB::query(\"select * from webchat_users where `name`='\".DB::esc($this->name).\"'\");\t\t\n\t\treturn DB::getMySQLiObject();\n\t}",
"public function isOwner($id=''){\n\t\n\tif(empty($id)) $id = $this->id;\n\t \t\n \t$sql=$this->_db->select()->from($this->m_table)->where(\"id=?\",$id)->where(\"user_id =?\",$_SESSION['user_id']);\n \t$rs =$this->_db->fetchCol($sql);\n \t\n \tif(!empty($rs)){\n \t\treturn true;\n \t}\n \treturn false;\n }",
"function isvalidUser($uid, $sqlConnection)\r\n{ $result = array();\r\n\t$sqlSuccess = get_sql_results($result, $sqlConnection,\r\n\t\t\t\"select * from uc_users \".\r\n\t\t\t\"where id = '$uid'\");\r\n\treturn $sqlSuccess;\r\n}",
"public function user_exists($username){\n\t\t$if_user_exists_query = \"SELECT username FROM appuser WHERE username = $1;\"; //make query\n\t\t$if_user = pg_prepare($this->con, \"my_query\", $if_user_exists_query); //prepare query\n\t\t$if_user = pg_execute($this->con, \"my_query\", array($username)); //execute query\n\t\treturn $if_user;\n\t\t}",
"public function hasUsername() : bool;",
"private function check_ID($id){\r\n\r\n $query = \"SELECT FROM users WHERE oauth_uid = ?\";\r\n $data = $this->_db->get_Row($query, $id);\r\n\r\n return ($this->_db->count_Rows($data) > 0) ? true : false;\r\n }",
"function checkForSchools($conn,$school_name)\n{\n $taken = false;\n\n //query string\n $query = \"select school_name from schools where school_name = '\";\n $query .= $school_name;\n $query .= \"';\";\n\n //get db result\n $result = pg_query($conn,$query) or die('Could not connect: ' . pg_last_error());\n dbErrorCheck($conn,$result);\n\n //get numer of rows\n $num = pg_num_rows($result);\n\n // if there is a row then the username and password pair exists\n if ($num == 1)\n {\n return true;\n }\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\n}",
"function checkUser($userId)\r\n{\r\n $userExists=true;\r\n global $DBServer, $DBName, $DBUser, $DBPass;\r\n $conn = new mysqli($DBServer, $DBUser, $DBPass, $DBName);\r\n // check connection\r\n if ($conn->connect_error) {\r\n trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);\r\n exit;\r\n }\r\n $sql = \"SELECT * from users WHERE username LIKE '{$userId}' LIMIT 1\";\r\n $result = $conn->query($sql);\r\n if (!$result->num_rows == 1) {\r\n $userExists=false;\r\n }\r\n $conn->close();\r\n return $userExists;\r\n}",
"function check_project_task_access($projectId, $taskId){\n\n global $connection;\n global $errors;\n\n //Get user id\n $userId = $_SESSION['$userId'];\n\n //Query that checks if user has access to this project task\n $query = \"SELECT * FROM task_table t\n INNER JOIN project_table p ON p.id = t.project_id\n INNER JOIN user_project_table up ON up.project_id = p.id\n WHERE up.user_id = '$userId' AND t.id = '$taskId'\n AND p.id = '$projectId'\";\n\n //Execute query\n $result = mysqli_query($connection, $query);\n\n //Check result\n if($result){\n $row = mysqli_fetch_assoc($result);\n\n //Check if row is empty or not\n if(empty($row))\n $errors['sql'] = 'Project task not found or user has no access to it!';\n }\n else{\n $errors['sql'] = mysqli_error($connection);\n }\n}",
"function userExists($userId) {\n return getSingleValue(\"SELECT COUNT(`id`) FROM `private_users` WHERE `id` =\" . escape(intval($userId)) . \" LIMIT 0, 1\");\n }",
"function isAdmin($userId = null) {\ntry {\n\n if (!$conn = connectDB()) {\n return false;\n }\n\n // Default to current user\n if (!isset($userId)) {\n $userId = $_SESSION['userId'];\n }\n\n // Still not set? Error\n if (!isset($userId)) {\n return false;\n }\n\n $args = array($userId);\n $sql = <<<SQL\nSELECT *\nFROM WebUser\nWHERE userID=$1\n AND admin=true;\nSQL;\n\n $result = executeSQL($conn, $sql, $args);\n if (getResultCount($result) == 1) {\n closeDB($conn);\n return true;\n }\n\n closeDB($conn);\n return false;\n\n} catch (Exception $e) {\n error(\"isAdmin: {$e}\");\n closeDB($conn);\n return false;\n}\n}",
"function _validate_pnhempusername()\r\n\t{\r\n\t\t$username = $this->input->post('username');\r\n\t\tif($this->db->query('select count(*) as t from king_admin where username = ? ',$username)->row()->t)\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('_validate_pnhempusername','Username already available');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"function username_exists(){\n //include connection.php\n include \"connection.php\";\n $rowdata=$_POST['data'];\n $username=$rowdata[4];\n \n //create a query that will check if username is taken\n $qrystring=\"SELECT * FROM tblusers \n WHERE username='$username'\"; \n $query=mysqli_query($db,$qrystring);\n //check how many rows does the query returned\n // (0=no match,1 means have match)\n if(mysqli_num_rows($query)>0){\n\treturn true;\t//taken sudah\n }\n else{\n\treturn false;\t//balum taken\n }\t\n mysqli_close($db);\n\n}",
"public function user_check($userId)\n {\n $sql1 = \"SELECT userId FROM users WHERE userId ='\".$userId.\"'\";\n $record = $this->db->query($sql1);\n if ($record->num_rows()>0) {\n return true;\n } \n }",
"function forum_user_check() {\n\t global $vbulletin;\n\n\t // SEARCH VB DATABASE FOR LOGGED-IN SE USER\n\t $vb_user_query = $vbulletin->db->query_write(\"SELECT userid, usergroupid, membergroupids, infractiongroupids, username, password, salt FROM \" . TABLE_PREFIX . \"user WHERE username='\".$this->user_info[user_username].\"' LIMIT 1\");\n\n\t // RETURN TRUE/FALSE IF VB USER EXISTS\n\t if($vbulletin->db->num_rows($vb_user_query) == 1) {\n\t $this->forum_user = $vbulletin->db->fetch_array($vb_user_query);\n\t return true;\n\t } else {\n\t return false;\n\t }\n\n\t}",
"public function hasUsername(){\n return $this->_has(4);\n }",
"function user_id_exists($db, $user_id)\n{\n\t$sql = 'SELECT * FROM users where id=:id';\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$user_id));\n\t$us = $st->fetchAll();\n\treturn (count($us) >= 1);\n}",
"function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM users WHERE id='\". $this->id .\"'\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested user (\". $this->id .\") does not exist - possibly the user has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}",
"function checkWzdeMasterAccess($oid) {\n $access = \"\";\n if (HOST_PORT==8080) {\n $wzdeversion='DEV';\n }\n else {\n $wzdeversion='LIVE';\n }\n\t// Query string\n\t$query = \"SELECT * \";\n\t$query .= \"FROM access_master \";\n\t$query .= \"WHERE user_oid='$oid' AND wuversion='$wzdeversion'\"; \n\t// PDO\n $bindV = array(\"user_oid\"=>$oid);\n $result = query_db($query,$bindV,\"false\",true);\n\t\n\tif ($result) {\n\t\tforeach ($result AS $key => $value) {\n\t\t\tif (($value == 1) AND (strpos($key,'wzde') !== false) ) {\n\t\t\t\t$access .= $key . \"|\";\n\t\t\t}\n\t\t}\n\t}\t\n\treturn rtrim($access,\"|\"); \n}",
"function isAdmin($db, $userId) {\n $query = \"SELECT admin FROM Users WHERE user_id = ?;\";\n $stmt = prepareQuery($db, $query);\n bindParam($stmt, \"i\", $userId);\n executeStatement($stmt);\n $result = $stmt->get_result();\n $admin = $result->fetch_assoc();\n return $admin['admin'] == 1;\n}",
"function checkUserIsAdmin()\n {\n $user_db = new SafeMySQL();\n\n $user_id = htmlentities($_SESSION[SES_NAME]['user_id'], ENT_QUOTES, 'UTF-8');\n\n if($user_db->getRow(\"SELECT user_id FROM app_users WHERE user_status = 'Active' AND user_id = ?s\",$user_id)){\n return true;\n } else {\n return false;\n }\n\n }",
"function checkedituser()\n\t{\n\t\t$query1 = $this->db->query('select * from admin where username = \"'.$this->input->post('username').'\" AND id != \"'.$this->input->post('id').'\" ') or die(mysql_error());\n\t\t\n\t\t//echo 'Coint:'.$query1->num_rows();\texit;\n\t\tif($query1->num_rows() == 0)\n\t\t {\t\t\t\n\t\t\t\techo '0';\t\n\t\t }\n\t\t else\t\t \n\t\t {\n\t\t\t\techo '1';\n\t\t\t}\n\t\t \n\t\t\n\t}",
"function check_login() {\n\t\t$pdo = new PDO(DB_PATH);\n\n\t\tif (!isset($_SESSION[\"user_id\"]) || !isset($_SESSION[\"nonce\"])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$stmt = $pdo->prepare(\"SELECT ID, username, password, type FROM users WHERE ID = :userId\");\n\t\t$stmt->bindValue(\":userId\", $_SESSION[\"user_id\"], PDO::PARAM_INT);\n\n\n\t\tif (!$stmt->execute()) {\n\t\t\tthrow new PDOException($stmt->errorInfo()[2]);\n\t\t}\n\n\t\t$user_data = $stmt->fetch();\n\n\n\t\treturn $_SESSION[\"nonce\"] == md5(serialize($user_data)) && intval($_SESSION['user_id']) == intval($user_data['ID']);\n\t}",
"function checkUsernameExists($username) {\n $query = \"SELECT * FROM `customers` WHERE username='\".$username.\"'\";\n $result = Database::selectQuery($query);\n if(count($result) == 1) {\n return true;\n } else {\n return false;\n }\n }",
"function username_exist($user){\n\t\t$db = new mysql();\n\t\t$query = \"SELECT*FROM user WHERE username='$user'\";\n\t\t$x = $db->numofrows($query);\n\t\tif($x > 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"function verify_user($link, $userName) {\r\n $sql = \"SELECT username \"\r\n . \"FROM user \"\r\n . \"WHERE username = '$userName'\";\r\n\r\n //execute query\r\n $retval = mysqli_query($link, $sql);\r\n\r\n if (!$retval) {\r\n die('Could not execute select statement:' . mysqli_errno($link));\r\n } else {\r\n if (mysqli_num_rows($retval) == 0) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n }\r\n}",
"public function authorize() {\n\t\t$this->db = new Database();\n\t\t$this->user = ( 'rjg70' );//$_SERVER['REMOTE_USER']);\n\t\t$this->db->query( 'SELECT * FROM users WHERE crsid = :id' );\n\t\t$this->db->bind( ':id', $this->user );\n\t\t$row = $this->db->single();\n\n\t\t//print_r($row);\n\t\tif ( $row ) {\n\t\t\tif ( $row[\"authorised\"] ) {\n\t\t\t\t$this->admin = $row[\"admin\"];\n\t\t\t\t$this->type = $row[\"type\"];\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}",
"function chk_username($username)\n\t{\n\t\t$str = \"SELECT u_username from tbl_user where u_username = ?\";\n\t\t\n\t\t//Executes the query\n\t\t$res = $this -> db -> query($str, $username);\n\t\t\n\t\t//Checks whether the result is available in the table\n\t\tif($res -> num_rows() > 0)\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}",
"function isUserExist($con,$androidId,$username,$email){\n\t$sql = \"SELECT * FROM `access`,`owner` WHERE owner.email = access.email AND owner.android_id = '\".$androidId.\"' AND owner.email='\".$email.\"' AND access.username='\".$username.\"' AND access.enable = 'Y'\";\n\n\t$result = mysqli_query($con,$sql);\n\t$value = @mysqli_num_rows($result);\n\n\tif ($value){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }",
"public function check($username)\n\t{\n\t\t$check_sql = 'SELECT * FROM user WHERE username = ?';\n $this->db->execute($check_sql, [$username]);\n if($this->db->rowCount() > 0)\n \treturn true;\n\t}",
"public function checkusername()\n\t\t{\n\t\t\t$username = $_POST['owner_username'];\n\t\t\t$data = $this->UserModel->checkusername($username);\n\t\t\tif (empty($data)){\n\t\t\t\techo 'true';\n\t\t\t}else {\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}",
"function userExists(){\n\t\t//assume user is not in system\n\t\t$exists = false;\n\t\ttry{//try to est connection to db \n\t\t\t$user_db = new SQLite3('users.db');\n\t\t}catch(Exception $ex){ //if cannot catch exception \n\t\t\techo $ex->getMessage(); \n\t\t}\n\t\t//query for all usernames\n\t\t$statement = 'SELECT Username FROM users;';\n\t\t$run = $user_db->query($statement); \n\n\t\tif($run){//if not error in query \n\t\t\twhile($row = $run->fetchArray()){//while there are still rows to parse\n\t\t\t\tif(trim($row['Username']) === trim($_POST['name'])){//if provided user name matches one in db\n\t\t\t\t\t//user exists\n\t\t\t\t\t$exists = true;\n\t\t\t\t\t//break out of loop\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t//close connection to db\n\t\t$user_db->close(); \n\t\treturn $exists;\n\t}",
"public function hasPersistentLogin();",
"public function _userexists($input) {\n\n\t\t$prepare \t= $this->db->prepare(\"SELECT * FROM `users` WHERE `username` = ?\");\n\t\t$prepare->execute(array(r::post($input)));\n\t\t$result \t= $prepare->fetch();\n\n\t\tif(!empty($result)) {\n\t\t\treturn true;\n\t\t}\n\t}",
"function IfExists($natregno) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM users WHERE national_id='$natregno'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }",
"function checkUsername($user, PDO $connection){\n $check = $connection->prepare(\n \"SELECT * FROM Utente WHERE Username=:username\");\n $check->bindParam(':username', $user);\n $ris = $check->fetchAll();\n return count($ris)>0;\n}",
"function checkNIC($nic) {\n $con = getConnection();\n $sql = \"SELECT ID FROM members_tab WHERE NIC = ?;\";\n if ($stmt = mysqli_prepare($con, $sql)) {\n mysqli_stmt_bind_param($stmt, \"s\");\n mysqli_stmt_execute($stmt); \n mysqli_stmt_bind_result($stmt, $result); \n if(mysql_num_rows($result) != 0) {\n return \"exists\";\n } \n mysqli_stmt_close($stmt);\n }\n closeConnection($con);\n }",
"function usernameTaken($username){\r\n if(!get_magic_quotes_gpc()){ $username = addslashes($username); }\r\n\t $query = \"SELECT username FROM \".TBL_USERS.\" WHERE username = :username\";\r\n\t $stmt = $this->connection->prepare($query);\r\n\t $stmt->execute(array(':username' => $username));\r\n\t $count = $stmt->rowCount(); \r\n return ($count > 0);\r\n }",
"private function isPublic($id)\n {\n $article = Article::find($id);\n if($article->public === 0):\n return true;\n else:\n return false;\n endif;\n }",
"function isTheUsernameIsTheOnly($username) {\n $conn = new mysqli(\"localhost\", \"root\", \"\", \"Students\");\n if ($conn->connect_error) {\n header(\"Location:error.php?messError=\" . $conn->connect_error);\n die();\n }\n $result = $conn->query(\"select * from Users where username='\" . $username . \"'\");\n return $result->num_rows == 0;\n }",
"function checkUserByUserName($user_name){\n\t\t$rec\t= $this->query(\"SELECT `id` from `users` where `user_name` = '$user_name' \");\t\t\n\t\tif($rec && mysql_num_rows($rec)>0){\t\t\n\t\t\t//if user with the user_name got found\n\t\t\treturn true;\n\t\t}else{\n\t\t\t//if user with the user_name got not found\n\t\t\treturn false;\n\t\t}\n\t}",
"public function checkAuth();",
"public function checkAuth();"
] | [
"0.66348803",
"0.628278",
"0.62801635",
"0.6275538",
"0.62091804",
"0.61247855",
"0.6121619",
"0.6100859",
"0.60699105",
"0.6069543",
"0.6061591",
"0.6056187",
"0.60267115",
"0.6005641",
"0.59870285",
"0.5979275",
"0.5971568",
"0.59686345",
"0.59259844",
"0.5921655",
"0.59190774",
"0.591339",
"0.5899151",
"0.58952254",
"0.5892771",
"0.5888806",
"0.5879525",
"0.58771026",
"0.58620745",
"0.58364433",
"0.58150405",
"0.5811186",
"0.5809171",
"0.57996726",
"0.5798997",
"0.57979625",
"0.57931614",
"0.57908005",
"0.57813454",
"0.57751715",
"0.57646734",
"0.5758293",
"0.5758076",
"0.5755629",
"0.5747686",
"0.574538",
"0.57438827",
"0.57382846",
"0.5736074",
"0.57276917",
"0.5726729",
"0.5725827",
"0.57246673",
"0.57151693",
"0.57040757",
"0.5703935",
"0.5702899",
"0.5699709",
"0.5698845",
"0.56983244",
"0.56881905",
"0.5680772",
"0.567731",
"0.5674558",
"0.56674534",
"0.56672114",
"0.56631184",
"0.56598234",
"0.56584585",
"0.5653717",
"0.56529874",
"0.5651076",
"0.5648242",
"0.5643888",
"0.56434906",
"0.56406826",
"0.5636572",
"0.56339383",
"0.5628139",
"0.56136435",
"0.56129175",
"0.5609743",
"0.5609001",
"0.5599336",
"0.5593852",
"0.5592206",
"0.55915844",
"0.55903053",
"0.5589743",
"0.55819416",
"0.558037",
"0.5579706",
"0.5576374",
"0.5570523",
"0.556707",
"0.5566192",
"0.5561674",
"0.55611527",
"0.5556177",
"0.5546843",
"0.5546843"
] | 0.0 | -1 |
This is vars general file, PostVar,GetVar,SessionVar etc.. | function PostVar($name, $default_value = false) {
if (!isset($_POST)) {
return false;
}
if (isset($_POST[$name])) {
if (!get_magic_quotes_gpc()) {
return InjectSlashes($_POST[$name]);
}
return $_POST[$name];
}
return $default_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }",
"protected function CustomVariables ()\r\n\t{\r\n\t\t// Overwrite variables if you want them custom\r\n\t\t$this->Set ('autoload', true);\r\n\t\t$this->Set ('enable_query_strings', false);\r\n\t\t\r\n\t\t// Add your own variables\r\n\t\t$this->Set ('database_host', 'localhost');\r\n\t\t$this->Set ('database_user', 'database_username');\r\n\t\t$this->Set ('database_pass', 'database_password');\r\n\t\t$this->Set ('database_name', 'database_name');\r\n\t\t$this->Set ('database_prefix', 'database_prefix');\r\n\t}",
"protected function initVars() {\n\n\t\t}",
"function getVars() {\r\n return !empty($_POST) ? $_POST : (!empty($_GET) ? $_GET : NULL);\r\n }",
"public function get_vars()\n\t{\n\t\treturn array(\"TsvOneFile\");\n\t}",
"private function initialization() {\n //global $_POST,$_GET,$_SERVER,$_FILES,$_COOKIE,$_ENV;\n \n $this->ServerVar = &$_SERVER;\n $this->EnvVar = &$_ENV;\n $this->CookieVar = &$_COOKIE;\n $this->VARS = daddslashes(array_merge($_POST, $_GET, $_FILES));\n //$this->VARS = array_merge($_POST, $_GET, $_FILES);\n }",
"public function servervalue ($var,$data){\n\t\t\n\t\t$this->vars[$var] = $data;\n\t}",
"public function getPostVariables();",
"public function getVars() {\r\n return $this->VARS;\r\n }",
"function getVar($varName, $method = \"\", $defVal = \"\"){\n\t\n\t$tempVar = \"\";\n\t\n\tif($method == \"\"){\n\t\tif (isset($_POST[$varName]) || isset($_GET[$varName])) {\n\t\t\tif (isset($_GET[$varName])) {\n\t\t\t\tif(!is_array($_GET[$varName])){\n\t\t\t\t\t$tempVar = trim(htmlspecialchars($_GET[$varName], ENT_QUOTES, \"UTF-8\"),\"\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$tempVar = $_GET[$varName];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_POST[$varName])) {\n\t\t\t\tif(!is_array($_POST[$varName])){\n\t\t\t\t\t$tempVar = trim(htmlspecialchars($_POST[$varName], ENT_QUOTES, \"UTF-8\"),\"\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$tempVar = $_POST[$varName];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$tempVar = $defVal;\n\t\t}\n\t\treturn $tempVar;\n\t}\n\t\n\telseif($method == \"get\"){\n\t\tif(!isset($_GET[$varName])){\n\t\t\t$tempVar = $defVal;\n\t\t}\n\t\telse{\n\t\t\tif(!is_array($_GET[$varName])){\n\t\t\t\t$tempVar = trim(htmlspecialchars($_GET[$varName], ENT_QUOTES, \"UTF-8\"),\"\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$tempVar = $_GET[$varName];\n\t\t\t}\n\t\t}\n\t\treturn $tempVar;\n\t}\n\t\n\telseif($method == \"post\"){\n\t\tif(!isset($_POST[$varName])){\n\t\t\t$tempVar = $defVal;\n\t\t}\n\t\telse{\n\t\t\tif(!is_array($_POST[$varName])){\n\t\t\t\t$tempVar = trim(htmlspecialchars($_POST[$varName], ENT_QUOTES, \"UTF-8\"),\"\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$tempVar = $_POST[$varName];\n\t\t\t}\n\t\t}\n\t\treturn $tempVar;\n\t}\n\t\n\telseif($method == \"session\"){\n\t\tif(!isset($_SESSION[$varName])){\n\t\t\t$tempVar = $defVal;\n\t\t}\n\t\telse{\n\t\t\tif(!is_array($_SESSION[$varName])){\n\t\t\t\t$tempVar = trim(htmlspecialchars($_SESSION[$varName], ENT_QUOTES, \"UTF-8\"),\"\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$tempVar = $_SESSION[$varName];\n\t\t\t}\n\t\t}\n\t\treturn $tempVar;\n\t}\n\t\n\telseif($method == \"cookie\"){\n\t\tif(!isset($_COOKIE[$varName])){\n\t\t\t$tempVar = $defVal;\n\t\t}\n\t\telse{\n\t\t\tif(!is_array($_COOKIE[$varName])){\n\t\t\t\t$tempVar = trim(htmlspecialchars($_COOKIE[$varName], ENT_QUOTES, \"UTF-8\"),\"\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$tempVar = $_COOKIE[$varName];\n\t\t\t}\n\t\t}\n\t\treturn $tempVar;\n\t}\n}",
"function SM_getVar($varName) {\n global $SM_siteManager;\n return $SM_siteManager->inVarH->getVar($varName);\n}",
"function init_from_globals () {\n\t\t$this->init($_SERVER, $_GET, $_POST, $_FILES, 'php://input', $_COOKIE, MICROTIME);\n\t}",
"public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang($this->_languagePrefix.'DisplayName'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['productid'] = array(\"name\" => GetLang($this->_languagePrefix.'ProductId'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'ProductIdHelp'),\n\t\t\t \"default\" => \"\",\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['sharedsecret'] = array(\"name\" => GetLang($this->_languagePrefix.'SharedSecret'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'SharedSecretHelp'),\n\t\t\t \"default\" => \"\",\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t}",
"public function __getVars(){\r\n $vars = isset($this->vars)? $this->vars:array();\r\n return $vars;\r\n }",
"public function getCookieVariables();",
"function setVar() {\n\t\t\n\t\t$_argv = func_get_args();\n\t\t$_argc = func_num_args();\n\t\t\n\t\t// load vars\n\t\t$vars = getVars();\n\t\tif (!$_GET[\"__shared__\"][\"vars\"]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"] = array();\n\t\t}\n\t\tforeach ($vars as $varNamespace => $varArray) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$varNamespace] = $varArray;\n\t\t}\n\t\t\n\t\t// Register namespace if not existing\n\t\tif (!$_GET[\"__shared__\"][\"vars\"][$_argv[0]]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]] = array();\n\t\t}\n\t\tif ($_argc == 2) {\n\t\t\tif (is_array($_argv[1])) {\n\t\t\t\tforeach ($_argv[1] as $var => $val) {\n\t\t\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$var] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($_argc == 3) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$_argv[1]] = $_argv[2];\n\t\t}\n\t\t\n\t\t// save vars\n\t\t\n\t\tsaveVars();\n\t}",
"public function SetCustomVars()\n\t{\n\t\t$this->_variables['displayname'] = array(\"name\" => GetLang('NabDisplayName'),\n\t\t \"type\" => \"textbox\",\n\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t \"default\" => $this->GetName(),\n\t\t \"required\" => true\n\t\t);\n\n\t\t$this->_variables['vendor_name'] = array(\"name\" => GetLang('NabVendorName'),\n\t\t \"type\" => \"textbox\",\n\t\t \"help\" => GetLang('NabVendorNameHelp'),\n\t\t \"default\" => \"\",\n\t\t \"required\" => true\n\t\t);\n\n\t\t$this->_variables['email'] = array(\"name\" => GetLang('NabPaymentEmail'),\n\t\t \"type\" => \"textbox\",\n\t\t \"help\" => GetLang('NabPaymentAlertHelp'),\n\t\t \"default\" => \"\",\n\t\t \"required\" => true\n\t\t);\n\n\t\t$this->_variables['testmode'] = array(\"name\" => GetLang('NabTestMode'),\n\t\t \"type\" => \"dropdown\",\n\t\t \"help\" => GetLang(\"NabTestModeHelp\"),\n\t\t \"default\" => \"no\",\n\t\t \"required\" => true,\n\t\t \"options\" => array(GetLang(\"NabTestModeNo\") => \"NO\",\n\t\t\t\t\t\t GetLang(\"NabTestModeYes\") => \"YES\"\n\t\t\t),\n\t\t\t\"multiselect\" => false\n\t\t);\n\t}",
"static function getLangVars()\n\t{\n\t\treturn array(\"pc_vacc\", \"pc_hacc\");\n\t}",
"static function getLangVars()\n\t{\n\t\treturn array(\"pc_mob\");\n\t}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }",
"function values( $vars ) {\n foreach($vars as $k=>$v) {\n $this->_vars[\"$k\"] = $v;\n }\n }",
"function load_default_vars()\r\n {\r\n parent::load_default_vars();\r\n $this->vars['URL_REPOS'] = '//your-private-repos-server/repos/'; // Unnecessary\r\n $this->vars['URL_RSC'] = $this->vars['URL_ASSETS'] . $this->manifest['activity_current'] . '/';\r\n }",
"public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}",
"public static function getDefaultVars(){\n\t\treturn Array(\n\t\t\t//--whether to output debug messages for this class\n\t\t\t'debug'=> false\n\t\t\t,'contentRelativePath'=> '_content'\n\t\t\t,'host'=> ($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['PWD']\n\t\t\t,'webRoot'=> ($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : $_SERVER['PWD']\n\t\t\t,'wpRelativePath'=> '_wp'\n\t\t\t,'protocol'=> (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https' : 'http'\n\t\t);\n\t}",
"public function getGetVariables() {}",
"public function getVars()\n {\n $this->vars['db']['db'] = (isset($_GET['db']) && !empty($_GET['db'])) ? $_GET['db'] : $this->vars['db']['db'];\n\n if (!isset($_GET['fn'])) {\n trigger_error('Filename not set');\n } else {\n $this->vars['ifn'] = urldecode($_GET['fn']);\n }\n\n if (!file_exists($this->vars['ifn'])) {\n trigger_error($this->vars['ifn'] . ' doesn\\'t exist');\n }\n $this->vars['ifn'] = realpath($this->vars['ifn']);\n\n // Get a bunch of settings.\n $this->vars['chunks'] = (isset($_GET[\"chunks\"])) ? intval($_GET[\"chunks\"]) : 1000;\n $this->vars['limit'] = (isset($_GET[\"limit\"])) ? intval($_GET[\"limit\"]) : INF;\n $this->vars['replace'] = (isset($_GET[\"replace\"])) ? filter_var($_GET[\"replace\"],FILTER_VALIDATE_BOOLEAN) : false;\n $this->vars['delimiter'] = (isset($_GET[\"delimiter\"]) && $_GET[\"delimiter\"] !== '') ? $_GET[\"delimiter\"] : ',';\n $this->vars['quotechar'] = (isset($_GET[\"quotechar\"]) && $_GET[\"quotechar\"] !== '') ? $_GET[\"quotechar\"] : '\"';\n $this->vars['escapechar'] = (isset($_GET[\"escapechar\"]) && $_GET[\"escapechar\"] !== '') ? $_GET[\"escapechar\"] : '\\\\';\n // has headers\n $this->vars['hh'] = (isset($_GET[\"hh\"])) ? filter_var($_GET[\"hh\"], FILTER_VALIDATE_BOOLEAN) :false;\n $this->vars['aa'] = (isset($_GET[\"aa\"])) ? filter_var($_GET[\"aa\"], FILTER_VALIDATE_BOOLEAN) :true;\n // 'just processing'\n $this->vars['jp'] = (isset($_GET[\"jp\"])) ? filter_var($_GET[\"jp\"], FILTER_VALIDATE_BOOLEAN) : false;\n // Processors\n $this->vars['rowProcessor'] = (isset($_GET[\"processor\"])) ? \"Processor_Row_\" . $_GET[\"processor\"] : false;\n $this->vars['dbProcessor'] = (isset($_GET[\"processor\"])) ? \"Processor_DB_\" . $_GET[\"processor\"] : false;\n\n $this->vars['method'] = ($this->vars['hh']) ? 1 : 2;\n\n // This is the output filename, used as a temporary file for dumping to DB\n if(!is_dir(APPLICATION_PATH . DIRECTORY_SEPARATOR . 'var')){\n mkdir(APPLICATION_PATH . DIRECTORY_SEPARATOR . 'var');\n }\n $this->vars['ofn'] = APPLICATION_PATH . '/var/output-' . (int) (rand() * 1000) . '.csv';\n\n // Gets the table name\n $this->vars['db']['table'] = (isset($_GET['table']) && !empty($_GET['table'])) ? $_GET['table'] : CSVRunner::getDBName($this->vars['ifn']);\n\n // Gets the column types as defined by the user\n $this->vars['columnTypes'] = json_decode($_GET['columnTypes']);\n\n $this->vars['characterSet'] = isset($_GET['characterSet']) ? $_GET['characterSet'] : $this->vars['characterSet'];\n $this->vars['collation'] = isset($_GET['collation']) ? $_GET['collation'] : $this->vars['collation'];\n\n return $this;\n }",
"function get_vars($id,$showLimit,$rperm,$cperm,$tzone,$uname){\n\t\t$this->id = $id;\n\t\t$this->showLimit = $showLimit;\n\t\t$this->rperm = $rperm;\n\t\t$this->cperm = $cperm;\n\t\t$this->tzone = $tzone;\n\t\t$this->uname = $uname;\n\t}",
"public function getVariables ()\n {\n /**\n * Specification:\n * - itemkey used to identify variable in your other functions\n * - type text, textarea, yesno, password, hidden (type hidden are variables used by CE and are required)\n * - description description of the variable, displayed in ClientExec\n * - encryptable used to indicate the variable's value must be encrypted in the database\n */\n $variables = array(\n lang('Name') => array(\n 'type' => 'hidden',\n 'description' => lang('Used by ClientExec to display plugin. It must match the action function name(s).'),\n 'value' => 'InterWorx-CP'\n ),\n lang('Description') => array (\n 'type' => 'hidden',\n 'description' => lang('Description viewable by admin in server settings'),\n 'value' => lang('InterWorx-CP integration.')\n ),\n lang('Access Key') => array (\n 'type' => 'textarea',\n 'description' => lang('Access key used to authenticate to server.'),\n 'value' => '',\n 'encryptable' => true\n ),\n lang('Actions') => array (\n 'type' => 'hidden',\n 'description' => lang('Actions currently available for this plugin.'),\n 'value' => 'Create,Delete,Suspend,UnSuspend'\n )\n );\n\n return $variables;\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }",
"function addVar($varName,$value)\n {\n $this->VARS[${'varName'}][0] = $varName;\n $this->VARS[${'varName'}][1] = $value;\n }",
"public function _js_vars()\n {\n }",
"private function setup_variables() {\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->cron_frequency = 'twicedaily';\n\t}",
"function getVar($var='value'){\r\n\r\n\t$ci =& get_instance();\r\n\r\n\tif( isset($_POST[$var]) ) return $ci->input->post($var);\r\n\r\n\telseif \t( isset($_GET[$var]) ) return $ci->input->get($var);\r\n\r\n\telse return 0;\r\n}",
"public function getGetVariables();",
"private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }",
"protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }",
"public function getVar($name) {\r\n return $this->VARS[$name];\r\n }",
"public function tracking_vars( $vars ) {\n\n\t\t$vars['content_directory'] = array(\n\t\t\t'enabled' => '0:b',\n\t\t);\n\n\t\treturn $vars;\n\n\t}",
"private function handleVars() {\n $vars = &$_GET;\n\n if(!isset($vars['game_action']))\n return;\n\n switch($vars['game_action']) {\n case 'roll':\n $this->roll();\n break;\n case 'save':\n $this->save();\n break;\n case 'clear':\n $this->clear();\n break;\n }\n }",
"private function getVars() {\n if (strlen(trim($vars = file_get_contents('php://input'))) === 0) {\n $vars = false;\n }\n return $vars;\n }",
"private function setup_globals() {\r\n\t\t/** Versions **********************************************************/\r\n\r\n\t\t$this->version = '0.3-alpha';\r\n\t\t$this->db_version = '1';\r\n\r\n\t\t/** Paths *************************************************************/\r\n\r\n\t\t$this->file = __FILE__;\r\n\t\t$this->basename = apply_filters( 'atcf_plugin_basenname', plugin_basename( $this->file ) );\r\n\t\t$this->plugin_dir = apply_filters( 'atcf_plugin_dir_path', plugin_dir_path( $this->file ) );\r\n\t\t$this->plugin_url = apply_filters( 'atcf_plugin_dir_url', plugin_dir_url ( $this->file ) );\r\n\r\n\t\t$this->template_url = apply_filters( 'atcf_plugin_template_url', 'crowdfunding/' );\r\n\r\n\t\t// Includes\r\n\t\t$this->includes_dir = apply_filters( 'atcf_includes_dir', trailingslashit( $this->plugin_dir . 'includes' ) );\r\n\t\t$this->includes_url = apply_filters( 'atcf_includes_url', trailingslashit( $this->plugin_url . 'includes' ) );\r\n\r\n\t\t// Languages\r\n\t\t$this->lang_dir = apply_filters( 'atcf_lang_dir', trailingslashit( $this->plugin_dir . 'languages' ) );\r\n\r\n\t\t/** Misc **************************************************************/\r\n\r\n\t\t$this->domain = 'atcf'; \r\n\t}",
"public function getVars()\n {\n return [\n 'get' => $this->get,\n 'session' => $this->session,\n ];\n }",
"public function set_vars($vars)\n\t{\n\t\t$this->vars = array_merge($this->vars, $vars);\n\t}",
"protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }",
"public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}",
"function initCustomRequestVars() {\n\t\tglobal $pun_user;\n\n\t\t// Auto-login phpBB users:\n\t\tif(!$this->getRequestVar('logout') && !$pun_user['is_guest']) {\n\t\t\t$this->setRequestVar('login', true);\n\t\t}\n\t}",
"public function tracking_vars( $vars ) {\n\n\t\t$vars['itsec_hide_backend'] = array(\n\t\t\t'enabled' => '0:b',\n\t\t);\n\n\t\treturn $vars;\n\n\t}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }",
"function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->login = trimStrip($_POST['login']);\n $this->surname = trimStrip($_POST['surname']);\n $this->firstname = trimStrip($_POST['firstname']);\n $this->hash = trimStrip($_POST['hash']);\n $this->yearno = (integer)trimStrip($_POST['yearno']);\n $this->groupno = (integer)trimStrip($_POST['groupno']);\n $this->email = trimStrip($_POST['email']);\n $this->calendaryear = intval($_POST['calendaryear']);\n $this->coeff = (float)$_POST['coeff'];\n }",
"private function fn_register_common_variables() {\n\t\t$current_user = wp_get_current_user();\n\t\t//perhaps we don't need this variable. still, lets continue with this.\n\t\t$this->app_data['swpmvc_current_user'] = $current_user;\n\t\t$this->app_data['inline_js'] = '';\n\t}",
"function get_var($varname, $method=\"\", $default_value=\"\")\n{\n\tglobal $_POST;\n\tglobal $_GET;\n\n\tif( isset($_GET[$varname]) && ((strcasecmp($method, \"get\") == 0 || $method == null)) )\n\t{\n\t\treturn $_GET[$varname];\n\t}\n\telse if(isset($_POST[$varname]))\n\t{\n\t\treturn $_POST[$varname];\n\t}\n\telse return $default_value;\n}",
"public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang($this->_languagePrefix.\"DisplayName\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['MerchantId'] = array(\"name\" => GetLang($this->_languagePrefix.\"MerchantId\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'MerchantIdHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['MerchantEmail'] = array(\"name\" => GetLang($this->_languagePrefix.\"MerchantEmail\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'MerchantEmailHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['CallbackId'] = array(\"name\" => GetLang($this->_languagePrefix.\"CallbackId\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'CallbackIdHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['SecretWord'] = array(\"name\" => GetLang($this->_languagePrefix.\"SecretWord\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'SecretWordHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t}",
"public function vars()\n {\n return array_merge(parent::vars(), [\n 'user' => (string) $this->key->sysuser ? $this->key->sysuser->name : 'sitepilot',\n 'key' => (string) $this->key->key\n ]);\n }",
"public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang('DisplayName'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['vendorname'] = array(\"name\" => GetLang($this->_languagePrefix.'VendorName'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'VendorNameHelp'),\n\t\t\t \"default\" => \"\",\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['cardcode'] = array(\"name\" => GetLang($this->_languagePrefix.'CardCode'),\n\t\t\t \"type\" => \"dropdown\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'CardCodeHelp'),\n\t\t\t \"default\" => \"no\",\n\t\t\t \"required\" => true,\n\t\t\t \"options\" => array(GetLang($this->_languagePrefix.'CardCodeNo') => \"NO\",\n\t\t\t\t\t\t\t GetLang($this->_languagePrefix.'CardCodeYes') => \"YES\"\n\t\t\t\t),\n\t\t\t\t\"multiselect\" => false\n\t\t\t);\n\n\t\t\t$this->_variables['testmode'] = array(\"name\" => GetLang($this->_languagePrefix.'TestMode'),\n\t \"type\" => \"dropdown\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'TestModeHelp'),\n\t\t\t \"default\" => \"no\",\n\t\t\t \"required\" => true,\n\t\t\t \"options\" => array(GetLang($this->_languagePrefix.'TestModeTest') => \"TEST\",\n\t\t\t\t\t\t\t GetLang($this->_languagePrefix.'TestModeSimulator') => \"SIMULATOR\",\n\t\t\t\t\t\t\t GetLang($this->_languagePrefix.'TestModeLive') => \"LIVE\"\n\t\t\t\t),\n\t\t\t\t\"multiselect\" => false\n\t\t\t);\n\t\t}",
"function pnUserGetVar($name, $uid=-1)\r\n{\r\n static $vars = array();\r\n\r\n if (empty($name)) {\r\n return;\r\n }\r\n\r\n if ($uid == -1) {\r\n $uid = pnSessionGetVar('uid');\r\n }\r\n if (empty($uid)) {\r\n return;\r\n }\r\n\r\n // Get this user's variables if not already obtained\r\n if (!isset($vars[$uid])) {\r\n $vars[$uid] = pnUserGetVars($uid);\r\n }\r\n\r\n // Return the variable\r\n if (isset($vars[$uid][$name])) {\r\n return $vars[$uid][$name];\r\n } else {\r\n return;\r\n }\r\n}",
"function variables($Name,$HostServer) { // Retourne la valeur de la variable $Name contenu dans config.pl\n if($HostServer==\"\") {\n\t $filename=\"/etc/backuppc/config.pl\";\n\t} else {\n\t $filename=\"/etc/backuppc/\".$HostServer.\".pl\";\n\t}\n\n\tif (file_exists(\"$filename\")) { //Si le fichier existe on recherche les valeurs\n\t $lignes = file(\"$filename\");\n\t foreach ($lignes as $num => $ligne) {\n\t if (preg_match (\"/$Conf{$Name}.*=(.*);/\",$ligne, $reg)) {\n\t\t\t if (preg_match (\"/\\[(.*)\\]/\",$reg[1],$reg2)) {\n\t\t\t \t$variable = trim ($reg2[1]);\n\t\t\t\treturn $variable;\n\t\t\t }\t \n\t\t if (preg_match(\"/'(.*)'/\",$reg[1],$reg2)) {\n\t\t\t \t $variable = trim($reg2[1]);\n\t\t\t return $variable;\n\t\t\t }\n\t\t\t $variable = trim($reg[1]); \n\t\t\t return $variable; \n\t }\n\t\t\t if (preg_match (\"/$Name.*=>(.*),/\",$ligne,$reg)) {\n\t\t\t \t$variable = trim($reg[1]);\n\t\t\t \treturn $variable;\n\t\t\t}\t\n\t }\n\t}\n}",
"private function initVars()\n {\n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if( !isset($_REQUEST['id_node']) || preg_match(\"/[^0-9]+/\",$_REQUEST['id_node']) ) \n {\n $this->tplVar['id_node'] = 0;\n $this->current_id_node = 0; \n }\n else\n {\n $this->tplVar['id_node'] = (int)$_REQUEST['id_node'];\n $this->current_id_node = (int)$_REQUEST['id_node']; \n } \n\n $this->tplVar['lock_text'] = 'unlock';\n \n // template variables\n //\n // node tree data\n $this->tplVar['tree'] = array();\n // data of the current node\n $this->tplVar['node'] = array();\n // data of the branch nodes\n $this->tplVar['branch'] = array(); \n // link data\n $this->tplVar['link'] = array();\n \n // errors\n $this->tplVar['error'] = array(); \n \n // use keywords or not\n $this->tplVar['use_keywords'] = $this->config['link']['use_keywords']; \n\n if(isset($_REQUEST['disableMainMenu']))\n {\n $this->tplVar['disableMainMenu'] = \"1\"; \n }\n else\n {\n $this->tplVar['disableMainMenu'] = FALSE; \n }\n \n // we need the url vars to open this page by the keyword map window\n if($this->config['link']['use_keywords'] == 1)\n {\n $this->tplVar['opener_url_vars'] = base64_encode('&view=editLink&id_link='.(int)$_REQUEST['id_link'].'&id_node='.$this->current_id_node.'&disableMainMenu=1');\n } \n }",
"public function getVars() {\n return array();\n }",
"function GetVar( $var )\r\n {\r\n return $this->_vars[$var];\r\n }",
"public function getSetVariables() {}",
"function request_var($var_name, $default, $multibyte = false, $cookie = false)\n{\n\tif (!$cookie && isset($_COOKIE[$var_name]))\n\t{\n\t\tif (!isset($_GET[$var_name]) && !isset($_POST[$var_name]))\n\t\t{\n\t\t\treturn (is_array($default)) ? array() : $default;\n\t\t}\n\t\t$_REQUEST[$var_name] = isset($_POST[$var_name]) ? $_POST[$var_name] : $_GET[$var_name];\n\t}\n\n\t$super_global = ($cookie) ? '_COOKIE' : '_REQUEST';\n\tif (!isset($GLOBALS[$super_global][$var_name]) || is_array($GLOBALS[$super_global][$var_name]) != is_array($default))\n\t{\n\t\treturn (is_array($default)) ? array() : $default;\n\t}\n\n\t$var = $GLOBALS[$super_global][$var_name];\n\tif (!is_array($default))\n\t{\n\t\t$type = gettype($default);\n\t}\n\telse\n\t{\n\t\tlist($key_type, $type) = each($default);\n\t\t$type = gettype($type);\n\t\t$key_type = gettype($key_type);\n\t\tif ($type == 'array')\n\t\t{\n\t\t\treset($default);\n\t\t\t$default = current($default);\n\t\t\tlist($sub_key_type, $sub_type) = each($default);\n\t\t\t$sub_type = gettype($sub_type);\n\t\t\t$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;\n\t\t\t$sub_key_type = gettype($sub_key_type);\n\t\t}\n\t}\n\n\tif (is_array($var))\n\t{\n\t\t$_var = $var;\n\t\t$var = array();\n\n\t\tforeach ($_var as $k => $v)\n\t\t{\n\t\t\tset_var($k, $k, $key_type);\n\t\t\tif ($type == 'array' && is_array($v))\n\t\t\t{\n\t\t\t\tforeach ($v as $_k => $_v)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($_v))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_v = null;\n\t\t\t\t\t}\n\t\t\t\t\tset_var($_k, $_k, $sub_key_type);\n\t\t\t\t\tset_var($var[$k][$_k], $_v, $sub_type, $multibyte);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($type == 'array' || is_array($v))\n\t\t\t\t{\n\t\t\t\t\t$v = null;\n\t\t\t\t}\n\t\t\t\tset_var($var[$k], $v, $type, $multibyte);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tset_var($var, $var, $type, $multibyte);\n\t}\n\n\treturn $var;\n}",
"public function prepareVars()\n {\n $this->vars['value'] = $this->getKeyValue();\n $this->vars['field'] = $this->formField;\n $this->vars['nameValue'] = $this->getNameValue();\n $this->vars['descriptionValue'] = $this->getDescriptionValue();\n $this->vars['addresses'] = $this->getAddresses();\n $this->vars['listWidget'] = $this->listWidget;\n $this->vars['searchWidget'] = $this->searchWidget;\n\n $this->vars['title'] = $this->title;\n $this->vars['prompt'] = str_replace('%s', '<i class=\"icon-th-list\"></i>', e(trans($this->prompt)));\n\n }",
"public function getVars()\n\t{\n\t\treturn $this->vars;\n\t}",
"function Cgn_SystemRequest() {\n\t\t/*\n\t\t$this->vars = Cgn_ObjectStore::getObject('request://request');\n\t\t$this->getvars = Cgn_ObjectStore::getObject('request://get');\n\t\t$this->postvars = Cgn_ObjectStore::getObject('request://post');\n\t\t$this->cookies = Cgn_ObjectStore::getObject('request://cookie');\n\t\t */\n\n\t\tif (defined ('CGN_PRODUCTION_ENVIRONMENT')) \n\t\t$this->prodEnv = CGN_PRODUCTION_ENVIRONMENT;\n\t}",
"function make_lang_var()\n\t{\n\t\t// Pfad einbinden\n\t\tglobal $pfad;\n\n\t\t// Backend Sprache\n\t}",
"function getVAR ($var)\n{\n if (isset($_POST[$var]) && strlen($_POST[$var]) > 0)\n {\n return $_POST[$var];\n }\n\n return (isset($_GET[$var]) && strlen($_GET[$var]) >0) ? $_GET[$var] : '';\n}",
"function SetVar( $var, $value )\r\n {\r\n $this->_vars[$var] = $value;\r\n }",
"function getVars() {\n return $this->vars;\n }",
"function metadataReadUserVars($hookName, $params) {\n\t\t$userVars =& $params[1];\t\t\n\t\t$userVars[] = 'projectID';\t\t\n\t\treturn false;\n\t}",
"public function get_vb_data ($vars = array());",
"function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->role = $_POST['role'];\n $this->firstname = trimStrip($_POST['firstname']);\n $this->surname = trimStrip($_POST['surname']);\n $this->email = trimStrip($_POST['email']);\n $this->login = trimStrip($_POST['login']);\n $this->password = trimStrip($_POST['pass1']);\n }",
"function atkGetPostVar($key=\"\")\n{\n\tif(empty($key) || $key==\"\")\n\t{\n\t\treturn $_REQUEST;\n\t}\n\telse\n\t{\n\t\tif (array_key_exists($key,$_REQUEST) && $_REQUEST[$key]!=\"\") return $_REQUEST[$key];\n\t\treturn \"\";\n\t}\n}",
"public static function collect(): void\n {\n static::parameter('_get', $_GET);\n static::parameter('_post', $_POST);\n static::parameter('_files', $_FILES);\n\n foreach ($_SERVER as $key => $value) {\n if (!in_array($key, static::$serverVariables)) {\n continue;\n }\n static::parameter('server_' . strtolower($key), $value);\n }\n\n foreach ($_COOKIE as $key => $value) {\n if (!in_array($key, static::$cookieVariables)) {\n continue;\n }\n static::parameter('cookie_' . strtolower($key), $value);\n }\n }",
"function prepare_vars_for_template_usage()\n {\n }",
"function readFromPost() {\n\t\t$this->idt = requestVar('idt');\n\t\t$this->newIdt = requestVar('template');\n\t\t$this->description = requestVar('description');\n\t\t$this->postsHeader = requestVar('postListHeader');\n\t\t$this->postBody = requestVar('postBody');\n\t\t$this->postsFooter = requestVar('postListFooter');\n\t\t$this->formLogged = requestVar('formLogged');\n\t\t$this->form = requestVar('formNotLogged');\n\t\t$this->navigation = requestVar('navigation');\n\t\t$this->name = requestVar('nameNoUrl');\n\t\t$this->nameLin = requestVar('nameUrl');\n\t\t$this->memberName = requestVar('memberName');\n\t\t$this->date = requestVar('date');\n\t\t$this->time = requestVar('time'); \n\t\t$this->nextPage = requestVar('nextPage');\n\t\t$this->previousPage =requestVar('previousPage');\n\t\t$this->firstPage = requestVar('firstPage');\n\t\t$this->lastPage = requestVar('lastPage');\t\n\n\t\t$this->urlToLink = (requestVar('urlToLink') == 'yes') ? true : false;\n\t\t$this->emoToImg = \t (requestVar('emoToImg') == 'yes') ?true : false;\n\t\t$this->gravSize = \t (int)requestVar('gravSize');\n\t\t$this->gravDefault = requestVar('gravDefault');;\n\n\n\t\t\n\t\t$this->action = requestVar('action');\n\t}",
"public function setGlobalsData()\n\t{\n\t\t$GLOBALS['controller'] = $this->class_Name;\n\t\t$GLOBALS['action'] = $this->action_Name;\n\t}",
"function add_php_var($key, $value){\n\t\t$this->php_vars[$key] = $value;\n\t}",
"function fill_general_variables()\n\t\t{\n\t\t\t//collect error messages before\n\t\t\t$this->message[] = $this->process_monitor->get_error(false, _DEBUG);\n\t\t\t$this->fill_form_variables();\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'monitor_stats'\t\t\t=> $this->fill_monitor_stats($this->stats),\n\t\t\t));\n\t\t}",
"function setupInitialVars() {\n\t\tparent::setupInitialVars();\n\t\t\n\t\t$this->getEngine()->assign('uploadUri', $this->getController()->buildUriPath(uploadController::ACTION_UPLOAD));\n\t\t$this->getEngine()->assign('doUploadUri', $this->getController()->buildUriPath(uploadController::ACTION_DO_UPLOAD));\n\t\t$this->getEngine()->assign('doMovieSave', $this->getController()->buildUriPath(uploadController::ACTION_MOVIE_SAVE));\n\t}",
"public function getVars()\n\t{\n\t\treturn $this->requestVars;\n\t}",
"protected function _setDefaultVars()\r\n\t{\r\n\t\t// Mediawiki globals\r\n\t\tglobal $wgScript, $wgUser, $wgRequest;\r\n\t\t\r\n\t\t$this->action = $this->getAction();\r\n\t\t$this->pageKey = $this->getNamespace('dbKey');\r\n\t\t$this->project = $this->getNamespace('dbKey');\t\t\r\n\t\t$this->pageTitle = $this->getNamespace('text');\r\n\t\t$this->formAction = $wgScript;\r\n\t\t$this->url = $wgScript . '?title=' . $this->pageKey . '&bt_action=';\r\n\t\t$this->viewUrl = $this->url . 'view&bt_issueid=';\r\n\t\t$this->addUrl = $this->url . 'add';\r\n\t\t$this->editUrl = $this->url . 'edit&bt_issueid=';\r\n\t\t$this->deleteUrl = $this->url . 'archive&bt_issueid=';\r\n\t\t$this->isLoggedIn = $wgUser->isLoggedIn();\r\n\t\t$this->isAllowed = $wgUser->isAllowed('protect');\r\n\t\t$this->hasDeletePerms = $this->hasPermission('delete');\r\n\t\t$this->hasEditPerms = $this->hasPermission('edit');\r\n\t\t$this->hasViewPerms = $this->hasPermission('view');\r\n\t\t$this->search = true;\r\n\t\t$this->filter = true;\r\n\t\t$this->auth = true;\r\n\t\t$this->issueType = $this->_config->getIssueType();\r\n\t\t$this->issueStatus = $this->_config->getIssueStatus();\r\n\t\t\r\n\t\t// Request vars\r\n\t\t$this->filterBy = $wgRequest->getVal('bt_filter_by');\r\n\t\t$this->filterStatus = $wgRequest->getVal('bt_filter_status');\r\n\t\t$this->searchString = $wgRequest->getVal('bt_search_string');;\r\n\t}",
"function initSessionVariables()\n\t{\n\t\tif( isset($_GET['close_noscript']))\n\t\t{\n\t\t\t$_SESSION['noscript_message_close'] = true;\n\t\t}\n\t\tif( isset($_SESSION['logged']) )\n\t\t{\n\t\t\t$this->logout_link_hide = '';\n\t\t}\n\t\tif( isset($_SESSION['noscript_message_close']) )\n\t\t{\n\t\t\t$this->noscript_close = ' hidden';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->noscript_close_link = '?' . str_replace('&','&',$_SERVER['QUERY_STRING']) . '&close_noscript';\n\t\t}\n\t}",
"function safePostGetVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n elseif (isset($_GET[$varName]))\n return $_GET[$varName];\n else\n return $default;\n}",
"public function setVars( array $vars ) {\n $this->vars += $vars;\n }",
"public function getVariables()\n {\n \treturn isset($this->all['variables']) ? $this->all['variables'] : array();\n }",
"protected function getPreserveGetVars() {}",
"public function addVars(array $vars = array())\n\t{\n\t\tforeach($vars as $var => $value)\n\t\t{\n\t\t\t$this->vars[$var] = $value;\n\t\t}\n\t}",
"public function prepareVars()\n {\n if ($this->showLogRelations !== null) {\n $this->showLogRelations = (array) $this->showLogRelations;\n }\n\n $this->vars['name'] = $this->formField->getName();\n $this->vars['model'] = $this->model;\n $this->vars['showUndoChangesButton'] = $this->showUndoChangesButton;\n }",
"public function register_globals()\n {\n }",
"public function register_globals()\n {\n }",
"public function prepareVars()\n {\n $this->vars['searchBox'] = $this;\n $this->vars['cssClasses'] = implode(' ', $this->cssClasses);\n $this->vars['placeholder'] = lang($this->prompt);\n $this->vars['value'] = $this->getActiveTerm();\n }",
"function dft (){\n\t\tglobal $u;\n\t\tglobal $i;\n\t\tglobal $n;\n\t\tglobal $e;\n\t\t$u = \"user\";\n\t\t$i = \"default.png\";\n\t\t$n = \"name\";\n\t\t$e = \"email\";\n\t}",
"public function tracking_vars() {\n WC_Gokeep_JS::get_instance()->create_vars();\n }",
"public static function getVars()\n {\n if (is_null(static::$vars)) {\n static::$vars = static::buildRepository(true);\n }\n\n return static::$vars;\n }",
"private function initVars()\n {\n // template array variables\n $this->tplVar['art_pubdate'] = array();\n $this->tplVar['art_modifydate'] = array();\n }",
"function load(){\n\t\t$this->ctrl = (int)$_SESSION['ctrl'];\n\t\t$this->id = (int)$_SESSION['USid'];\n\t\t$this->name = (string)$_SESSION['USname'];\n\t\t$this->email = (string)$_SESSION['USemail'];\n\t\t$this->lastlogin = (string)$_SESSION['USlastlogin'];\n\t\t$this->priv = (int)$_SESSION['priv'];\n\t\t$this->logontries = (int)$_SESSION['logontries'];\n\t\t$this->agentid = @(int)$_SESSION['USagentid'];\n\t}",
"public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }",
"function view(){\n\t\t\t$this->hold_globals['globals']['domain_name'] = $GLOBALS['DOMAIN_PARTS'];\n\t\t\t$this->hold_session['session'] = $_SESSION; \n\t}",
"private static function getInputVars() {\n\t\tif (static::$vars === null) {\n\t\t\t// take those vars only once\n\t\t\tparse_str(static::getRawData(), $vars);\n\t\t\tstatic::$vars = (array) $vars;\n\t\t}\n\t\t\n\t\treturn static::$vars;\n\t}",
"function get($var) {\n\t\treturn $this->_viewVars[$var];\n\t}"
] | [
"0.7012175",
"0.66432005",
"0.6452023",
"0.64487046",
"0.64229107",
"0.638447",
"0.6354289",
"0.63298756",
"0.6250173",
"0.6216289",
"0.6202388",
"0.6201449",
"0.6193546",
"0.6193429",
"0.6169538",
"0.6126079",
"0.60988605",
"0.60714054",
"0.6064048",
"0.604472",
"0.6013538",
"0.5991035",
"0.5988792",
"0.5964333",
"0.5963845",
"0.5959403",
"0.59531045",
"0.5950426",
"0.5930511",
"0.5918163",
"0.59061444",
"0.5904773",
"0.5904188",
"0.58910275",
"0.58833975",
"0.58814293",
"0.5879229",
"0.5868998",
"0.5864691",
"0.58628225",
"0.5858586",
"0.58414155",
"0.5832175",
"0.58177185",
"0.5814311",
"0.58071774",
"0.579437",
"0.5793961",
"0.57874924",
"0.5783145",
"0.57791585",
"0.5773515",
"0.57638747",
"0.5761025",
"0.5759724",
"0.5757868",
"0.5749997",
"0.57277626",
"0.572201",
"0.571743",
"0.5715126",
"0.5714678",
"0.5713856",
"0.57011247",
"0.56936604",
"0.5689889",
"0.56868595",
"0.56781393",
"0.56701887",
"0.5666546",
"0.56659734",
"0.56599075",
"0.56555843",
"0.5654127",
"0.5653799",
"0.5645472",
"0.56450987",
"0.5639591",
"0.5636304",
"0.5632174",
"0.5629968",
"0.5628424",
"0.5622449",
"0.5617741",
"0.5617605",
"0.56160384",
"0.5613357",
"0.56064785",
"0.5602622",
"0.5602422",
"0.5602422",
"0.56022215",
"0.560064",
"0.55976486",
"0.5580559",
"0.5572197",
"0.55713624",
"0.5558021",
"0.55508536",
"0.55419374",
"0.5541712"
] | 0.0 | -1 |
Get the File variable with no magic quotes in the values. | function FileVar($name, $default_value = false) {
if (!isset($_FILES))
return false;
if (isset($_FILES[$name]['name'])) {
if (!get_magic_quotes_gpc())
return InjectSlashes($_FILES[$name]['name']);
return $_FILES[$name]['name'];
}
return $default_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function file($var=null)\n {\n if ($var) return $_FILE[$var] ?? null;\n\n return $_FILE;\n }",
"public function getRawValue ()\n {\n return $this->files->getFile( $this->getName() );\n }",
"public function getCleanFile()\n {\n return $this->_getCleanProperty('file');\n }",
"public function getMediaFileUnwrapped()\n {\n return $this->readWrapperValue(\"media_file\");\n }",
"final public function getFile()\n {\n return 'file';\n }",
"private function _file()\n {\n return Html::getAttributeValue($this->model, $this->attribute);\n }",
"public function getf() {\n return $this->file;\n }",
"public function file($key=null,$value=null){\n return $this->methodsData(\"file\",$key,$value);\n }",
"public function getFileName()\n {\n $value = $this->get(self::FILENAME);\n return $value === null ? (string)$value : $value;\n }",
"protected function get_file() {\r\n\t\t$file = '';\r\n\r\n\t\tif ( @file_exists( $this->file ) ) {\r\n\t\t\tif ( ! is_writeable( $this->file ) ) {\r\n\t\t\t\t$this->is_writable = false;\r\n\t\t\t}\r\n\r\n\t\t\t$file = @file_get_contents( $this->file );\r\n\t\t} else {\r\n\t\t\t@file_put_contents( $this->file, '' );\r\n\t\t\t@chmod( $this->file, 0664 );\r\n\t\t}\r\n\r\n\t\treturn $file;\r\n\t}",
"protected function getFileOrValue($value)\n {\n return file_exists($value) ? file_get_contents($value) : $value;\n }",
"public function getFilesVars($key = '') {\n if(!empty($key)) {\n if(isset($this->files[$key])) {\n return ($this->files[$key]);\n } else {\n return '';\n }\n } else {\n return $this->files;\n }\n }",
"public function getFile(): string\n {\n return $this->file;\n }",
"public function getFile(): string;",
"public function getFile(): string;",
"public function getFile(): string;",
"protected function get_file() {\n\n\t\t$file = '';\n\n\t\tif ( @file_exists( $this->file ) ) {\n\n\t\t\tif ( ! is_writeable( $this->file ) ) {\n\t\t\t\t$this->is_writable = false;\n\t\t\t}\n\n\t\t\t$file = @file_get_contents( $this->file );\n\n\t\t} else {\n\n\t\t\t@file_put_contents( $this->file, '' );\n\t\t\t@chmod( $this->file, 0664 );\n\n\t\t}\n\n\t\treturn $file;\n\t}",
"public function getFile_att()\n {\n return $this->file_att;\n }",
"function _field_file($val) \n {\n $res = \"\";\n $size = $this->_get_field_size();\n $size -= 12; // compensate for Browse.. button\n\n if (isset($this->attribs['ws_path'])) {\n $path = $this->attribs['ws_path'];\n }\n\n\n $res .= sprintf(\"<input type=\\\"file\\\" name=\\\"%s\\\" id=\\\"%s\\\" size=\\\"%d\\\" maxlength=\\\"%d\\\" class=\\\"%s\\\" %s/>\\n\",\n $this->fname,\n $this->fname,\n $size,\n $this->attribs['maxlength'],\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs);\n\n if (isset($this->attribs['show_current']) and !empty($val)) {\n $res .= sprintf('<br /><span style=\"font-size: 9px\">current file: <a href=\"%s/%s\" target=\"flashWin\">%s</a></span>', $path, $val, $val);\n }\n\n return $res;\n }",
"public function getDataWithTypeFileReturnsUidOfFileObject() {}",
"public static function getFile() {}",
"public static function getInvalidFile()\n {\n return 'some/non/existing/file.txt';\n }",
"public static function custom_fields_file()\r\n {\r\n return GSDATAOTHERPATH.ImCategory::$current_category.'.'.IM_CUSTOMFIELDS_FILE;\r\n }",
"public function getFile()\n {\n return $this->readOneof(1);\n }",
"public function setMediaFileUnwrapped($var)\n {\n $this->writeWrapperValue(\"media_file\", $var);\n return $this;}",
"function get_file()\n\t{\n\t\treturn $this->file;\n\t}",
"public function get_file() {\n\t\treturn $this->file;\n\t}",
"public function file() {\n return $this->file;\n }",
"protected function getParameterFileContent() {\n $files = $this->getParameterFiles();\n foreach ($files as $parameter_file) {\n if (file_exists($this->basePath . $parameter_file)) {\n $this->event->getIO()->write(\"Create the settings file from the $parameter_file file\");\n return file_get_contents($this->basePath . $parameter_file);\n }\n else {\n $this->event->getIO()->write(\"Parameter file $parameter_file doesn't exists\" . (($next = next($files)) ? ', trying with ' . $next : ''));\n }\n }\n return null;\n }",
"public function get_file()\n {\n return $this->file;\n }",
"public function file()\n {\n return $this->file;\n }",
"public function getFile() {\n\t\treturn $this->data['file'];\n\t}",
"public static function getInvalidFile(): string\n {\n return \"some/non/existing/file.txt\";\n }",
"function _getXmlText($file, $variable)\r\n {\r\n $value = null;\r\n if (JFile::exists($file)) {\r\n $xml = simplexml_load_file($file);\r\n if ($xml !== false) {\r\n if (isset($xml->$variable)) {\r\n $value = (string)$xml->$variable;\r\n }\r\n }\r\n }\r\n\r\n return $value;\r\n }",
"final function getFile();",
"protected function fileObj() {\n\t\t$fileObj = new Varien_Io_File ();\n\t\treturn $fileObj;\n\t}",
"public static function getKeepFile() {}",
"public function wt_parse_download_file_field($value) {\n // Absolute file paths.\n if (0 === strpos($value, 'http')) {\n return esc_url_raw($value);\n }\n // Relative and shortcode paths.\n return wc_clean($value);\n }",
"public function getFile():string {\n\t\t\treturn $this->file;\n\t\t}",
"public function get_full_file_name() {\r\n return (string) $this->full_file;\r\n }",
"function ms_file_constants()\n {\n }",
"function getFile(): object {\n return $this->file;\n }",
"public function getFileId(): string\n {\n return $this->file_id;\n }",
"public function file(): string\n {\n return $this->column->isFile();\n }",
"public function getFileInstance()\n {\n return $this->file;\n }",
"public function getFilenamePlain() : string\n {\n return $this->getFilename(true);\n }",
"public function getFileName(): ?string {\n $val = $this->getBackingStore()->get('fileName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fileName'\");\n }",
"public function getFileExec()\n {\n return $this->readOneof(6);\n }",
"function acf_get_file_input($attrs = array())\n{\n}",
"function & getFileInstance() \n {\n $vfile =& v()->filesystem()->file();\n \t return $vfile;\n }",
"public function getFileAsName()\n {\n if (self::TYPE_NATURAL === $this->_type) {\n $nameParts = array(\n $this->lastName,\n $this->middleName,\n $this->firstName,\n );\n } else {\n $nameParts = array($this->companyName);\n }\n $fileas = implode(' ', $nameParts);\n\n return $fileas;\n\n }",
"public function getFileId(): ?string\n {\n return $this->fileId;\n }",
"protected function filename()\n {\n return null;\n }",
"protected function filename()\n {\n return null;\n }",
"public static function getType() {\n\t\treturn \"File\";\n\t}",
"function getTokenPickupFile()\n {\n return $this->_props['TokenPickupFile'];\n }",
"public function getFile() {\r\n return $this->node->getAttribute(\"file\");\r\n }",
"public function getFactuurFile() {\n\t\treturn $this->factuurFile;\n\t}",
"public function findFile(): string\n {\n if (file_exists(self::VALUE_1)) {\n return self::VALUE_1;\n }\n if (file_exists(self::VALUE_2)) {\n return self::VALUE_2;\n }\n throw new \\RuntimeException('No deeployer config file was found.');\n }",
"public function getFile()\n {\n return $this->_File;\n }",
"public function getFileVuesequipe(): string\n {\n return (string) $this->fileVuesequipe;\n }",
"private function _getFileType($fileName)\n {\n $safeFileName = escapeshellarg($fileName);\n return trim(exec(\"file -b $safeFileName\"));\n\n//return $this->getFileType2($fileName);\n }",
"public function getFileKey()\n {\n return isset($this->FileKey) ? $this->FileKey : null;\n }",
"public function getValue(){\r\n\t\tif(\r\n\t\t\tisset($_FILES[$this->name]['tmp_name'])\r\n\t\t\t&& (strlen($_FILES[$this->name]['tmp_name']) > 0)\r\n\t\t\t&& ($_FILES[$this->name]['size'] > 0)\r\n\t\t\t&& ($_FILES[$filedataName]['error'] == UPLOAD_ERR_OK)\r\n\t\t){\r\n\t\t\treturn $_FILES[$this->name]['name'];\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}",
"public static function file() {\r\n\t\treturn __FILE__;\r\n\t}",
"public function getFileName() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filename\", FALSE);\n\t}",
"public function getFilename()\n {\n return null;\n }",
"protected function getFileDataKey($key)\n {\n list($fileUidOrCurrentKeyword, $requestedFileInformationKey) = explode(':', $key, 3);\n try {\n if ($fileUidOrCurrentKeyword === 'current') {\n $fileObject = $this->getCurrentFile();\n } elseif (MathUtility::canBeInterpretedAsInteger($fileUidOrCurrentKeyword)) {\n /** @var ResourceFactory $fileFactory */\n $fileFactory = GeneralUtility::makeInstance(ResourceFactory::class);\n $fileObject = $fileFactory->getFileObject($fileUidOrCurrentKeyword);\n } else {\n $fileObject = null;\n }\n } catch (Exception $exception) {\n /** @var \\TYPO3\\CMS\\Core\\Log\\Logger $logger */\n $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);\n $logger->warning('The file \"' . $fileUidOrCurrentKeyword . '\" could not be found and won\\'t be included in frontend output', ['exception' => $exception]);\n $fileObject = null;\n }\n\n if ($fileObject instanceof FileInterface) {\n // All properties of the \\TYPO3\\CMS\\Core\\Resource\\FileInterface are available here:\n switch ($requestedFileInformationKey) {\n case 'name':\n return $fileObject->getName();\n case 'uid':\n if (method_exists($fileObject, 'getUid')) {\n return $fileObject->getUid();\n }\n return 0;\n case 'originalUid':\n if ($fileObject instanceof FileReference) {\n return $fileObject->getOriginalFile()->getUid();\n }\n return null;\n case 'size':\n return $fileObject->getSize();\n case 'sha1':\n return $fileObject->getSha1();\n case 'extension':\n return $fileObject->getExtension();\n case 'mimetype':\n return $fileObject->getMimeType();\n case 'contents':\n return $fileObject->getContents();\n case 'publicUrl':\n return $fileObject->getPublicUrl();\n default:\n // Generic alternative here\n return $fileObject->getProperty($requestedFileInformationKey);\n }\n } else {\n // @todo fail silently as is common in tslib_content\n return 'Error: no file object';\n }\n }",
"public function getFilename() {}",
"public function getFileName()\n {\n if (array_key_exists(\"fileName\", $this->_propDict)) {\n return $this->_propDict[\"fileName\"];\n } else {\n return null;\n }\n }",
"public function getFileID()\n {\n return $this->get('FileID');\n }",
"public function file() { return $this->input_file; }",
"public function getFile ();",
"public function get_file_name() {\n\t\treturn $this->file;\n\t}",
"public function filename(): string;",
"function getFileId() {\n\t\treturn $this->getData('fileId');\n\t}",
"public function getFileReflection()\n\t{\n\t\treturn $this->getBroker()->getFile($this->fileName);\n\t}",
"public function getFile()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFileName(): string;",
"public function fileName()\n {\n return $this->getCleanString(self::$_file_name_clean);\n }",
"public function testFileValue() : void {\n\t\t$this->assertEquals('kc_file', PostType::File->value);\n\t}",
"function form_file($name = '') {\n\n\tif ($name == 'attachment') {\n\t\tunset($name);\n\t\t$name = \"\";\n\t}\n\n\t$value = html_form_escape($value, $override);\n\n\t$name = 'attachment' . $name;\n\treturn \"<input type=\\\"file\\\" name=\\\"$name\\\" />\";\n\n}",
"public function GetRealFileName()\n {\n $oFileType = $this->GetFileType();\n\n return $this->id.'.'.$oFileType->sqlData['file_extension'];\n }",
"public function getInputFileAttribute()\n\t{\n\t\treturn \"$this->id.in\";\n\t}",
"public function getFile() {\n return $this->file;\n }",
"public function getFile() {\n return $this->file;\n }",
"function _file() {\n\t\t$path = implode('/', $this->params['pass']);\n\t\tif ( !empty($this->params['url']['ext']) ) {\n\t\t\t$path .= '.' . $this->params['url']['ext'];\n\t\t}\n\t\treturn array(MEDIA . $path, $path);\n\t}",
"public function getFileWithoutExt(string $sFile): string\n {\n return pathinfo($sFile, PATHINFO_FILENAME);\n }"
] | [
"0.64237046",
"0.6357497",
"0.61674374",
"0.6071658",
"0.59258455",
"0.58803195",
"0.5830757",
"0.5762742",
"0.56103486",
"0.55734986",
"0.5565074",
"0.5552078",
"0.5518561",
"0.5477841",
"0.5477841",
"0.5477841",
"0.5449134",
"0.54430497",
"0.5440303",
"0.5431993",
"0.5421236",
"0.54157084",
"0.5345433",
"0.53303444",
"0.53159684",
"0.5312673",
"0.53032273",
"0.5293862",
"0.52872276",
"0.527455",
"0.5269591",
"0.5263806",
"0.52441204",
"0.5240225",
"0.5232025",
"0.5231118",
"0.5224146",
"0.52231014",
"0.5214886",
"0.5195283",
"0.517179",
"0.5170141",
"0.51671946",
"0.5159149",
"0.5153525",
"0.51461077",
"0.5142505",
"0.5140534",
"0.5132806",
"0.51280504",
"0.511541",
"0.5113869",
"0.51081526",
"0.51081526",
"0.51072055",
"0.5099633",
"0.50969565",
"0.50902545",
"0.50850064",
"0.50778717",
"0.50681657",
"0.5067077",
"0.5063633",
"0.5060031",
"0.50526214",
"0.50504243",
"0.5046332",
"0.50416255",
"0.5025119",
"0.5021631",
"0.5018673",
"0.5009305",
"0.5008411",
"0.50080866",
"0.50065506",
"0.5003752",
"0.49999583",
"0.49982792",
"0.49982792",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49972704",
"0.49906278",
"0.4988366",
"0.4988359",
"0.4977357",
"0.49758473",
"0.49649212",
"0.49637476",
"0.49637476",
"0.49635667",
"0.49596894"
] | 0.64107454 | 1 |
Get the posted variable with no magic quotes in the values. | function GetVar($name, $default_value = false) {
if (!isset($_GET)) {
return false;
}
if (isset($_GET[$name])) {
if (!get_magic_quotes_gpc()) {
return InjectSlashes($_GET[$name]);
}
return $_GET[$name];
}
return $default_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPost($key) {\n\t$value = '';\n\tif (isset($_POST[$key])) {\n\t\t$value = $_POST[$key];\n\t}\n\t// return $value;\n\t//Phan 2: Ham xu ly ky tu dac biet\n\treturn removeSpecialCharacter($value);\n}",
"function cc_post_get( $var ) {\n\tcc_post_fail_if_not_valid( $var );\n\n\tif ( cc_post_isset( $var ) )\n\t\treturn $_POST[$var];\n\telse\n\t\treturn \"\";\n}",
"function get_post($name = '', $clean = true) {\n\tif($name === '') {\n\t\t$return = array();\n\n\t\tforeach ($_POST as $key => $post) {\n\t\t\t$return[$key] = $clean ? clean_variable($post) : $post;\n\t\t}\n\t\treturn $return;\n\t}\n\n\tif (!isset($_POST[$name])) {\n\t\treturn '';\n\t}\n\n\treturn $clean ? clean_variable($_POST[$name]) : $_POST[$name];\n}",
"function get_post_var($var)\r\n{\r\n if (isset($_POST[$var]) AND !empty($_POST[$var])) {\r\n $val = $_POST[$var];\r\n return sanitizeAny($val);\r\n } else {\r\n return null;\r\n }\r\n}",
"public static function _stringFromPost(string $variableName) {\n return self::_(INPUT_POST, $variableName, '', FILTER_SANITIZE_STRING);\n }",
"function cleanString($name) {\n\t\tif (isset($this->getvars[$name])){\n\t\t\t$val = $this->getvars[$name];\n\t\t} else {\n\t\t\t$val = @$this->postvars[$name];\n\t\t}\n\t\tif ($val == '') {\n\t\t\treturn '';\n\t\t}\n\t\tif (is_array($val)) {\n\t\t\tarray_walk_recursive($val, array('Cgn', 'removeCtrlChar'));\n\t\t} else {\n\t\t \tCgn::removeCtrlChar($val);\n\t\t\t$val = (string)$val;\n\t\t}\n\t\treturn $val;\n\n\t}",
"static function get_http_post_val($post_variable) {\n if (isset($_POST[$post_variable])) {\n return $_POST[$post_variable];\n } else {\n return '';\n }\n }",
"function PostVar($name, $default_value = false) {\r\n if (!isset($_POST)) {\r\n return false;\r\n }\r\n if (isset($_POST[$name])) {\r\n if (!get_magic_quotes_gpc()) {\r\n return InjectSlashes($_POST[$name]);\r\n }\r\n return $_POST[$name];\r\n }\r\n return $default_value;\r\n}",
"function _postn($v) {\r\n $r = isset($_POST[$v]) ? bwm_clean($_POST[$v]) : '';\r\n return $r == '' ? NULL : $r;\r\n}",
"function atkGetPostVar($key=\"\")\n{\n\tif(empty($key) || $key==\"\")\n\t{\n\t\treturn $_REQUEST;\n\t}\n\telse\n\t{\n\t\tif (array_key_exists($key,$_REQUEST) && $_REQUEST[$key]!=\"\") return $_REQUEST[$key];\n\t\treturn \"\";\n\t}\n}",
"function get_post($conn, $var){\n\t\treturn $conn->real_escape_string($_POST[$var]);\n\t}",
"function app_contact_get_var($val = '', $default = '') {\n return !isset($_REQUEST[$val]) ? $default : trim($_REQUEST[$val], ' <>');\n}",
"function inputValue($name) {\n\t\t\tif ( !isset($_POST[$name]) ) { return \"\"; }\n\t\t\telse { $temp = rtrim($_POST[$name]); return ltrim($temp); }\n\t\t}",
"function safePostVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n else\n return $default;\n}",
"private function get_post( $name ) {\n\t\tif ( isset( $_POST[ $name ] ) ) {\n\t\t\treturn trim( $_POST[ $name ] );\n\t\t}\n\t\treturn null;\n\t}",
"public function getPostVars($key = '') {\n if(!empty($key)) {\n if(isset($this->post[$key])) {\n return ($this->post[$key]);\n } else {\n return '';\n }\n } else {\n return $this->post;\n }\n }",
"public function getPostData($data) {\n return filter_var($data, FILTER_SANITIZE_STRING);\n }",
"function posted_value($name) {\n if(isset($_POST[$name])) {\n return htmlspecialchars($_POST[$name]);\n }\n}",
"function get_form_field($field_name)\n{\n global $HTTP_GET_VARS;\n global $HTTP_POST_VARS;\n\n $field_value = null;\n if (isset($_GET)) {\n if (isset($_GET[$field_name])) $field_value = $_GET[$field_name];\n else if (isset($_POST[$field_name]))\n $field_value = $_POST[$field_name];\n else if (isset($_GET[\"_\".$field_name]))\n $field_value = $_GET[\"_\".$field_name];\n else if (isset($_POST[\"_\".$field_name]))\n $field_value = $_POST[\"_\".$field_name];\n }\n else {\n if (isset($HTTP_GET_VARS[$field_name]))\n $field_value = $HTTP_GET_VARS[$field_name];\n else if (isset($HTTP_POST_VARS[$field_name]))\n $field_value = $HTTP_POST_VARS[$field_name];\n else if (isset($HTTP_GET_VARS[\"_\".$field_name]))\n $field_value = $HTTP_GET_VARS[\"_\".$field_name];\n else if (isset($HTTP_POST_VARS[\"_\".$field_name]))\n $field_value = $HTTP_POST_VARS[\"_\".$field_name];\n }\n if (isset($field_value) && get_magic_quotes_gpc()) {\n if (is_array($field_value)) strip_form_field_arrays($field_value);\n else $field_value = stripslashes($field_value);\n }\n return $field_value;\n}",
"function getData($field)\n{\n if (!isset($_POST[$field])) {\n $data = \"\";\n } else {\n $data = trim($_POST[$field]);\n $data = htmlspecialchars($data, ENT_QUOTES);\n }\n return $data;\n}",
"function getPostData($str){\n $data = $_POST[$str] ?? '';\n return htmlentities($data);\n}",
"function getData($field) {\r\n if (!isset($_POST[$field])) {\r\n $data = \"\";\r\n } else {\r\n $data = trim($_POST[$field]);\r\n $data = htmlspecialchars($data);\r\n }\r\n return $data;\r\n}",
"function input($name){\n\t\tif(isset($_POST[$name])){\n\t\t\t$t = $this->simpleCleanInput($_POST[$name]);\n\t\t\tif($t !== false){\n\t\t\t\treturn $t;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"function getData($field) {\n if (!isset($_POST[$field])) {\n $data = \"\";\n htmlspecialchars($data, ENT_QUOTES);\n }\n else {\n $data = trim($_POST[$field]);\n $data = htmlspecialchars($data);\n htmlspecialchars($data, ENT_QUOTES);\n }\n return $data;\n }",
"function getVars() {\r\n return !empty($_POST) ? $_POST : (!empty($_GET) ? $_GET : NULL);\r\n }",
"function get_http_var ($name, $sanitize=true, $default=null){\n\t\t//global $HTTP_GET_VARS, $HTTP_POST_VARS;\n\t\tif (array_key_exists($name, $_POST)) {\n\t\t\treturn mk_utf8(clean_var($_POST[$name], $sanitize));\n\t\t}\n\t\tif (array_key_exists($name, $_GET)) {\n\t\t\treturn mk_utf8(clean_var($_GET[$name], $sanitize));\n\t\t}\n\t\n\t\treturn $default;\n\t}",
"function getVAR ($var)\n{\n if (isset($_POST[$var]) && strlen($_POST[$var]) > 0)\n {\n return $_POST[$var];\n }\n\n return (isset($_GET[$var]) && strlen($_GET[$var]) >0) ? $_GET[$var] : '';\n}",
"public static function getPostValue($name)\n {\n if (isset($_GET[$name])) return $_GET[$name];\n else if(isset($_POST[$name])) return $_POST[$name];\n else return '';\n }",
"function getPost( $name ) #version 1\n{\n if ( isset($_POST[$name]) ) \n {\n return htmlspecialchars($_POST[$name]);\n }\n return \"\";\n}",
"function sanitation($postVal){\n\t$rawinfo= $postVal;\n\t$removeSpecial = htmlspecialchars($rawinfo);\n\t$finalForm = escapeshellcmd($removeSpecial);\n\treturn $finalForm;\n}",
"function getPostParam($name,$def=null) {\n\treturn htmlentities(isset($_POST[$name]) ? $_POST[$name] : $def,ENT_QUOTES);\n\t\t\n}",
"function safePostGetVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n elseif (isset($_GET[$varName]))\n return $_GET[$varName];\n else\n return $default;\n}",
"function postInput($string)\n\t{\n\t\treturn inset($_post[$string]) ? $_post[$string] : '';\n\t}",
"function getPostValue ( $name ) {\n\tglobal $HTTP_POST_VARS;\n\n\tif ( isset ( $_POST ) && is_array ( $_POST ) && ! empty ( $_POST[$name] ) ) {\n\t\t$HTTP_POST_VARS[$name] = $_POST[$name];\n\t\treturn $_POST[$name];\n\t} else if ( ! isset ( $HTTP_POST_VARS ) ) {\n\t\treturn null;\n\t} else if ( ! isset ( $HTTP_POST_VARS[$name] ) ) {\n\t\treturn null;\n\t}\n\treturn ( $HTTP_POST_VARS[$name] );\n}",
"function get_form_var($variable, $type = 'string')\n{\n // We use some functions from here\n require_once \"functions.inc\";\n \n global $cli_params, $allow_cli;\n \n // Set the default value, and make sure it's the right type\n if (func_num_args() > 2)\n {\n $value = func_get_arg(2);\n $value = ($type == 'array') ? (array)$value : $value;\n }\n else\n {\n $value = ($type == 'array') ? array() : NULL;\n }\n \n // Get the command line arguments if any (and we're allowed to),\n // otherwise get the POST variables\n if ($allow_cli && (!empty($cli_params) && isset($cli_params[$variable])))\n {\n $value = $cli_params[$variable];\n }\n else if (!empty($_POST) && isset($_POST[$variable]))\n {\n $value = $_POST[$variable];\n }\n else if (!empty($HTTP_POST_VARS) && isset($HTTP_POST_VARS[$variable]))\n {\n $value = $HTTP_POST_VARS[$variable];\n }\n \n // Then get the GET variables\n if (!empty($_GET) && isset($_GET[$variable]))\n {\n $value = $_GET[$variable];\n }\n else if (!empty($HTTP_GET_VARS) && isset($HTTP_GET_VARS[$variable]))\n {\n $value = $HTTP_GET_VARS[$variable];\n }\n \n // Cast to an array if necessary\n if ($type == 'array')\n {\n $value = (array)$value;\n }\n \n // Clean up the variable\n if ($value != NULL)\n {\n if ($type == 'int')\n {\n $value = intval(unslashes($value));\n }\n else if ($type == 'string')\n {\n $value = unslashes($value);\n }\n else if ($type == 'array')\n {\n foreach ($value as $arrkey => $arrvalue)\n {\n $value[$arrkey] = unslashes($arrvalue);\n }\n }\n }\n return $value;\n}",
"function GET($key)\n {\n if (isset($_GET[$key]))\n $value = $_GET[$key];\n elseif (isset($GLOBALS['HTTP_GET_VARS'][$key]))\n $value = $GLOBALS['HTTP_GET_VARS'][$key];\n elseif (isset($_POST[$key]))\n $value = $_POST[$key];\n elseif (isset($GLOBALS['HTTP_POST_VARS'][$key]))\n $value = $GLOBALS['HTTP_POST_VARS'][$key];\n else\n return \"\";\n if (get_magic_quotes_gpc())\n return stripslashes($value);\n return $value;\n }",
"function dokan_posted_input( $key ) {\n $value = isset( $_POST[$key] ) ? trim( $_POST[$key] ) : '';\n\n return esc_attr( $value );\n}",
"static public function post( $var, $default = NULL )\r\n\t\t{\r\n\t\t\treturn isset( $_POST[ $var ] ) \r\n\t\t\t\t? ( is_array( $_POST[ $var ] ) ? Generic::stripslashes_from_array( $_POST[ $var ] ) : stripslashes( trim( $_POST[ $var ] ) ) ) \r\n\t\t\t\t: $default;\r\n\t\t}",
"function RequestVar($name, $default_value = true) {\r\n if (!isset($_REQUEST))\r\n return false;\r\n if (isset($_REQUEST[$name])) {\r\n if (!get_magic_quotes_gpc())\r\n return InjectSlashes($_REQUEST[$name]);\r\n return $_REQUEST[$name];\r\n }\r\n return $default_value;\r\n}",
"function cleanMultiLine($name) {\n\t\tif (isset($this->getvars[$name])){\n\t\t\t$val = $this->getvars[$name];\n\t\t} else {\n\t\t\t$val = @$this->postvars[$name];\n\t\t}\n\t\tif ($val == '') {\n\t\t\treturn '';\n\t\t}\n\t\t$allow = array();\n\t\t$allow[] = ord(\"\\t\");\n\t\t$allow[] = ord(\"\\n\");\n\t\t$allow[] = ord(\"\\r\");\n\n\t\tif (is_array($val)) {\n\t\t\tarray_walk_recursive($val, array('Cgn', 'removeCtrlChar'), $allow);\n\t\t} else {\n\t\t \tCgn::removeCtrlChar($val, NULL, $allow);\n\t\t\t$val = (string)$val;\n\t\t}\n\t\treturn $val;\n\n\t}",
"private static function getValue($name)\n\t{\n\t\treturn $_POST[$name] ?? null;\n\t}",
"function repopulatePost($name) {\n if (filter_has_var(INPUT_POST, $name)) {\n return htmlspecialchars_decode(sanitize(filter_input(INPUT_POST, $name, FILTER_SANITIZE_STRING)));\n }\n else {\n return '';\n }\n}",
"function CleanPostForMysql($target) {\r\n if (get_magic_quotes_gpc()) {\r\n return $target;\r\n } else {\r\n return mysql_real_escape_string($target);\r\n } // if\r\n}",
"function get_post($var)\n{\n return mysql_real_escape_string($_POST[$var]);\n}",
"function getPostVal ($stringName, $autoDefault) {\r\n\t\treturn ((isset($_POST[$stringName])) ? $_POST[$stringName] : $autoDefault);\r\n\t}",
"function getUserFromForm()\n {\n $string= \"default\";\n\n if (isset($_POST['Parametro']))\n $string=$_POST['Parametro'];\n\n return $string;\n }",
"function getExcludedValueByName($name)\n{\n if (isset($_POST[$name]) && $_POST[$name] == \"Exclude\") {\n return $name . \"; \";\n }\n}",
"public function sanitize(){\r\n\t\t$post = array();\r\n\t\tforeach($_POST as $key => $val){\r\n\t\t\tif(!get_magic_quotes_gpc()){\r\n\t\t\t\t$post[$key] = mysql_real_escape_string($val);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $post;\r\n\t}",
"public function getPost()\n {\n if (!isset($this->_post)) {\n if (self::$_input && \\bbn\\Str::isJson(self::$_input)) {\n $this->_post = json_decode(self::$_input, 1);\n }\n elseif (!empty($_POST)) {\n $this->_post = $_POST;\n }\n\n if (!$this->_post) {\n $this->_post = [];\n }\n else {\n $this->_has_post = true;\n //$this->_post = bbn\\Str::correctTypes($this->_post);\n foreach ($this->_post as $k => $v) {\n if (X::indexOf($k, '_bbn_') === 0) {\n if (!defined(strtoupper(substr($k, 1)))) {\n define(strtoupper(substr($k, 1)), $v);\n }\n\n unset($this->_post[$k]);\n }\n }\n }\n }\n\n return $this->_post;\n }",
"private function getPostData() {\n\t\t$data = null;\n\t\t\n\t\t// Get from the POST global first\n\t\tif (empty($_POST)) {\n\t\t\t// For API calls we need to look at php://input\n\t\t\tif (!empty(file_get_contents('php://input'))) {\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\n\t\t\t\tif ($data === false || $data === null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO: What is this for? isn't 'php://input' always empty at this point?\n\t\t\t\t$dataStr = file_get_contents('php://input');\n\t\t\t\tparse_str($dataStr, $data);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = $_POST;\n\t\t}\n\t\t\n\t\t// Normalize boolean values\n\t\tforeach ($data as $name => &$value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\t$value = true;\n\t\t\t}\n\t\t\telse if ($value === 'false') {\n\t\t\t\t$value = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}",
"function GetPost ($var, $default='') {\n\treturn GetRequest($_POST, $var, $default);\n\t/*\n\tif (isset($_POST[$var]))\n\t\t$val = $_POST[$var];\n\telse\n\t\t$val = $default;\n\treturn $val;\n\t*/\n}",
"public static function post($variable='*'){\n \n self::load();\n \n if($variable!='*'){\n return self::$request->request->get($variable); \n }\n else{\n return self::$request->request->all();\n }\n }",
"function getValue($fieldName) {\r\n $value = '';\r\n if (isset($_REQUEST[$fieldName])) { \r\n $value = $_REQUEST[$fieldName];\r\n }\r\n return $value;\r\n }",
"public function getPost($pParam = '')\n\t{\n if (empty($pParam)) {\n \treturn $_POST;\n } else if (isset($_POST[$pParam])) {\n \treturn $_POST[$pParam];\n }\n\n return '';\n\t}",
"function getVal( $name, $default = '' ) {\r\n\t\t\r\n\t\tif( isset( $_REQUEST[$name] ) ) return $this->unquote( $_REQUEST[$name] );\r\n\t\telse return $this->unquote( $default );\r\n\t}",
"abstract public function get_posted_value();",
"public function postVar($key)\n {\n if (isset($_POST[$key])) {\n return $_POST[$key];\n }\n\n return null;\n }",
"function post_string($string_name) {\n\t$string = $_POST[$string_name];\n\tsettype($string, \"string\");\n\treturn $string;\n}",
"function post($varname, $default = false)\n {\n $postval = $this->sec->clean($this->unsafePost($varname));\n if ($postval === false) {\n return $default;\n }\n\n return $postval;\n }",
"static public function getSafeParameter($unsafe) \n {\n // remove HTML tags\n $unsafe = strip_tags($unsafe);\n\n // remove all but alphanumerics, spaces and underscores\n $lowAN = preg_replace(\"/[^a-z0-9_ ]/\", \"\", strtolower($unsafe));\n\n // replace spaces/underscores with underscores\n $clean = preg_replace( \"/[ _]+/\", \"_\", $lowAN );\n\n // remove any leading or trailing underscores\n $safe = trim($clean, '_');\n\n return $safe;\n }",
"private static function getInputVars() {\n\t\tif (static::$vars === null) {\n\t\t\t// take those vars only once\n\t\t\tparse_str(static::getRawData(), $vars);\n\t\t\tstatic::$vars = (array) $vars;\n\t\t}\n\t\t\n\t\treturn static::$vars;\n\t}",
"function get_form_var($variable, $type = 'string')\n{\n if ($type == 'array')\n {\n $value = array();\n }\n else\n {\n $value = NULL;\n }\n\n if (!empty($_POST) && isset($_POST[$variable]))\n {\n if ($type == 'array')\n {\n $value = (array)$_POST[$variable];\n }\n else\n {\n $value = $_POST[$variable];\n }\n }\n else if (!empty($HTTP_POST_VARS) && isset($HTTP_POST_VARS[$variable]))\n {\n if ($type == 'array')\n {\n $value = (array)$HTTP_POST_VARS[$variable];\n }\n else\n {\n $value = $HTTP_POST_VARS[$variable];\n }\n }\n if (!empty($_GET) && isset($_GET[$variable]))\n {\n if ($type == 'array')\n {\n $value = (array)$_GET[$variable];\n }\n else\n {\n $value = $_GET[$variable];\n }\n }\n else if (!empty($HTTP_GET_VARS) && isset($HTTP_GET_VARS[$variable]))\n {\n if ($type == 'array')\n {\n $value = (array)$HTTP_GET_VARS[$variable];\n }\n else\n {\n $value = $HTTP_GET_VARS[$variable];\n }\n }\n if ($value != NULL)\n {\n if ($type == 'int')\n {\n $value = intval(unslashes($value));\n }\n else if ($type == 'string')\n {\n $value = unslashes($value);\n }\n else if ($type == 'array')\n {\n foreach ($value as $arrkey => $arrvalue)\n {\n $value[$arrkey] = unslashes($arrvalue);\n }\n }\n }\n return $value;\n}",
"function get_post($con, $var)\n{\n return $con->real_escape_string($_POST[$var]);\n}",
"function GetFromPOST($var) {\n //Note: some HTML elements are empty (such as radio button) if nothing is selected,\n //This will result in an error when looking it up in the POST array\n //Use empty to see if the value exists\n if(!empty($_POST[$var])) { \n $tmp = $_POST[$var]; \n } else {\n $tmp = \"\";\n }\n return $tmp;\n}",
"private function postData()\n {\n $post = array_filter($this->post);\n\n return http_build_query($post);\n }",
"public static function get($item) {\n if(isset($_POST[$item]) ) {\n return trim($_POST[$item] );\n } else {\n if(isset($_GET[$item])) {\n return trim($_GET[$iten] );\n }\n }\n return '';\n }",
"function remove_wp_magic_quotes() {\r\n\t\t$_GET = stripslashes_deep($_GET);\r\n\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t$_COOKIE = stripslashes_deep($_COOKIE);\r\n\t\t$_REQUEST = stripslashes_deep($_REQUEST);\r\n\t}",
"function clean_input($data, $default = NULL) {\n // Sanitise data\n $data = trim($data);\n $data = stripslashes($data);\n // return isse, not empty and POST\n return isset($_POST[$data]) ? $_POST[$data] : $default;\n }",
"static function getInput($name, $value = false, $allow_get = true) {\n if (isset($_POST[$name])) {\n $output = $_POST[$name];\n if (!is_array($output)) {\n $output = htmlspecialchars($output);\n }\n return $output;\n }\n if ($allow_get) {\n if (isset($_GET[$name])) {\n $output = $_GET[$name];\n if (!is_array($output)) {\n $output = Dbase::con()->real_escape_string($output);\n $output = htmlspecialchars($output);\n }\n return $output;\n }\n }\n return $value;\n }",
"private function getVars() {\n if (strlen(trim($vars = file_get_contents('php://input'))) === 0) {\n $vars = false;\n }\n return $vars;\n }",
"public function __get($name)\n\t{\n\t\tif ($name == 'clean_value') {\n\t\t\tif (isset($this->clean_value)) {\n\t\t\t\treturn $this->clean_value;\n\t\t\t} else {\n\t\t\t\t$this->clean_value = ee()->security->xss_clean($this->value);\n\t\t\t\treturn $this->clean_value;\n\t\t\t}\n\t\t}\n\t}",
"function postToVar() {\n foreach ($this->fields() as $f) {\n if ($this->$f === false) $this->$f = $this->input->post($f);\n }\n }",
"function _post($v) { // clean Post - returns a useable $_POST variable or NULL if and only if it is not set\r\n return isset($_POST[$v]) ? bwm_clean($_POST[$v]) : NULL;\r\n}",
"function danger_var($variable)\n{\n\tif (get_magic_quotes_gpc())\n\t{\n\t\treturn $variable;\n\t}\n\n // array\n\tif (is_array($variable))\n\t{\n\t\tforeach($variable as $var)\n\t\t{\n\t\t\t$var = addslashes($var);\n\t\t}\n\t}\n\n\t// variable\n\telse\n\t{\n\t\t$variable = addslashes($variable);\n\t}\n\n\treturn $variable;\n}",
"public function getPostVariables();",
"public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n \t\t$_GET = self::stripSlashesDeep($_GET);\r\n \t}\r\n \r\n\t\t\tif(isset($_POST)){\r\n \t\t$_POST = self::stripSlashesDeep($_POST);\r\n \t}\r\n \r\n\t\t\tif(isset($_COOKIE)){\r\n \t\t$_COOKIE = self::stripSlashesDeep($_COOKIE);\r\n \t}\r\n \r\n }\r\n }",
"function post($input=''){\n $input = htmlspecialchars($_POST[$input]);\n $input = addslashes($input);\n return $input;\n }",
"public function getPost($field) {\n return isset($_POST[$field]) ? $_POST[$field] : null;\n }",
"public function unsafePost($varname, $default = false)\n\t{\n\t\tif(isset($this->postvars[$varname])) {\n\t\t\treturn $this->postvars[$varname];\n\t\t} else {\n\t\t\treturn $default;\n\t\t}\n\t}",
"function makeHiddenPostvars($excludes=array())\n{\n\tglobal $ATK_VARS;\n\t$str = \"\";\n\n\tif(count($ATK_VARS ))\n\t{\n\t\tforeach ($ATK_VARS as $key => $val)\n\t\t{\n\t\t\tif (!in_array($key, $excludes))\n\t\t\t$str .= \"<input type='hidden' name=\\\"$key\\\" value=\\\"\".atk_htmlentities(strval($val)).\"\\\">\\n\";\n\t\t}\n\t\treturn $str;\n\t}\n\treturn \"\";\n}",
"function GetPost($name, $default=\"\") {\n return ValidRequiredPost($name) ? $_POST[$name] : $default;\n}",
"static public function getClean()\n {\n return explode('?', self::getFull())[0];\n }",
"function clean_variable($variable) {\n\t$variable = base64_decode($variable);\n\t$packing_length = 5;\n\n\t$variable = substr($variable, $packing_length);\n\t$variable = substr($variable, 0, -1 * $packing_length);\n\n\treturn mysql_escape_mimic(trim($variable));\n}",
"function getparam($name) {\n if (isset($_POST[$name])) {\n return $_POST[$name];\n } else {\n return \"\";\n }\n}",
"private function getFieldsAsString() {\n\t\t$return = '';\n\t\n\t\tforeach ($this->config['postFields'] as $name => $data) {\n\t\t\t$return .= $name . '='.$data.'&'; \n\t\t}\n\t\n\t\treturn rtrim($return, '&');\n\t}",
"public function chek_Null($post_value){\n if ($post_value == '' || $post_value == null || (!isset($post_value))) {\n $val = '';\n return $val;\n } else {\n return strip_tags($post_value);\n }\n }",
"function _check_magic_quotes($value){\n\t\treturn $this->_magic_quotes?stripslashes($value):$value;\n\t}",
"function getSafePost($model, $column, &$value) {\n $value = (isset($_POST['data'][$model][$column]))\n ? htmlentities($_POST['data'][$model][$column])\n : $value;\n\n return (isset($_POST['data'][$model][$column]));\n }",
"function testInput($value){\n \n $MOOSE = $value;\n \n $MOOSE = trim($MOOSE);\n $MOOSE = stripslashes($MOOSE);\n $MOOSE = htmlspecialchars($MOOSE);\n return $MOOSE;\n \n }",
"public function getEscapedValue()\n {\n return $this->buildParameterBag()->toString();\n }",
"function _getVar($name) {\n if( is_array($this->_vars) && isset($this->_vars[\"$name\"]) )\n return $this->_vars[\"$name\"];\n else\n return \"\";\n }",
"public function input($key)\n {\n return $this->parameters['post']->get($key);\n }",
"public function values(): ?array\n {\n $parameters = [];\n foreach ($this->data['fields'] as $index => $input) {\n $parameters[$index] = FILTER_SANITIZE_SPECIAL_CHARS;\n }\n return filter_input_array(INPUT_POST, $parameters);\n }",
"function recoge($var, $m = \"\")\n {\n if (!isset($_REQUEST[$var])) {\n $tmp = (is_array($m)) ? [] : \"\";\n } elseif (!is_array($_REQUEST[$var])) {\n $tmp = trim(htmlspecialchars($_REQUEST[$var], ENT_QUOTES, \"UTF-8\"));\n } else {\n $tmp = $_REQUEST[$var];\n array_walk_recursive($tmp, function (&$valor) {\n $valor = trim(htmlspecialchars($valor, ENT_QUOTES, \"UTF-8\"));\n });\n }\n return $tmp;\n }",
"function getPostVal($key) {\n $CI = & get_instance();\n $val = $CI->input->post($key);\n if ($val != \"\")\n return $val;\n else\n return false;\n}",
"public function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }",
"public function getSubmittedValue() {\n return isset($_REQUEST[$this->name]) ? $_REQUEST[$this->name] : FALSE;\n }",
"function save_post_get_value( $post ) {\n\t\t$value = $_POST[ $this->_field_name ];\n\n\t\tif( is_array( $value ) ) {\n\t\t\t$value = $value[0];\n\t\t}\n\n\t\treturn explode( ',', $value );\n\t}",
"public function getPostValue($name){\n\t\t$id_arr = $this->relay[$name];\n\t\t$id = $id_arr[0];\n\t\treturn $this->elements[$id]->getValue($name);\t\n\t}",
"public function postRaw($strKey)\r\r\n\t{\r\r\n\t\t$strCacheKey = 'postRaw';\r\r\n\r\r\n\t\tif (!array_key_exists($strCacheKey, $this->arrCache) || !array_key_exists($strKey, $this->arrCache[$strCacheKey]))\r\r\n\t\t{\r\r\n\t\t\t$varValue = get_magic_quotes_gpc() ? stripslashes($this->findPost($strKey)) : $this->findPost($strKey);\r\r\n\t\t\t$varValue = $this->xssClean($varValue);\r\r\n\r\r\n\t\t\t$this->arrCache[$strCacheKey][$strKey] = $varValue;\r\r\n\t\t}\r\r\n\r\r\n\t\treturn $this->arrCache[$strCacheKey][$strKey];\r\r\n\t}"
] | [
"0.6822519",
"0.6508382",
"0.6503145",
"0.6432839",
"0.6393315",
"0.6392963",
"0.6255894",
"0.62492055",
"0.62284",
"0.6200336",
"0.6191534",
"0.6181747",
"0.61693156",
"0.61075056",
"0.6090354",
"0.6035227",
"0.60263294",
"0.6005204",
"0.59575707",
"0.5948293",
"0.5927071",
"0.59109104",
"0.5908603",
"0.5882386",
"0.5880704",
"0.585285",
"0.584379",
"0.58409643",
"0.58322304",
"0.58013606",
"0.5788909",
"0.5777244",
"0.57751054",
"0.57693017",
"0.5717658",
"0.5714779",
"0.5698676",
"0.5688617",
"0.56773156",
"0.56743497",
"0.5671554",
"0.56623375",
"0.5661312",
"0.56542265",
"0.5653957",
"0.56470305",
"0.564669",
"0.5621822",
"0.56216216",
"0.5610178",
"0.56078035",
"0.5607229",
"0.5599827",
"0.55727667",
"0.5572413",
"0.55712295",
"0.5565918",
"0.5562205",
"0.5556622",
"0.55549985",
"0.55280983",
"0.55272895",
"0.5523433",
"0.55214584",
"0.5510706",
"0.55057627",
"0.5505244",
"0.5485947",
"0.54852885",
"0.5479452",
"0.5476553",
"0.5475492",
"0.5474085",
"0.5462983",
"0.54569125",
"0.5454809",
"0.54537326",
"0.5422763",
"0.5414975",
"0.54098165",
"0.540803",
"0.5407147",
"0.54001385",
"0.5398429",
"0.5397193",
"0.5392321",
"0.5392033",
"0.53740764",
"0.53636986",
"0.535957",
"0.53592277",
"0.5358887",
"0.5358135",
"0.5348682",
"0.5340022",
"0.5336706",
"0.5328125",
"0.5319421",
"0.53145266",
"0.5311199"
] | 0.5533849 | 60 |
Not recommended but available, Request variable is either a GET, POST or COOKIE value | function RequestVar($name, $default_value = true) {
if (!isset($_REQUEST))
return false;
if (isset($_REQUEST[$name])) {
if (!get_magic_quotes_gpc())
return InjectSlashes($_REQUEST[$name]);
return $_REQUEST[$name];
}
return $default_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRequestVar()\n {\n return $this->_requestVar;\n }",
"private function request($request=null){\r\n\r\n if(is_null($request)){\r\n\r\n $this->request = request_uri();\r\n\r\n }else{\r\n\r\n $this->request = $request;\r\n\r\n }\r\n\r\n\r\n }",
"function request($key){\n if (array_key_exists($key, $_REQUEST)){\n return $_REQUEST[$key];\n }\n return null;\n}",
"function request_is_get() {\n\treturn $_SERVER['REQUEST_METHOD'] === 'GET';\n}",
"static function RequestGet($var) {\n\t\t$res = \"\";\n\t\tif(isset($_REQUEST[$var])){\n\t\t\t$res = $_REQUEST[$var];\n\t\t}\n\t\t\t\n\t\treturn $res;\n\t}",
"function is_get_request()\n{\n return $_SERVER['REQUEST_METHOD'] === 'GET';\n}",
"function request_isget(){\n return $_SERVER['REQUEST_METHOD'] == 'GET';\n}",
"protected function getRequest() {}",
"function isGetRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\r\n}",
"public static function getRequestVar($key){\n $return = false;\n \n if(isset(self::$_request_vars[$key])){\n $return = self::$_request_vars[$key];\n }\n \n return $return;\n }",
"function req($key) {\r\n\treturn val(Request::$data, $key);\r\n}",
"function requestIsGet()\n{\n return $_SERVER['REQUEST_METHOD'] == 'GET';\n}",
"static function get($key) {\n if(!isset($_REQUEST[$key])) return null;\n else return $_REQUEST[$key];\n }",
"private function detectRequest()\n {\n // Get URL\n $url = isset($_GET) && array_key_exists('url', $_GET) ? $_GET['url'] : '';\n $url = trim($url, '/');\n\n // Apply routes\n $url = $this->applyRoutes($url, $this->routes);\n\n // Split URL\n $params = explode('/', $url);\n if(empty($params[0])) {\n $params = array();\n }\n\n\n // Save parameters\n $this->params = $params;\n }",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"function get($key)\n{\n\treturn System::request()->get($key);\n}",
"private function checkrequest()\n {\n // This method checks if there is user input, and returns the request_method if evaluated to be true\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $this->request = \"post\";\n return true;\n } elseif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n $this->request = \"get\";\n return true;\n } else {\n $this->request = false;\n }\n }",
"function atkGetPostVar($key=\"\")\n{\n\tif(empty($key) || $key==\"\")\n\t{\n\t\treturn $_REQUEST;\n\t}\n\telse\n\t{\n\t\tif (array_key_exists($key,$_REQUEST) && $_REQUEST[$key]!=\"\") return $_REQUEST[$key];\n\t\treturn \"\";\n\t}\n}",
"function is_post_request() {\n return (request_method() == 'post');\n}",
"function request($var, $default=NULL) {\n\tif(isset($_REQUEST[$var])) \n\t\treturn $_REQUEST[$var];\n\telse\n\t\treturn $default;\n}",
"function safePostGetVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n elseif (isset($_GET[$varName]))\n return $_GET[$varName];\n else\n return $default;\n}",
"public static function post($variable='*'){\n \n self::load();\n \n if($variable!='*'){\n return self::$request->request->get($variable); \n }\n else{\n return self::$request->request->all();\n }\n }",
"function GET($key)\n {\n if (isset($_GET[$key]))\n $value = $_GET[$key];\n elseif (isset($GLOBALS['HTTP_GET_VARS'][$key]))\n $value = $GLOBALS['HTTP_GET_VARS'][$key];\n elseif (isset($_POST[$key]))\n $value = $_POST[$key];\n elseif (isset($GLOBALS['HTTP_POST_VARS'][$key]))\n $value = $GLOBALS['HTTP_POST_VARS'][$key];\n else\n return \"\";\n if (get_magic_quotes_gpc())\n return stripslashes($value);\n return $value;\n }",
"function get_request_p($key, $default=false, $stripslahes=false)\n{\n return Request::GetValueP($key, $default, $stripslahes);\n}",
"private function getRequestUserName() {\n\t\t//RETURN REQUEST VARIABLE: USERNAME\n if(!empty($_POST[self::$userName])){\n\t\t\treturn $_POST[self::$userName];\n\t\t}\n else{\n return \"\";\n }\n\t}",
"function is_request(): bool\n{\n return isset($_REQUEST);\n}",
"private static function getMethodRequest(){\n return $_SERVER[\"REQUEST_METHOD\"];\n }",
"public function getRequest() {}",
"public function getRequest() {}",
"function getVars() {\r\n return !empty($_POST) ? $_POST : (!empty($_GET) ? $_GET : NULL);\r\n }",
"function getRequest();",
"function get_query_string($key) {\n $val = null;\n if (!empty($_GET[$key])) {\n $val = $_GET[$key];\n }\n return $val;\n}",
"function getVar($var='value'){\r\n\r\n\t$ci =& get_instance();\r\n\r\n\tif( isset($_POST[$var]) ) return $ci->input->post($var);\r\n\r\n\telseif \t( isset($_GET[$var]) ) return $ci->input->get($var);\r\n\r\n\telse return 0;\r\n}",
"protected function _request() {\n\t\treturn $this->_container->request;\n\t}",
"public function getVar() {\r\n return $this->_filter->getRequestVar();\r\n }",
"public static function request($var = '')\n {\n return self::getFilter($_REQUEST, $var);\n }",
"function ajan_is_get_request() {\n\treturn (bool) ( 'GET' === strtoupper( $_SERVER['REQUEST_METHOD'] ) );\n}",
"public static function getRequest(){\n return \\Illuminate\\Auth\\Guard::getRequest();\n }",
"function set_query_var($query_var, $value)\n {\n }",
"static function storeLocation() {\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n $_SESSION['forwardingUrl'] = \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n }\n }",
"public function testManipulateGlobalVariables()\n {\n $this->request->setQuery('global_get_variable', 42);\n $this->request->setPost('global_post_variable', 42);\n }",
"function _getRequestMethod(){\n return $_SERVER['REQUEST_METHOD'];\n }",
"function get_var($varname, $method=\"\", $default_value=\"\")\n{\n\tglobal $_POST;\n\tglobal $_GET;\n\n\tif( isset($_GET[$varname]) && ((strcasecmp($method, \"get\") == 0 || $method == null)) )\n\t{\n\t\treturn $_GET[$varname];\n\t}\n\telse if(isset($_POST[$varname]))\n\t{\n\t\treturn $_POST[$varname];\n\t}\n\telse return $default_value;\n}",
"function validateRequest(){\n // if ($_GET['key'] != getenv(\"LAB_NODE_KEY\")){\n // exit;\n // }\n if ($_GET['key'] != ''){\n exit;\n }\n }",
"function request_method() {\n return strtolower($_SERVER['REQUEST_METHOD']);\n}",
"function Cgn_SystemRequest() {\n\t\t/*\n\t\t$this->vars = Cgn_ObjectStore::getObject('request://request');\n\t\t$this->getvars = Cgn_ObjectStore::getObject('request://get');\n\t\t$this->postvars = Cgn_ObjectStore::getObject('request://post');\n\t\t$this->cookies = Cgn_ObjectStore::getObject('request://cookie');\n\t\t */\n\n\t\tif (defined ('CGN_PRODUCTION_ENVIRONMENT')) \n\t\t$this->prodEnv = CGN_PRODUCTION_ENVIRONMENT;\n\t}",
"function getRequestUserName() {\n\n\t\treturn $this->loginModel->getUsernameInSession();\n=======\n\t//CREATE GET-FUNCTIONS TO FETCH REQUEST VARIABLES\n\tprivate function getRequestUserName()\n\t{\n\t\t/*if(isset($_POST[self::$name]))\n\t\t{\n\t\t\treturn ($_POST[self::$name]);\n\t\t}\n\t\treturn \"\";*/\n\n\t\treturn $this->cookieStorage->load(self::$cookieName);\n>>>>>>> origin/master\n\t}\n\t\n}",
"private function check_request_variables()\n {\n $page_var = $this->prefix . 'page';\n $results_var = $this->prefix . 'results';\n if ( array_key_exists($page_var, $_REQUEST)\n && !empty($_REQUEST[$page_var]))\n {\n $this->current_page = $_REQUEST[$page_var];\n }\n if ( array_key_exists($results_var, $_REQUEST)\n && !empty($_REQUEST[$results_var]))\n {\n $this->results_per_page = $_REQUEST[$results_var];\n }\n $this->offset = ($this->current_page-1) * $this->results_per_page;\n if ($this->offset < 0)\n {\n $this->offset = 0;\n }\n return;\n }",
"function safeGetVar($varName, $default=null)\n{\n if (isset($_GET[$varName]))\n return $_GET[$varName];\n else\n return $default;\n}",
"private static function set($key)\n {\n return (isset($_GET[$key]) && !empty($_GET[$key])) ? $_GET[$key]: null; \n }",
"function getPage()\r\n{\r\n if (isPosted())\r\n {\r\n return getPostVar(\"page\",\"home\"); \r\n } \r\n else \r\n {\r\n return getUrlVar(\"page\",\"home\");\r\n } \r\n}",
"private function inputs(){\n\t\tswitch($_SERVER['REQUEST_METHOD']){ // Make switch case so we can add additional \n\t\t\tcase \"GET\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"GET\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"POST\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"POST\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"PUT\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"PUT\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"DELETE\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"DELETE\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->response('Forbidden',403);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public static function getVarRequest()\n {\n if (!isset(self::$_data[self::KEY_VAR_EXC_REQUEST]))\n {\n $_list = array();\n try\n {\n $_list = self::getConfig(\"app\", \"log\", \"exclusion\", \"request\");\n if (!is_array($_list))\n {\n $_list = strlen($_list) > 0 ? array($_list) : array();\n }\n }\n catch (Exception $ex)\n {\n $_list = FALSE;\n }\n self::$_data[self::KEY_VAR_EXC_REQUEST] = $_list;\n }\n if (self::$_data[self::KEY_VAR_EXC_REQUEST] === FALSE)\n {\n return $_REQUEST;\n }\n else\n {\n $_result = $_REQUEST;\n foreach ($_result as $_key => $_value)\n {\n foreach (self::$_data[self::KEY_VAR_EXC_REQUEST] as $_field)\n {\n if (stripos($_key, $_field) !== FALSE)\n {\n $_result[$_key] = str_repeat(\"*\", strlen($_value));\n }\n }\n }\n return $_result;\n }\n }",
"function isPostRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST' );\r\n}",
"function isPostRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST' );\r\n}",
"function isPostRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST' );\r\n}",
"protected function _request() {}",
"function get_query_var($query_var, $default_value = '')\n {\n }",
"function is_post_request()\n{\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n}",
"function LT_request($variable, $default) {\n\tglobal $LT_SQL;\n\tif (array_key_exists($variable, $_REQUEST))\n\t\treturn $LT_SQL->real_escape_string($_REQUEST[$variable]);\n\telse\n\t\treturn $LT_SQL->real_escape_string($default);\n}",
"function get_get_var($var)\r\n{\r\n if (isset($_GET[$var])) {\r\n return sanitizeAny($_GET[$var]);\r\n } else {\r\n return null;\r\n }\r\n}",
"function param($p, $def=\"\") {\n\t//global $_SERVER, $_SESSION, $_COOKIE, $_REQUEST, $_POST, $_GET;\n\tif (!empty($_SESSION)&&isset($_SESSION[$p])) return $_SESSION[$p];\n\telse if (isset($_COOKIE[$p])) return $_COOKIE[$p];\n\telse if (isset($_REQUEST[$p])) return $_REQUEST[$p];\n\telse if (isset($_POST[$p])) return $_POST[$p];\n\telse if (isset($_GET[$p])) return $_GET[$p];\n\telse return $def;\n}",
"private static function get_request(){\n\t\t if(!self::$request) {\n\t\t\t\t\t\t\n \t\t\t\t// Get the query string value into which the .htaccess file rewrote the request path.\n \t\t\t\t$query = $_GET['q'];\n \t\t\t\t\n \t\t\t\t// Get the path to the current directory: Take the path to the current file, and remove the website's root directory from it.\n \t\t\t\t$current_dir = str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname(__FILE__));\n \t\t\t\t\n \t\t\t\t// Remove the path to the current directory from the request path, storing the result as our final request.\n \t\t self::$request = str_replace($current_dir, '', $query);\n }\n\t\t\treturn self::$request;\t\n\t\t}",
"function get_curr_city() {\n if( isset($_GET['curr_city']) ) {\n $currentCity = $_GET['curr_city'];\n } else {\n if( isset($_COOKIE['curr_city']) ) {\n $currentCity = $_COOKIE['curr_city'];\n } else {\n $currentCity = 'nsk';\n }\n }\n return $currentCity;\n}",
"function fabric_request_filter($query_vars) {\n if (isset($_GET['s']) && empty($_GET['s'])) {\n $query_vars['s'] = ' ';\n }\n\n return $query_vars;\n}",
"function requestIsPost()\n{\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n}",
"private function postget ( $key ) {\n if ( isset( $_POST[ $key ] ) ) {\n return filter_input( INPUT_POST, $key );\n } elseif ( isset( $_GET[ $key ] ) ) {\n return filter_input( INPUT_GET, $key );\n } else {\n return NULL;\n }\n }",
"function getVariable($variableName) {\r\n if (isset($_GET[$variableName])) {\r\n $return = $_GET[$variableName];\r\n } elseif (isset($_POST[$variableName])) {\r\n $return = $_POST[$variableName];\r\n } else {\r\n return NULL;\r\n }\r\n\r\n return $return;\r\n}",
"function getVariable($variableName) {\r\n if (isset($_GET[$variableName])) {\r\n $return = $_GET[$variableName];\r\n } elseif (isset($_POST[$variableName])) {\r\n $return = $_POST[$variableName];\r\n } else {\r\n return NULL;\r\n }\r\n\r\n return $return;\r\n}",
"protected function getRequestValue($name) {\n $requestValues = $this->getLocalSessionValue(self::REQUEST_VAR);\n return isset($requestValues[$name]) ? $requestValues[$name] : null;\n }",
"function GetCookie($var, $default='')\n{\n\treturn GetRequest($_COOKIE, $var, $default);\n}",
"public function getRequest()\n {\n return \\Cloud::app()->getFrontController()->getRequest();\n }",
"function csrf(){\n\treturn 'csrf=' . $_SESSION['csrf'];\n}",
"function GetVar($name, $default_value = false) {\r\n if (!isset($_GET)) {\r\n return false;\r\n }\r\n if (isset($_GET[$name])) {\r\n if (!get_magic_quotes_gpc()) {\r\n return InjectSlashes($_GET[$name]);\r\n }\r\n return $_GET[$name];\r\n }\r\n return $default_value;\r\n}",
"public static function set_request($request){\n\t\t\tself::$request = $request;\n\t\t}",
"function getVAR ($var)\n{\n if (isset($_POST[$var]) && strlen($_POST[$var]) > 0)\n {\n return $_POST[$var];\n }\n\n return (isset($_GET[$var]) && strlen($_GET[$var]) >0) ? $_GET[$var] : '';\n}",
"function getDataFromRequest( &$data ) {\n\n\t\t$requestVar = KRequest::getInt($this->propertyName, NULL);\n\n\t\tif (empty($requestVar)) {\n\t\t\t$data->{$this->propertyName} = NULL;\n\t\t}\n\t\telse {\n\t\t\t$data->{$this->propertyName} = $requestVar;\n\t\t}\n\n\t}",
"function is_post_request() {\n return $_SERVER['REQUEST_METHOD'] === 'POST';\n}",
"public function getCookieParams()\n {\n }",
"public function __construct()\n\t{\n\t\t$this->uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';\n\t\t$this->method = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'get';\n\n\t\t$this->get = $_GET;\n\t\t$this->post = $_POST;\n\t\t$this->cookie = $_COOKIE;\n\t}",
"function initCustomRequestVars() {\n\t\tglobal $pun_user;\n\n\t\t// Auto-login phpBB users:\n\t\tif(!$this->getRequestVar('logout') && !$pun_user['is_guest']) {\n\t\t\t$this->setRequestVar('login', true);\n\t\t}\n\t}",
"function get_param($param_name)\n{\n $param_value = \"\";\n if(isset($_POST[$param_name]))\n $param_value = $_POST[$param_name];\n else if(isset($_GET[$param_name]))\n $param_value = $_GET[$param_name];\n\n return $param_value;\n}",
"protected function getHeader(){\n $request = $_SERVER['REQUEST_METHOD'];\n if ($request === 'GET'){\n $this->read();\n }\n if ($request === 'POST'){\n $this->create();\n }\n }",
"function getPostVal($key) {\n $CI = & get_instance();\n $val = $CI->input->post($key);\n if ($val != \"\")\n return $val;\n else\n return false;\n}",
"function safePostVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n else\n return $default;\n}",
"public function getRequestParams();",
"private static function _initialise () {\r\n\t\tif (!self::$_request) {\r\n\t\t\tself::$_request = array_merge ($_GET, $_POST);\r\n\t\t}\n\t\t\r\n\t}",
"public function getRequest()\n {\n return static::app()->request;\n }",
"function GetPost ($var, $default='') {\n\treturn GetRequest($_POST, $var, $default);\n\t/*\n\tif (isset($_POST[$var]))\n\t\t$val = $_POST[$var];\n\telse\n\t\t$val = $default;\n\treturn $val;\n\t*/\n}",
"function get_request_g($key, $default=false, $stripslahes=false)\n{\n return Request::GetValueG($key, $default, $stripslahes);\n}",
"function url_request(): string\n{\n return url_site() . input_server('REQUEST_URI');\n}",
"public static function isGet($var=''){\n\t\tif(empty($var)){\n\t\t\tif(!empty($_GET)){return TRUE;}\n\t\t}\n\t\telse {\n\t\t\t//check if post variable exist and return value otherwise return empty\n\t\t\tif(!empty($_GET[$var])){\n\t\t\t\treturn trim($_GET[$var]);\n\t\t\t}\n\t\t\telseif(isset($_GET[$var])){return '';}\n\t\t}\n\t\treturn FALSE;\n\t}",
"private static function getGetParams()\n\t{\n\t\treturn $_GET;\n\t}"
] | [
"0.6274215",
"0.61448586",
"0.61092925",
"0.6102159",
"0.60894924",
"0.6061228",
"0.60447586",
"0.6038846",
"0.6014745",
"0.5941613",
"0.588716",
"0.5880615",
"0.5860722",
"0.5854422",
"0.5845554",
"0.5845554",
"0.5845554",
"0.5845554",
"0.5845554",
"0.5845554",
"0.5845554",
"0.5845554",
"0.5834121",
"0.58339626",
"0.5819058",
"0.5801481",
"0.5799569",
"0.575484",
"0.5750213",
"0.57252765",
"0.57163227",
"0.5709234",
"0.5676434",
"0.56731033",
"0.5672198",
"0.5672198",
"0.56694454",
"0.56655306",
"0.5658116",
"0.56364226",
"0.56240475",
"0.5607742",
"0.5577019",
"0.5575288",
"0.55665165",
"0.5557566",
"0.5531532",
"0.55240166",
"0.5520734",
"0.5520203",
"0.551582",
"0.55038095",
"0.5501094",
"0.5500491",
"0.55004686",
"0.548607",
"0.5477657",
"0.5477603",
"0.54553986",
"0.54511166",
"0.5446402",
"0.5446402",
"0.5446402",
"0.54415673",
"0.5440733",
"0.54401",
"0.5436392",
"0.5431733",
"0.5430656",
"0.5427098",
"0.5423444",
"0.5423185",
"0.5419053",
"0.5414362",
"0.541358",
"0.541358",
"0.5411583",
"0.54007",
"0.5398949",
"0.5394525",
"0.5392404",
"0.5390412",
"0.5389585",
"0.5388572",
"0.5378861",
"0.53719527",
"0.53716886",
"0.53629583",
"0.53617966",
"0.5361214",
"0.53604597",
"0.5358921",
"0.535719",
"0.53483367",
"0.53440654",
"0.5340251",
"0.533949",
"0.5336929",
"0.5331629",
"0.5329864"
] | 0.63062096 | 0 |
cookie variable with no magic quotes in the values. | function CookieVar($name, $default_value = true) {
if (!isset($_COOKIE))
return $default_value;
if (isset($_COOKIE[$name])) {
if (!get_magic_quotes_gpc())
return InjectSlashes($_COOKIE[$name]);
return $_COOKIE[$name];
}
return $default_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __toString(): string\r\n {\r\n if ($this->raw) $cookie = $this->name;\r\n\r\n else $cookie = str_replace(self::RESERVED_CHARS, self::RESERVED_CHARS_REPLACEMENT, $this->name); //Replacing reserved chars\r\n\r\n $cookie .= \"=\";\r\n\r\n if ($this->value === null) {\r\n $cookie .= 'deleted; expires=' . gmdate('D, d-M-Y H:i:s T', time() - 31536001) . '; Max-Age=0';\r\n } else {\r\n\r\n $cookie .= $this->raw ? $this->value : rawurlencode($this->value);\r\n\r\n $this->expire === 0 ?: $cookie .= '; expires=' . gmdate('D, d-M-Y H:i:s T', $this->expire) . \"; Max-Age={$this->getMaxAge()}\";\r\n }\r\n\r\n $this->setOptionalDetails($cookie);\r\n\r\n return $cookie;\r\n }",
"public function test_public_storeCookies_QuotedEscapedQuote()\n {\n\t$headers = array('Set-Cookie: SID=\"hello\\\"world\"; path=/; domain=.example.com');\n $this->object->storeCookies($this->serviceUrl_1, $headers);\n\n $cookies = $this->object->getCookies($this->serviceUrl_1b);\n\n $this->assertInternalType('array', $cookies);\n $this->assertEquals('hello\"world', $cookies['SID']);\n $this->assertEquals(1, count($cookies));\n }",
"function cms_admirecookie($name, $default = null)\n{\n if (!isset($_COOKIE[$name])) {\n return $default;\n }\n $the_cookie = $_COOKIE[$name];\n if (get_magic_quotes_gpc()) {\n $the_cookie = stripslashes($the_cookie);\n }\n return $the_cookie;\n}",
"static public function cookie( $var, $default = NULL )\r\n\t\t{\r\n\t\t\treturn isset( $_COOKIE[ $var ] ) ? stripslashes( trim( $_COOKIE[ $var ] ) ) : $default;\r\n\t\t}",
"public function toCookieString()\n {\n return $this->format(\\DateTime::COOKIE);\n }",
"public function __toString() {\n $cookie = $this->name . '=' . $this->value . ';';\n\n if($this->domain) {\n $cookie .= ' Domain=' . $this->domain . ';';\n }\n\n if($this->path) {\n $cookie .= ' Path=' . $this->path . ';';\n }\n\n if($this->expire !== null) {\n $cookie .= ' Expires=' . $this->expire->format(DateTime::RFC1123) . ';';\n }\n\n if($this->secure) {\n $cookie .= ' Secure;';\n }\n\n if($this->httpOnly) {\n $cookie .= ' HttpOnly;';\n }\n\n return $cookie;\n }",
"public function format_for_set_cookie()\n {\n }",
"function createCookie($key,$value)\n{\n\tsetcookie(str_rot13(\"$key\"),str_rot13(\"$value\"),0,\"/\");\n}",
"public function printCookieStr() {\n\t\t$temp = array();\n\t\tif ($this->_cookieStr != '')\n\t\t\t$temp = explode('; ', $this->_cookieStr);\n\t\tprint_r($temp);\n\t}",
"private function serialize_cookie( $value ) {\n\t\t\t$value = $this->clean_cookie_data( $value );\n\t\t\treturn base64_encode( json_encode( $value ) );\n\t\t}",
"public function cookie($par = null, $xss_clean = false)\n {\n return $this->_from_array($_COOKIE, $par, $xss_clean);\n }",
"function setacookiet($value, $expire)\r\n{\r\n\tglobal $cookie_name, $cookie_path, $cookie_domain;\r\n\t$cookie_namet=$cookie_name.\"_terms\";\r\n\tif (version_compare(PHP_VERSION, '5.2.0', '>='))\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path, $cookie_domain, $cookie_secure, true);\r\n\telse\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);\r\n}",
"function cookie($key, $value = '')\n{\n if ('' === $value) {\n $res = fnGet($_COOKIE, $key);\n return is_null($res) ? null : unserialize($res);\n }\n if (null === $value) {\n return setcookie($key, $value, time() - 3600, '/');\n }\n return setcookie($key, serialize($value), null, '/');\n}",
"function getCookie($key)\n{\n $key = str_rot13(\"$key\");\n if(isset($_COOKIE[\"$key\"])) return str_rot13($_COOKIE[\"$key\"]);\n return \"\";\n}",
"function set_cookie($name, $value = 'Aceito', $time = null)\n{\n $time = $time != null ? $time : time() + apply_filters('cookie_expiration', 60 * 60 * 24 * 30);\n $value = base64_encode(json_encode(stripslashes_deep($value)));\n $expiration = apply_filters('cookie_expiration_time', $time);\n\n $_COOKIE[$name] = $value;\n setcookie($name, $value, $expiration, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, false);\n}",
"function ms_cookie_constants()\n {\n }",
"public function testTamperedCookiesAreReturnedAsNull()\n\t{\n\t\t$_COOKIE['foo'] = Cookie::sign('foo', 'bar');\n\t\t$this->assertEquals('bar', Cookie::get('foo'));\n\n\t\t$_COOKIE['foo'] .= '-baz';\n\t\t$this->assertNull(Cookie::get('foo'));\n\n\t\t$_COOKIE['foo'] = Cookie::sign('foo', 'bar');\n\t\t$_COOKIE['foo'] = 'aslk'.$_COOKIE['foo'];\n\t\t$this->assertNull(Cookie::get('foo'));\n\t}",
"protected function encode_cookie( $value ) {\n\t\t$json = json_encode( $value );\n\t\treturn $json;\n\t}",
"function myGetcookie($name){\r\n\t\tif(isset($_COOKIE[$name])){\r\n\t\t\treturn urldecode($_COOKIE[$name]);\r\n\t\t}else{\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public function getCookieVariables();",
"#[Pure]\nfunction http_parse_cookie($cookie, $flags = null, ?array $allowed_extras = null) {}",
"function setARCcookieReal($name, $value, $secure)\n{\n\tsetCookie('ARC_' . $name, $value, TIME + 604800, ARC_WWW_PATH);\n}",
"public function getCookie(): ParameterBag { return $this->cookie; }",
"function cjpopups_set_cookie($name, $value='', $expire = 86400, $path='/', $domain='', $secure=false, $httponly=false){\n $_COOKIE[$name] = $value;\n $expire = time() + $expire;\n return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);\n}",
"function SaveValue($key, $value, $toCookie = true)\r\n\t{\r\n\t\tif ($toCookie)\r\n\t\t{\r\n\t\t\t$value = trim ( $value );\r\n\t\t\tsetcookie ( $key, $value, NULL, \"/\" );\r\n\t\t}\r\n\t}",
"function wp_cookie_constants()\n {\n }",
"protected function make($key, $value)\n {\n \tif (preg_match(\"/[=,; \\t\\r\\n\\013\\014]/\", $key)) {\n throw new \\Exception(sprintf('The cookie name \"%s\" contains invalid characters', $key));\n }\n if (empty($key)) {\n throw new \\Exception('The cookie name cannot be empty');\n }\n $expire = time() + intval(\\App::config('cookie.default_ttl'));\n $cookie = urlencode($key) . '=';\n $cookie .= rawurlencode(\\Encryption::encrypt($value));\n $cookie .= '; expires=' . gmdate('D, d-M-Y H:i:s T', $expire) . '; max-age=' . $this->getMaxAge($expire);\n $cookie .= '; path=' . \\App::config('cookie.path');\n $cookie .= '; domain=' . \\App::config('app.host');\n if (\\App::config('cookie.secure')) {\n $cookie .= '; secure';\n }\n if (\\App::config('cookie.http_only')) {\n $cookie .= '; httponly';\n }\n $cookie .= '; samesite=' . \\App::config('cookie.same_site');\n return $cookie;\n }",
"public static function cookieToken(): string\n {\n return mt_rand(1000, 9999).\".\".self::setToken(10);\n }",
"function cookie($name, $value, $time){\n setCookie($name, $value, $time, \"/\", \"www.cubebomb.com\");\n}",
"public function cookieValue() {\n\t\treturn $this->cookie;\n\t}",
"function set_cookie($name, $value = '', $expires = 0, $path = '', $domain = '', $secure = false, $http_only = false) {\n header('Set-Cookie: ' . rawurlencode($name) . '=' . rawurlencode($value)\n . (empty($expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s \\\\G\\\\M\\\\T', $expires))\n . (empty($path) ? '' : '; path=' . $path)\n . (empty($domain) ? '' : '; domain=' . $domain)\n . (!$secure ? '' : '; secure')\n . (!$http_only ? '' : '; HttpOnly'), false);\n}",
"function getARCcookie($name)\n{\n\t$ret = '';\n\n\tif(isset($_COOKIE['ARC_' . $name]))\n\t\t$ret = encode($_COOKIE['ARC_' . $name]);\n\n\treturn $ret;\n}",
"public function cookieValue() {\n return $this->cookie;\n }",
"public function cookie($name);",
"function getCookieData() {\n\t\t$oEncrypt = utilityEncrypt::factory(file_get_contents(system::getConfig()->getPathData().'/dash.session.key'));\n\t\treturn utilityEncrypt::toUriString(\n\t\t\t$oEncrypt->encrypt(\n\t\t\t\tserialize(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $this->getUser()->getID(),\n\t\t\t\t\t\t'email' => $this->getUser()->getEmail(),\n\t\t\t\t\t\t'expiry' => strtotime('+72 hours'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}",
"function get_cookie() {\n\tglobal $_COOKIE;\n\t// $_COOKIE['main_user_id_1'] = '22760600|2c3a1c1487520d9aaf15917189d5864';\n\t$hid = explode ( \"|\", $_COOKIE ['main_tcsso_1'] );\n\t$handleName = $_COOKIE ['handleName'];\n\t// print_r($hid);\n\t$hname = explode ( \"|\", $_COOKIE ['direct_sso_user_id_1'] );\n\t$meta = new stdclass ();\n\t$meta->handle_id = $hid [0];\n\t$meta->handle_name = $handleName;\n\treturn $meta;\n}",
"function doCookies() {\r\n setcookie(\"cli_num\", 123456789, time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_fname\", $_POST['first_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_lname\", $_POST['last_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_dob\", $_POST['dob'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_email\", $_POST['email'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_phone\", $_POST['phone'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_add\", $_POST['address'], time() + (86400 * 1), \"/\");\r\n \r\n /* //print the cookies\r\n echo \"Value is: \" . $_COOKIE[\"cli_num\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_fname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_lname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_dob\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_email\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_phone\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_add\"];*/\r\n \r\n}",
"function sanitize_comment_cookies()\n {\n }",
"function SaveCookieWord($word, $name)\n{\n setcookie($name, $word, time()+3600*24, \"/\");\n}",
"private function decode_cookie($cookie)\n {\n return unserialize(base64_decode($cookie));\n }",
"public function getCookieParams() {}",
"function settheCookie($name,$val) {\n\n $cookie = $_COOKIE[$name];\n\n if (!$cookie) { \n setcookie ($name, $val); //create cookie\n }\n else {\n setcookie ($name, \"\" , time() - 3600); //delete cookie\n }\n //echo $mycookie;\n}",
"function cookie($nom, $valeur) \n{\n return setcookie($nom, $valeur, time() + (86400*30), '/', getDomain());\n}",
"function save_cookie_from_browser($domain = \"\")\n\t{\n\t\t// .meonyou.com TRUE / FALSE 0 PHPSESSID 8p47p0c8g65kjtfnl7gjs4u5k2\n\t\t// www.meonyou.com FALSE / FALSE 1267546450 track a%3A4%3A%7Bs%3A12%3A%22affiliate_id%22%3Bs%3A1%3A%221%22%3Bs%3A10%3A\n\n\t}",
"protected function getCookie(string $key): string\n {\n return isset($this->cookies[$key]) ? $this->cookies[$key] : \"\";\n }",
"public static function getCookieName() {}",
"function saveCookie($id){\r\n\tsetcookie(\"r$id\", strval(time()), time()+60*60*24*365);\t\r\n}",
"public static function getCookieName() {}",
"public function normalize_cookie($cookie, $key = '')\n {\n }",
"#[Pure]\nfunction http_build_cookie(array $cookie) {}",
"static public function getCookie($name= null)\n {\n if ($name) $name = static::$COOKIE_PREFIX . $name;\n return empty($name) ? $_COOKIE : (isset($_COOKIE[$name]) ? $_COOKIE[$name] : '');\n }",
"function get_cookie($name)\n{\n if (isset($_COOKIE[$name])) {\n return json_decode(base64_decode(stripslashes($_COOKIE[$name])), true);\n }\n\n return array();\n}",
"function setcookie($name, $value, $time, $path, $domain, $secure)\n{\n\t$_SERVER['cookie.stub'][$name] = compact('name', 'value', 'time', 'path', 'domain', 'secure');\n}",
"function createCookie($cookie_name,$cookie_value,$exp_time)\n\t\t{\n\t\t\t//creating the cookie\n\t\t\t$path = '/';\n\t\t\tsetcookie($cookie_name,$cookie_value,$exp_time,$path);\n\t\t}",
"public static function cookie($var = null)\n {\n if(is_null($var))\n {\n return (!empty($_COOKIE)) ? $_COOKIE : null;\n }\n\n return (isset($_COOKIE[$var])) ? $_COOKIE[$var] : null;\n }",
"public function cookie($strKey, $blnDecodeEntities=false)\r\r\n\t{\r\r\n\t\t$strCacheKey = $blnDecodeEntities ? 'cookieDecoded' : 'cookieEncoded';\r\r\n\r\r\n\t\tif (!array_key_exists($strCacheKey, $this->arrCache) || !array_key_exists($strKey, $this->arrCache[$strCacheKey]))\r\r\n\t\t{\r\r\n\t\t\t$varValue = $this->stripTags($_COOKIE[$strKey]);\r\r\n\t\t\t$varValue = $this->xssClean($varValue, STRICT_MODE);\r\r\n\t\t\t$varValue = $this->decodeEntities($varValue);\r\r\n\r\r\n\t\t\tif (!$blnDecodeEntities)\r\r\n\t\t\t{\r\r\n\t\t\t\t$varValue = $this->encodeSpecialChars($varValue);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->arrCache[$strCacheKey][$strKey] = $varValue;\r\r\n\t\t}\r\r\n\r\r\n\t\treturn $this->arrCache[$strCacheKey][$strKey];\r\r\n\t}",
"public function getCookie()\n {\n if (!isset($this->_cookie)) {\n $this->_cookie = new \\Yana\\Http\\Requests\\ValueWrapper();\n }\n return $this->_cookie;\n }",
"public function setCookie($cookie) {\n //TODO: add error control when the cookie array is not valid\n if (isset($cookie[\"expires\"])) {\n $cookie[\"expires\"] = intval($cookie[\"expires\"]) * 1000;\n }\n $cookie['value'] = urlencode($cookie['value']);\n return $this->command('set_cookie', $cookie);\n }",
"public function cookie($name='') {\n\t\t$this->cookie[$name] = (isset($_COOKIE[$name])) ?\n\t\t\t$_COOKIE[$name] : NULL;\n\t\t\t\n\t\treturn $this->cookie;\n\t}",
"function check_cookie($value){\n \n}",
"function getcookie(string $name = null) {\n return !empty($name) ?\n !empty($_COOKIE[$name])\n ? $_COOKIE[$name] : null \n : $_COOKIE;\n }",
"function getcookie(string $name = null) {\n return !empty($name) ?\n !empty($_COOKIE[$name])\n ? $_COOKIE[$name] : null \n : $_COOKIE;\n }",
"function buildCookies($cookies) {\n\t\t$header = array();\n\t\tforeach ($cookies as $name => $cookie) {\n\t\t\t$header[] = $name.'='.$this->_escapeToken($cookie['value'], array(';'));\n\t\t}\n\t\t$header = $this->_buildHeader(array('Cookie' => $header), 'pragmatic');\n\t\treturn $header;\n\t}",
"function cookie ($name) {\n\t\treturn @$this->cookie[$name];\n\t}",
"private function _write_raw( $name, $value )\n {\n setrawcookie( us($name), us($value), $this->expire, $this->path, $this->domain, $this->secure, $this->httponly );\n }",
"function make_cookie($name, $value) {\nsetcookie($name, $value, time() + 60 * 24 *24 * 30, \"/\");\n}",
"abstract public function setCookie($name , $value = false, $expire = false, $path = false, $domain = false, $secure = false);",
"function wp_setcookie($username, $password = '', $already_md5 = \\false, $home = '', $siteurl = '', $remember = \\false)\n {\n }",
"protected static function _set_cookie()\n\t{\n\t\t/** @var Cookie::$salt string */\n\t\tCookie::$salt = Config::get('cookie.salt');\n\n\t\t/** @var Cookie::$expiration string */\n\t\tCookie::$expiration = Config::get('cookie.lifetime');\n\t}",
"function set_my_cookie($username, $password){\n global $db;\n require_once(\"db.php\");\n $id = $db->insert_id;\n setcookie(\"id\", $id,0,\"/\");\n $security = md5($username.$password.\"two_plus_two\");\n setcookie(\"security\",$security,0,\"/\");\n $db->close();\n var_dump($_COOKIE);\n}",
"public function getCookieParams()\n {\n }",
"function GetCookie($var, $default='')\n{\n\treturn GetRequest($_COOKIE, $var, $default);\n}",
"function get_unique_cookie_name()\n{\n $site_url = get_bloginfo('url');\n $site_name = get_bloginfo('name');\n $suffix = '-saved-cookie';\n\n $cookie_name = $site_url . $site_name . $suffix;\n\n // Now let's strip everything\n $cookie_name = str_replace(array('[\\', \\']'), '', $cookie_name);\n $cookie_name = preg_replace('/\\[.*\\]/U', '', $cookie_name);\n $cookie_name = preg_replace('/&(amp;)?#?[a-z0-9]+;/i', '-', $cookie_name);\n $cookie_name = htmlentities($cookie_name, ENT_COMPAT, 'utf-8');\n $cookie_name = preg_replace('/&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);/i', '\\\\1', $cookie_name);\n $cookie_name = preg_replace(array('/[^a-z0-9]/i', '/[-]+/'), '-', $cookie_name);\n $cookie_name = strtolower(trim($cookie_name, '-'));\n\n return $cookie_name;\n}",
"function get_user_cookie_name($obj = '')\n{\n\treturn replace_bad_chars(encryptValue(\"user_\".$obj->input->ip_address()));\n}",
"function _rocket_add_aelia_currencyswitcher_dynamic_cookies( $cookies ) {\n\t$cookies[] = 'aelia_cs_recalculate_cart_totals';\n\t$cookies[] = 'aelia_cs_selected_currency';\n\t$cookies[] = 'aelia_customer_country';\n\treturn $cookies;\n}",
"protected function setcookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httpOnly) {}",
"function __clearstr($val)\n {\n if (!get_magic_quotes_gpc()) $val = addslashes($val);\n return $val;\n }",
"function my_setcookie( $name, $value=\"\", $sticky=1, $expires_x_days=0 )\n {\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n if ( $this->no_print_header )\n {\n \treturn;\n }\n \n\t\t//-----------------------------------------\n\t\t// Set vars\n\t\t//-----------------------------------------\n\n if ( $sticky == 1 )\n {\n \t$expires = time() + ( 60*60*24*365 );\n }\n\t\telse if ( $expires_x_days )\n\t\t{\n\t\t\t$expires = time() + ( $expires_x_days * 86400 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expires = FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish up...\n\t\t//-----------------------------------------\n\t\t\n $this->vars['cookie_domain'] = $this->vars['cookie_domain'] == \"\" ? \"\" : $this->vars['cookie_domain'];\n $this->vars['cookie_path'] = $this->vars['cookie_path'] == \"\" ? \"/\" : $this->vars['cookie_path'];\n \t\n\t\t//-----------------------------------------\n\t\t// Set the cookie\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( in_array( $name, $this->sensitive_cookies ) )\n\t\t{\n\t\t\tif ( PHP_VERSION < 5.2 )\n\t\t\t{\n\t\t\t\tif ( $this->vars['cookie_domain'] )\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'] . '; HttpOnly' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'], NULL, TRUE );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain']);\n\t\t}\n }",
"function make_cookie($name, $value) {\n\tsetcookie($name, $value, time() + 60 * 60 * 24 * 30, \"/\");\n}",
"function getCookiesInfo(){\n\techo \"Cookies information: <br>\";\n\n\tif( isset($_COOKIE[\"name\"])){\n\t\techo \"_COOKIE[\\\"name\\\"]: \" . $_COOKIE[\"name\"] . \"<br />\";\n\t}\n\telse{\n\t\techo \"Sorry... _COOKIE[\\\"name\\\"] is not set yet !\" . \"<br />\";\n\t}\n\n\t//echo \"HTTP_COOKIE_VARS[\\\"name\\\"]: \" . $HTTP_COOKIE_VARS[\"name\"]. \"<br />\";\n\t//echo \"_COOKIE[\\\"age\\\"]: \" . $_COOKIE[\"age\"] . \"<br />\";\n\t//echo \"HTTP_COOKIE_VARS[\\\"name\\\"]: \" . $HTTP_COOKIE_VARS[\"name\"] . \"<br />\";\n}",
"public function getCookieVariable($key, $defaultValue = null);",
"function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth', $token = '')\n {\n }",
"function setARCcookie($name, $value)\n{\n\tif(defined('IS_SECURE'))\n\t\tsetARCcookieReal($name, $value, '1');\n\telse\n\t\tsetARCcookieReal($name, $value, '0');\n}",
"static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}",
"function set_cookie($name, $value, $days = 30) {\n $expiretime = time() + (86400 * $days);\n setcookie(APP_ID . $name, $value, $expiretime, \"/\");\n}",
"public function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }",
"public static function _cookie(string $variableName, $defaultValue = null, int $filter = FILTER_DEFAULT) {\n return self::_(INPUT_COOKIE, $variableName, $defaultValue, $filter);\n }",
"function parse_cookie($cookie, $scheme) {\n\t\t\t$cookie_elements = explode('|', $cookie);\n\t\t\tif ( count($cookie_elements) != 3 OR !preg_match('/^[0-9]+$/', $cookie_elements[1]) )\n\t\t\t\treturn FALSE;\n\n\t\t\tlist($username, $expiration, $hmac) = $cookie_elements;\n\t\t\treturn compact('username', 'expiration', 'hmac', 'scheme');\n\t\t}",
"function add_cookie($name,$value,$time_litmit){\n setcookie($name,$value,time() + ($time_litmit * 86400));\n }",
"public function set_cookie()\n {\n }",
"function _tsuiseki_tracking_extract_cookie_data($cookie_data) {\n $parts = array();\n $cookie_data = (string)trim($cookie_data);\n if (!empty($cookie_data)) {\n $parts = preg_split('/'. TSUISEKI_TRACKER_COOKIE_CONCAT_CHAR .'/', $cookie_data);\n $name = (string)trim($parts[0]);\n $expiration_time = (int)$parts[1];\n $data = (string)trim($parts[2]);\n $hmac = (string)trim($parts[3]);\n $parts = array(\n 'name' => $name,\n 'expiration_time' => $expiration_time,\n 'data' => $data,\n 'hmac' => $hmac,\n );\n }\n return $parts;\n}",
"function wpgplus_set_Cookie($my_cookie) {\n\t// cookies which have an expiration date and it is past should not be set\n\tif((!empty($my_cookie->expires)) && ($my_cookie->expires < time())) {\n\t\t//wpgplus_debug(\"\\nNot setting expired cookie for \" . $my_cookie->name . \"\\n\");\n\t\treturn false;\n\t}\n\tif(get_transient('wpgplus_cookie_' . $my_cookie->name)) {\n\t\t//wpgplus_debug(\"\\nUpdating cookie for \" . $my_cookie->name . \"\\n\");\n\t} else {\n\t\t//wpgplus_debug(\"\\nSetting cookie for \" . $my_cookie->name . \"\\n\");\n\t}\n\tset_transient('wpgplus_cookie_'. $my_cookie->name,$my_cookie,60*60);\n}",
"private static function GetCookie($header = \"\")\n\t{\n\t\tpreg_match('/^Set-Cookie:\\s*([^;]*)/mi', $header, $m);\n\t\tparse_str($m[1], $cookies);\n\t\tforeach ($cookies as $key => $val)\n\t\tif ( strtoupper($key) == self::cookieName )\n\t\t\treturn self::$cookie = strtoupper($key).\"=\".$val;\n\t}",
"function bake($name, $value){\n\tsetcookie($name, $value, 0, '/', 'getnomon.com', isset($_SERVER[\"HTTPS\"]), true);\n}",
"function mySetcookie($c){\r\n\t\tif($c['sticky'] != 1 AND $c['expires'] <= 0){\r\n\t\t\t$c['expires'] = TIMENOW + $this->vars['sessionLifetime']; //follow session option\r\n\t\t}else{\r\n\t\t\tif($c['sticky'] == 1){\r\n\t\t\t\t$c['expires'] = TIMENOW + 31536000; //365 days\r\n\t\t\t}elseif($c['expires'] > 0){\r\n\t\t\t\t$c['expires'] = TIMENOW + $c['expires'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($c['path'] == ''){\r\n\t\t\t$c['path'] = '/';\r\n\t\t}\r\n\t\tif($c['domain'] == ''){\r\n\t\t\t$c['domain'] == $_SERVER['HTTP_HOST'];\r\n\t\t}\r\n\t\t@setcookie($c['name'], $c['value'], $c['expires'], $c['path'], $c['domain']);\r\n\t}",
"function my_getcookie($name)\n {\n \tif ( isset($_COOKIE[$this->vars['cookie_id'].$name]) )\n \t{\n \t\tif ( ! in_array( $name, array('topicsread', 'forum_read') ) )\n \t\t{\n \t\t\treturn $this->parse_clean_value(urldecode($_COOKIE[$this->vars['cookie_id'].$name]));\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn urldecode($_COOKIE[$this->vars['cookie_id'].$name]);\n \t\t}\n \t}\n \telse\n \t{\n \t\treturn FALSE;\n \t}\n }",
"public function getCookieParams(): array;",
"public function testGetCookie()\n {\n $this->assertEquals('cookie value', $this->_req->getCookie('my_test_cookie'));\n }",
"protected function createCookie(string $value): Cookie\n {\n try {\n $expire = new \\DateTime($this->getCookieExpireDatetimeModifier());\n } catch (\\Exception $e) {\n $expire = new \\DateTime(self::COOKIE_EXPIRE_DATETIME_MODIFIER_DEFAULT);\n }\n\n return Cookie::create(\n $this->getCookieKey(),\n $value,\n $expire,\n $this->getCookiePath(),\n $this->getCookieDomain(),\n $this->isCookieSecure(),\n $this->isCookieHttpOnly(),\n $this->isCookieRaw(),\n $this->getCookieSameSite()\n );\n }",
"public function get () {\n\t\treturn ($this->value === \"\" && isset($_COOKIES[$this->name])) ? $_COOKIES[$this->name] : $this->value;\n\t}"
] | [
"0.7131526",
"0.6715928",
"0.66761434",
"0.6589781",
"0.65255135",
"0.6507503",
"0.6441999",
"0.62629044",
"0.6210463",
"0.61782056",
"0.6169294",
"0.60959786",
"0.60453457",
"0.6032168",
"0.59380794",
"0.590579",
"0.58871585",
"0.58754385",
"0.58665156",
"0.5861957",
"0.584624",
"0.5838568",
"0.5832411",
"0.58199507",
"0.5816326",
"0.5813297",
"0.5799598",
"0.5792797",
"0.5789524",
"0.5761233",
"0.57603055",
"0.57568437",
"0.575183",
"0.57457286",
"0.5740822",
"0.57406175",
"0.5738846",
"0.57382953",
"0.57331103",
"0.57113016",
"0.5708176",
"0.56989694",
"0.56885225",
"0.5676391",
"0.5676085",
"0.56749904",
"0.5672649",
"0.5672385",
"0.56723267",
"0.56716096",
"0.5668927",
"0.5667522",
"0.5663377",
"0.5655271",
"0.56516194",
"0.56512487",
"0.5649396",
"0.5642575",
"0.56385857",
"0.56259006",
"0.5622542",
"0.5622542",
"0.5619715",
"0.5613984",
"0.56121546",
"0.5611251",
"0.5602294",
"0.5601552",
"0.5591382",
"0.55820787",
"0.5561721",
"0.5547661",
"0.55452245",
"0.5539976",
"0.5518002",
"0.55163556",
"0.5513101",
"0.5505204",
"0.5504524",
"0.5501294",
"0.54860705",
"0.5483352",
"0.54827213",
"0.5474974",
"0.54686505",
"0.54495406",
"0.54490364",
"0.54379016",
"0.542692",
"0.5424072",
"0.5407181",
"0.54032",
"0.53980017",
"0.539175",
"0.53909963",
"0.53787595",
"0.53731704",
"0.5364217",
"0.5362869",
"0.5361417"
] | 0.7040464 | 1 |
SessionVar variable with no magic quotes in the values. | function SessionVar($name, $default_value = false) {
if (!isset($_SESSION)) {
return $default_value;
} else if (isset($_SESSION[$name])) {
return $_SESSION[$name];
}
return $default_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_sessionstring()\n {\n \treturn \"$this->_session_name=$this->_session_id\";\n }",
"static public function session( $var, $default = NULL )\r\n\t\t{\r\n\t\t\treturn isset( $_SESSION[ $var ] ) ? stripslashes( trim( $_SESSION[ $var ] ) ) : $default;\r\n\t\t}",
"function getValue()\r\n {\r\n $sessionVar = $this->_options['sessionVar'];\r\n\r\n return (!empty($_SESSION[$sessionVar]))\r\n ? $_SESSION[$sessionVar]->getPhrase()\r\n : null;\r\n }",
"private function quoteVar($in)\n\t{\n\t\treturn sprintf('\"%s\"', $in);\n\t}",
"private function T_VARIABLE($value) {\n\t\treturn str_replace('$', '', $value);\n\t}",
"public function limpiarVariable($var){\n //se limpia la variable de cualquier slash, backslash o etiqueta.\n $var = strip_tags($var);\n $var = stripslashes($var);\n $var = stripcslashes($var);\n // $var = \"'\".$var.\"'\";\n //se devuelve la variable\n return $var;\n }",
"function getSessionVariable($key){\n\t\tif (!empty($_SESSION[\"{$key}\"])) {\n\t\t\tprint($_SESSION[$key]);\n\t\t}\n\t}",
"function setLocalSessionVariable($localVarName,$varName, $value) {\n $_SESSION[$localVarName.\"_\".$varName] = $value;\n }",
"public function mk_session_value($params=null) {\r\n\t\t$value = implode(':', $params);\r\n\t\t$value .= ':'.time();\r\n\t\t$value .= ':'.md5(\"{$value}:{$this->secret}\");\r\n\t\t$value = str_rot13($value);\r\n\t\treturn $value;\r\n\t}",
"public function set($varname, $value)\n {\n $value = base64_encode(serialize($value));\n \n // Does the variable exist?\n $sql = 'SELECT COUNT(name) FROM session_vars '.\n 'WHERE container=\"'.$this->container_id.'\" AND name=\"'.$varname.'\"';\n $num_vars = $this->db->querySingle($sql);\n \n if($num_vars > 0) {\n $sql = 'UPDATE session_vars '.\n 'SET value=\"'.$this->db->escapeString($value).'\" '.\n 'WHERE container=\"'.$this->container_id.'\" AND name=\"'.$varname.'\"';\n } else {\n $sql = 'INSERT INTO session_vars(container, name, value) '.\n 'VALUES(\"'.$this->container_id.'\", \"'.$this->db->escapeString($varname).'\", \"'.\n $this->db->escapeString($value).'\")';\n }\n \n $this->db->exec($sql);\n\n return $value;\n }",
"private function getVarSess($name, $defaultvalue=null) {\n\t\tif (array_key_exists($name, $_SESSION))\n\t\t\treturn $_SESSION[$name];\n\t\treturn $defaultvalue;\n\t}",
"function setSessionVariable($localVarName,$varName, $value) {\n $_SESSION[$this->local_current_module.\"_\".$localVarName.\"_\".$varName] = $value;\n}",
"function yy_r160(){$this->_retvalue = '\".'.'$_smarty_tpl->getVariable(\\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\\')->value'.'.\"'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,\"'\"))->nocache; $this->compiler->has_variable_string = true; }",
"public function getUseSessionVar()\n {\n return $this->_useSessionVar;\n }",
"function variaveisViaSession() {\n\nforeach ($_SESSION as $campo => $valor) {\n $$campo = $valor;\n}\n\t\n}",
"function getLocalSessionVariable($localVarName,$varName) {\n if(isset($_SESSION[$localVarName.\"_\".$varName])) {\n return $_SESSION[$localVarName.\"_\".$varName];\n }\n else{\n return \"\";\n }\n }",
"private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }",
"function sS($var) {\n\t\t$var = strip_tags($var);\n\t\t$var = htmlentities($var);\n\t\t$var = stripslashes($var);\n\t\tglobal $connection;\n\t\treturn $connection->real_escape_string($var); //?\n\t}",
"private function serializeVariable($key, $value)\n {\n return sprintf('Variable: %s=%s', $key, $value);\n }",
"public static function get()\n\t{\n\t\treturn Session::instance()->get(Message_Core::SESSION_VAR, FALSE);\n\t}",
"function ts3client_setClientSelfVariableAsString($serverConnectionHandlerID, $flag, $value) {}",
"function get_var($value) {\n\t\tglobal $agi;\n\n\t\t$r = $agi->get_variable( $value );\n\t\tif ($r['result'] == 1) {\n\t\t\t$result = $r['data'];\n\t\t\treturn trim($result);\n\t\t}\n\t\treturn '';\n\t}",
"protected function getStateVar() {\n\t\treturn new WPOptionVariable($this->getStandardVarName() . '-userid:' . get_current_user_id(), array());\n\t}",
"public static function getVar($varname) {\n return $_SESSION[sha1(Engine::getAppName())][$varname];\n }",
"function zen_hide_session_id() {\n global $session_started;\n\n if ( ($session_started == true) && defined('SID') && zen_not_null(SID) ) {\n return zen_draw_hidden_field(zen_session_name(), zen_session_id());\n }\n }",
"function setSessValue($k, $v){\n $k = _APPNAME .'#'.$k;\n $_SESSION[$k] = $v;\n }",
"function SetSessionDropDownValue($sv, $parm) {\n\t\t$_SESSION['sv_deals_details_' . $parm] = $sv;\n\t}",
"function returnSessionVariable($key){\n\t\tif (!empty($_SESSION[\"{$key}\"])) {\n\t\t\treturn $_SESSION[$key];\n\t\t}\n\t}",
"function prepareVariableString($value) {\n\t\t if (!is_array($value)) {\n\t\t return '\"'.addslashes($value).'\"';\n\t\t } else {\n\t\t $str = 'array('.chr(10);\n\t\t foreach ($value as $key => $item) {\n\t\t $str .= '\"'. addslashes($key).'\" => '.'\"'.addslashes($item).'\",'.chr(10);\n\t\t } \n\t\t $str .= \")\";\n\t\t } \n\t\t return $str;\n\t\t}",
"function put_id() {\n \n if($this->name == \"\") {\n $this->name = $this->classname;\n }\n \n // if we stop using the session id- we should remove the session id from\n // the current QUERYSTRING/ or the HTTP_GET_VARS ????\n die(\"This has not been coded yet.\");\n }",
"function getLocalSessionValue($key)\n{\n if (isset($_SESSION[$key])) {\n return $_SESSION[$key];\n } else {\n return \"\";\n }\n}",
"private function serializePhpSession($data) {\r\n\r\n $serialized = '';\r\n\r\n foreach ($this->getVars() as $key => $value) {\r\n $serialized .= $key . \"|\" . serialize($value);\r\n }\r\n\r\n return (string) $serialized;\r\n }",
"function __clearstr($val)\n {\n if (!get_magic_quotes_gpc()) $val = addslashes($val);\n return $val;\n }",
"function getSessionVar($key) {\n\tif (isset($_SESSION[$key])) {\n\t\treturn $_SESSION[$key];\n\t} else {\n\t\treturn null;\n\t}\n}",
"function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}",
"function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}",
"function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}",
"protected function setSessionData()\n {\n $responseData = $this->response->getBody();\n if (strlen($responseData) > 0) {\n $contents = str_replace('$SID', $this->session->getName() . '=' . $this->session->getId(), $responseData);\n $contents = str_replace('$SESSION_NAME', $this->session->getName(), $contents);\n $this->response->replaceBody(str_replace('$SESSION_ID', $this->session->getId(), $contents));\n }\n }",
"public function servervalue ($var,$data){\n\t\t\n\t\t$this->vars[$var] = $data;\n\t}",
"function addQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"||\",\"'\",$var);\n\t\t\t$string = str_replace('||||','\"',$string);\n\t\t}\n\n\t\treturn $string;\n\t}",
"private function selectSessionVars() {\r\n\r\n //prelevo le variabili e le metto nell'array VARS\r\n if ($this->encrypt_data==1) {\r\n $this->SQLStatement_GetEncryptedSessionVars->bindParam('sid', $this->sessionId, PDO::PARAM_STR, $this->sid_len);\r\n $this->SQLStatement_GetEncryptedSessionVars->execute();\r\n $val = $this->SQLStatement_GetEncryptedSessionVars->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n } else {\r\n $this->SQLStatement_GetSessionVars->bindParam('sid', $this->sessionId, PDO::PARAM_STR, $this->sid_len);\r\n $this->SQLStatement_GetSessionVars->execute();\r\n $val = $this->SQLStatement_GetSessionVars->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n //var_dump($val);\r\n return $val;\r\n\r\n }",
"public function __toString(): string\r\n {\r\n if ($this->raw) $cookie = $this->name;\r\n\r\n else $cookie = str_replace(self::RESERVED_CHARS, self::RESERVED_CHARS_REPLACEMENT, $this->name); //Replacing reserved chars\r\n\r\n $cookie .= \"=\";\r\n\r\n if ($this->value === null) {\r\n $cookie .= 'deleted; expires=' . gmdate('D, d-M-Y H:i:s T', time() - 31536001) . '; Max-Age=0';\r\n } else {\r\n\r\n $cookie .= $this->raw ? $this->value : rawurlencode($this->value);\r\n\r\n $this->expire === 0 ?: $cookie .= '; expires=' . gmdate('D, d-M-Y H:i:s T', $this->expire) . \"; Max-Age={$this->getMaxAge()}\";\r\n }\r\n\r\n $this->setOptionalDetails($cookie);\r\n\r\n return $cookie;\r\n }",
"function ts3client_setChannelVariableAsString($serverConnectionHandlerID, $channelID, $flag, $value) {}",
"function createSession($varname,$value,$expiration=null){\n\t\tglobal $GLOBAL_TIMEOUT;\n\t\tglobal $TIMEOUT_SYNTAX;\n\t\t$_SESSION[$varname] = $value;\n\t\tif($expiration == null){\n\t\t\tif($GLOBAL_TIMEOUT != null){\n\t\t\t\t$_SESSION[$varname.$TIMEOUT_SYNTAX]=time()+$GLOBAL_TIMEOUT;\n\t\t\t}\n\t\t}else{\n\t\t\t$_SESSION[$varname.$TIMEOUT_SYNTAX]=time()+$expiration;\n\t\t}\n\t}",
"function danger_var($variable)\n{\n\tif (get_magic_quotes_gpc())\n\t{\n\t\treturn $variable;\n\t}\n\n // array\n\tif (is_array($variable))\n\t{\n\t\tforeach($variable as $var)\n\t\t{\n\t\t\t$var = addslashes($var);\n\t\t}\n\t}\n\n\t// variable\n\telse\n\t{\n\t\t$variable = addslashes($variable);\n\t}\n\n\treturn $variable;\n}",
"public function js_var($variable, $value)\n\t{\n\t\t$v = \"var $variable = \".$this->_get_js_value($value).';';\n\t\t\n\t\treturn $v;\n\t}",
"public function getEscapedValue()\n {\n return $this->buildParameterBag()->toString();\n }",
"function ts3client_getClientVariableAsString($serverConnectionHandlerID, $clientID, $flag, &$result) {}",
"function PageVariableValue($variableName, $value = UNDEFINED);",
"public function decode_session_value($session_value=null) {\r\n\t\tif (!is_null($session_value)) {\r\n\t\t\t$session_value = str_rot13($session_value);\r\n\t\t\t$parts = explode(':', $session_value);\r\n\t\t\t$hash = array_pop($parts);\r\n\t\t\tif ($hash == md5(implode(':', $parts).\":{$this->secret}\")) {\r\n\t\t\t\treturn $parts;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private function namespaceSet($var, $value) {\r\n\t\t$_SESSION[self::SESSION_NAMESPACE][$var] = $value;\r\n\t}",
"public static function setVar($varname, $varvalue){\n $_SESSION[sha1(Engine::getAppName())][$varname] = $varvalue;\n }",
"function yy_r169()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->_retvalue = '(string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value';\n } else {\n $this->db_quote_code_buffer .= 'echo (string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value;';\n $this->_retvalue = false;\n }\n }",
"function ts3client_getServerVariableAsString($serverConnectionHandlerID, $flag, &$result) {}",
"public function get(/*string*/ $key) /*mixed*/\n {\n if (isset($_SESSION[self::KEY][$key])) {\n return $_SESSION[self::KEY][$key];\n } else {\n return self::EMPTY_STRING;\n }\n }",
"public static function getVar($Var)\n\t{\n\t\treturn (isset($_SESSION[$Var])?$_SESSION[$Var]:NULL);\n\t}",
"function CookieVar($name, $default_value = true) {\r\n if (!isset($_COOKIE))\r\n return $default_value;\r\n\r\n if (isset($_COOKIE[$name])) {\r\n if (!get_magic_quotes_gpc())\r\n return InjectSlashes($_COOKIE[$name]);\r\n return $_COOKIE[$name];\r\n }\r\n return $default_value;\r\n}",
"function initSessionVariables()\n\t{\n\t\tif( isset($_GET['close_noscript']))\n\t\t{\n\t\t\t$_SESSION['noscript_message_close'] = true;\n\t\t}\n\t\tif( isset($_SESSION['logged']) )\n\t\t{\n\t\t\t$this->logout_link_hide = '';\n\t\t}\n\t\tif( isset($_SESSION['noscript_message_close']) )\n\t\t{\n\t\t\t$this->noscript_close = ' hidden';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->noscript_close_link = '?' . str_replace('&','&',$_SERVER['QUERY_STRING']) . '&close_noscript';\n\t\t}\n\t}",
"public function variable($string);",
"public function get(string $sName, ?bool $bEscape = true)\n {\n $sSessionName = Config::getInstance()->values['session']['prefix'] . $sName;\n\n return (isset($_SESSION[$sSessionName]) ? ($bEscape && is_string($_SESSION[$sSessionName]) ? escape($_SESSION[$sSessionName]) : $_SESSION[$sSessionName]) : '');\n }",
"public static function setPersistentVar ($name, $var) {\n if (!isset($_SESSION['system_persistent_var'])) $_SESSION['system_persistent_var'] = array ();\n $_SESSION['system_persistent_var'][$name] = serialize($var);\n \n }",
"protected function replaceVars($value) {\n\t\t$value = str_replace(\"%remote%\", $_SERVER[\"REMOTE_ADDR\"], $value);\n\t\t$value = str_replace(\"%agent%\", \"\\\"\".$_SERVER[\"HTTP_USER_AGENT\"].\"\\\"\", $value);\n\t\t$value = str_replace(\"%user%\", \"\\\"\".DhbwSSOAgent::getVar('user').\"\\\"\", $value);\n\t\treturn $value;\n\t}",
"function setSessionModuleVar( $module, $var, $val=NULL ) {\n Session::set(esf_Extensions::MODULE.'.'.$module.'.'.$var, $val);\n}",
"static function reporticoSessionName()\n {\n //if ( ReporticoApp::get(\"session_namespace\") )\n if (self::getReporticoSessionParam(\"framework_parent\")) {\n return \"NS_\" . ReporticoApp::get(\"session_namespace\");\n } else {\n return session_id() . \"_\" . ReporticoApp::get(\"session_namespace\");\n }\n\n }",
"public function getServerVar( $variable, $url_decode = false )\n {\n if (!$this->isServerVarSet( $variable)) return '';\n\n $var = wp_unslash($_SERVER[ $variable]);\n return sanitize_text_field( $url_decode ? rawurlencode_deep($var) : $var );\n }",
"function setSessionVariable($variable, $value){\n\t\t$_SESSION[$variable] = $value;\n\t}",
"final function setSession_id($value) {\n\t\treturn $this->setSessionId($value);\n\t}",
"public function getVar() {\r\n return $this->_filter->getRequestVar();\r\n }",
"function GetSessionValue(&$sv, $sn) {\n\t\tif (isset($_SESSION[$sn]))\n\t\t\t$sv = $_SESSION[$sn];\n\t}",
"function GetSessionValue(&$sv, $sn) {\n\t\tif (isset($_SESSION[$sn]))\n\t\t\t$sv = $_SESSION[$sn];\n\t}",
"function fsl_session_set($name,$value,$timeout = NULL){\n $_SESSION[$name] = fsl_encrypt($value);\n\t\t\t\tif(!empty($timeout)) $_SESSION[$name.'_timeout'] = $timeout + time();\n\t\t\n return true;\n}",
"function set_session_value($params){\n if($params['name'] && $params['value']){\n $_SESSION[$params['name']] = $params['value'];\n }\n}",
"public function getSessionFieldValue(/*string*/ $fieldName);",
"public static function s($key='',$value='')\n\t{\n\t\tif(!isset($_SESSION))\n\t\t\treturn false;\n\t\tif($value)\n\t\t{\n\t\t\t$_SESSION[$key] = $value;\n\t\t\treturn true;\n\t\t}\n\t\tif(isset($_SESSION[$key]))\n\t\t\treturn $_SESSION[$key];\n\t\telse return false;\n\t}",
"function serialize() {\n $op = '';\n foreach ($this->attributes as $attrKey => $attrVal) {\n $op .= '$attributes[\\''.$attrKey.'\\'] = <<< SMCACHEEND'.\"\\n\";\n $op .= $attrVal.\"\\nSMCACHEEND;\\n\";\n }\n $op .= '$newVarTag = new SM_varTag($attributes);'.\"\\n\";\n return $op;\n }",
"private static function setUserVars($user, $input) {\n\t\treturn str_replace('$user', $user, $input);\n\t}",
"function get_session_field($session_name, $field) {\n if (isset($_SESSION[APP_ID . $session_name])) {\n return $_SESSION[APP_ID . $session_name][$field];\n }\n return null;\n}",
"public function setUseSessionVar($var)\n {\n $this->_useSessionVar = (bool)$var;\n return $this;\n }",
"function RequestVar($name, $default_value = true) {\r\n if (!isset($_REQUEST))\r\n return false;\r\n if (isset($_REQUEST[$name])) {\r\n if (!get_magic_quotes_gpc())\r\n return InjectSlashes($_REQUEST[$name]);\r\n return $_REQUEST[$name];\r\n }\r\n return $default_value;\r\n}",
"public static function getSessionVars($pattern) {\r\n\r\n/* This function loops through the $_SESSION\r\n array and extracts all variables that \r\n match the pattern passed. After cleaning\r\n the data (should be clean -- just a \r\n precaution) the values are all placed\r\n into an associative array. */\r\n \r\n if (!$_SESSION) {\r\n // echo \"The SESSION Array is empty<BR>\";\r\n return FALSE;\r\n }\r\n \r\n if (!$pattern || $pattern == \"\") { $pattern = \"^[a-zA-Z0-9_%-]+$\"; }\r\n \r\n foreach ($_SESSION as $key => $value) {\r\n \r\n if (ereg(\"$pattern\", \"$key\") && $value != 9999 && $key != \"Submit\") {\r\n \r\n // Trim data\r\n $key = trim($key);\r\n $value = trim($value);\r\n \r\n // Strip slashes if magic quotes in effect\r\n if (get_magic_quotes_gpc()) {\r\n $key = stripslashes($key);\r\n $value = stripslashes($value);\r\n }\r\n\r\n // enter into the post vars to be returned\r\n \r\n $sessionvars[\"$key\"] = $value;\r\n \r\n } // End of if loop\r\n } // End of foreach loop\r\n \r\n if (!$sessionvars) { return FALSE; } // no array was generated\r\n else { return $sessionvars; }\r\n\r\n}",
"public static function strJS($value)\n {\n $result = addslashes($value);\n return $result;\n }",
"public function ValidarVariableGetString($var){\n\t\tif(isset($var) and !is_null($var) && $var != \"\"){\n\t\t\t$this->val = $var;\n\t\t}else{\n\t\t\t$this->val = null;\n\t\t}\n\t\treturn $this->val;\n\t}",
"public function getVariableName(): string\n {\n return $this->var ?? $this->getValue();\n }",
"function SetSessionDropDownValue($sv, $parm) {\n\t\t$_SESSION['sv_dealers_reports_' . $parm] = $sv;\n\t}",
"function clean_variable($variable) {\n\t$variable = base64_decode($variable);\n\t$packing_length = 5;\n\n\t$variable = substr($variable, $packing_length);\n\t$variable = substr($variable, 0, -1 * $packing_length);\n\n\treturn mysql_escape_mimic(trim($variable));\n}",
"protected function getServerVar(string $id): string\n {\n return isset($_SERVER[$id]) ? $_SERVER[$id] : '';\n }",
"private function setSessionVariables($word) {\n\t\t$_SESSION[\"word\"] = $word;\n\t\t$_SESSION[\"failed\"] = 0;\n\t\t$wordLength = strlen($word);\n\t\tfor($i = 0; $i < $wordLength; $i++) {\n\t\t\t$_SESSION[\"char\".$i] = \"hidden\";\n\t\t}\n\n\t\t$alphabet = $GLOBALS['alphabet'];\n\t\tforeach ($alphabet as $letter) {\n\t\t\t$_SESSION[$letter] = \"unused\";\n\t\t}\n\t}",
"function session_text() {\n\tif (auth::isLoggedIn()) {\n\t\treturn 'Log Out';\n\t} else {\n\t\treturn 'Log in';\n\t}\n}",
"function set_session($session_name, $session_value) {\n clear_session($session_name);\n $_SESSION[APP_ID . $session_name] = $session_value;\n return $_SESSION[APP_ID . $session_name];\n}",
"function maqic_unquote_gpc()\n{\n if (ini_get('magic_quotes_gpc'))\n {\n $tmp = array ('_POST', '_GET', '_REQUEST', '_COOKIE');\n foreach($tmp as $n)\n recurse($GLOBALS[$n], '$value=stripslashes($value)');\n }\n}",
"function GetSessionDropDownValue(&$fld) {\n\t\t$parm = substr($fld->FldVar, 2);\n\t\t$this->GetSessionValue($fld->DropDownValue, 'sv_deals_details_' . $parm);\n\t}",
"public function set_var($k, $v)\n\t{\n \t$_SESSION[$k] = $v;\n\t}",
"protected function getSessionVars()\n {\n return $GLOBALS[\"BE_USER\"]->getSessionData($this->extensionName);\n }",
"function verifsaisi($var)\r\n {\r\n\t $var=trim($var);\r\n\t $var=stripslashes($var);\r\n\t $var=htmlspecialchars($var);\r\n\t return $var;\r\n }",
"public function load() {\n if(isset($_SESSION[Strings::$message]))\n {\n $ret = $_SESSION[Strings::$message];\n\n }\n else\n {\n $ret = Strings::$emptyString;\n }\n\n $_SESSION[Strings::$message] = Strings::$emptyString;\n\n return $ret;\n }",
"public function getCookieVariables();",
"function StripGPC($s_value)\n{\n\tif (get_magic_quotes_gpc() != 0)\n\t\t$s_value = stripslashes($s_value);\n\treturn ($s_value);\n}",
"protected static function paramValue($val)\n {\n return \"\\\"{$val}\\\"\";\n }",
"function yy_r109()\n {\n $var = trim($this->yystack[$this->yyidx + - 2]->minor, '\\'');\n $this->_retvalue = \"\\$_scope->_tpl_vars->___config_var_{$var}\" . $this->yystack[$this->yyidx + 0]->minor;\n }",
"private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }"
] | [
"0.6153137",
"0.5695846",
"0.5649044",
"0.557168",
"0.5432836",
"0.5259281",
"0.525598",
"0.52459925",
"0.5238516",
"0.51784426",
"0.5174954",
"0.5173571",
"0.51711595",
"0.51578194",
"0.5133893",
"0.51271266",
"0.5072098",
"0.5066656",
"0.5066348",
"0.50519115",
"0.50499076",
"0.50183755",
"0.5018186",
"0.5009993",
"0.49742603",
"0.4934626",
"0.49339092",
"0.4916536",
"0.49146113",
"0.49142742",
"0.48998743",
"0.4898085",
"0.4893095",
"0.48911938",
"0.4888894",
"0.4888894",
"0.4888894",
"0.48791826",
"0.48650554",
"0.48472035",
"0.4829931",
"0.48235548",
"0.48185253",
"0.4814235",
"0.48105222",
"0.48087165",
"0.48043472",
"0.48037648",
"0.478714",
"0.4782352",
"0.4778106",
"0.475352",
"0.47517282",
"0.47480276",
"0.47469327",
"0.47446886",
"0.47436953",
"0.47348183",
"0.4725256",
"0.4722124",
"0.47190514",
"0.47138843",
"0.47118005",
"0.47079542",
"0.470317",
"0.47011405",
"0.47002965",
"0.46965265",
"0.46955913",
"0.46955913",
"0.46896034",
"0.46863434",
"0.46841386",
"0.46800354",
"0.46741533",
"0.46729457",
"0.46601123",
"0.46598032",
"0.4652394",
"0.46516004",
"0.46511367",
"0.46502805",
"0.46498153",
"0.46482548",
"0.46459568",
"0.46453387",
"0.46443537",
"0.46415102",
"0.46365938",
"0.46363777",
"0.46352786",
"0.46341988",
"0.463312",
"0.462848",
"0.46271998",
"0.46222538",
"0.46221933",
"0.4621695",
"0.46158454",
"0.4611809"
] | 0.5238157 | 9 |
Inject Slashes if magicquotes of | function InjectSlashes($value) {
if (is_array($value)) {
reset($value);
while (list($key, $val) = each($value))
$value[$key] = InjectSlashes($val);
return $value;
}
return addslashes($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}",
"function addslashes_strings_only($value)\n {\n }",
"protected function quote_escaped()\n {\n }",
"public function addSlashes( $t );",
"function _put_safe_slashes ($text = \"\") {\n\t\t$text = str_replace(\"'\", \"'\", trim($text));\n\t\t$text = str_replace(\"\\\\'\", \"\\\\'\", $text);\n\t\t$text = str_replace(\"'\", \"\\\\'\", $text);\n\t\tif (substr($text, -1) == \"\\\\\" && substr($text, -2, 1) != \"\\\\\") {\n\t\t\t$text .= \"\\\\\";\n\t\t}\n\t\treturn $text;\n\t}",
"function smartaddslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == false ) {\n\t\t\t$str = addslashes( $str );\n\t\t}\n\t\treturn $str;\n\t}",
"function privDisableMagicQuotes()\n {\n }",
"function wp_magic_quotes()\n {\n }",
"function esc_like($text)\n{\n return addcslashes($text, '_%\\\\');\n}",
"function nice_addslashes($string)\n{\n // if magic quotes is on the string is already quoted, just return it\n if(MAGIC_QUOTES)\n return $string;\n else\n return addslashes($string);\n}",
"public function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }",
"function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}",
"private function _wp_magic_quotes() {\n // If already slashed, strip.\n if (function_exists('get_magic_quotes_gpc')) {\n $reflection = new \\ReflectionFunction('get_magic_quotes_gpc');\n if ( ! $reflection->isDeprecated()) {\n if ( get_magic_quotes_gpc() ) {\n $_GET = RevSliderFunctions::stripslashes_deep( $_GET );\n $_POST = RevSliderFunctions::stripslashes_deep( $_POST );\n $_COOKIE = RevSliderFunctions::stripslashes_deep( $_COOKIE );\n }\n }\n }\n\n // Escape with wpdb.\n $_GET = $this->_add_magic_quotes( $_GET );\n $_POST = $this->_add_magic_quotes( $_POST );\n $_COOKIE = $this->_add_magic_quotes( $_COOKIE );\n $_SERVER = $this->_add_magic_quotes( $_SERVER );\n\n // Force REQUEST to be GET + POST.\n $_REQUEST = array_merge( $_GET, $_POST );\n }",
"function addPostSlashes($string) {\n\t\tif ((get_magic_quotes_gpc()==1) || (get_magic_quotes_runtime()==1))\n\t\t\treturn $string;\n\t\telse return addslashes($string);\n\t}",
"function magicSlashes($element) {\r\n if (is_array($element))\r\n return array_map(array(\"INIT\", \"magicSlashes\"), $element);\r\n else\r\n return addslashes($element);\r\n }",
"function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}",
"abstract protected function _escape($s);",
"static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }",
"public static function escape($som) {}",
"function checkRealEscapeString($value);",
"function add_magic_quotes($input_array)\n {\n }",
"public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n \t\t$_GET = self::stripSlashesDeep($_GET);\r\n \t}\r\n \r\n\t\t\tif(isset($_POST)){\r\n \t\t$_POST = self::stripSlashesDeep($_POST);\r\n \t}\r\n \r\n\t\t\tif(isset($_COOKIE)){\r\n \t\t$_COOKIE = self::stripSlashesDeep($_COOKIE);\r\n \t}\r\n \r\n }\r\n }",
"function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}",
"function privSwapBackMagicQuotes()\n {\n }",
"function sc_php_escape($value) {\n\tif (is_string($value));\n\t// strip out slashes IF they exist AND magic_quotes is on\n\tif (get_magic_quotes_gpc() && (strstr($value,'\\\"') || strstr($value,\"\\\\'\"))) $value = stripslashes($value);\t\n\t// escape string to make it safe for mysql\n\treturn addslashes($value);\n}",
"public static function escape($s) {}",
"public function Slasher($var) {\n\n //si magic_quot est on on enleve les slash\n if (get_magic_quotes_gpc()) {\n $var=stripslashes($var);\n }\n return $var;\n }",
"public function escape($string);",
"public function escape($string);",
"public abstract function escape($string);",
"public function preventAddSlashes( $fields=array() );",
"public abstract function escapeString($value);",
"public static function escape($value) {}",
"abstract public function escapeString($value);",
"function ss_addslashes($args) {\n\tif( !defined('MAGIC_QUOTES_GPC') ) define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());\n\tif( !MAGIC_QUOTES_GPC ) { \n\t\tif( is_array($args) ) {\n\t\t\tforeach($args as $key => $val) {\n\t\t\t\t$args[$key] = ss_addslashes($val);\n\t\t\t}\t\t\n\t\t} else {\n\t\t\t$args = addslashes($args);\n\t\t}\n\t}\n\treturn $args;\n}",
"function addslashes_gpc($gpc)\n {\n }",
"function _check_magic_quotes($value){\n\t\treturn $this->_magic_quotes?stripslashes($value):$value;\n\t}",
"function wp_magic_quotes() {\n\tif ( get_magic_quotes_gpc() ) {\n\t\t$_GET = stripslashes_deep( $_GET );\n\t\t$_POST = stripslashes_deep( $_POST );\n\t\t$_COOKIE = stripslashes_deep( $_COOKIE );\n\t}\n\n\t// Escape with wpdb.\n\t$_GET = add_magic_quotes( $_GET );\n\t$_POST = add_magic_quotes( $_POST );\n\t$_COOKIE = add_magic_quotes( $_COOKIE );\n\t$_SERVER = add_magic_quotes( $_SERVER );\n\n\t// Force REQUEST to be GET + POST.\n\t$_REQUEST = array_merge( $_GET, $_POST );\n}",
"public function quoteAndEscape(string $str): string;",
"private function escape_string($in_string)\n {\n // $str = $in_string;\n return preg_replace('([%;])', '\\\\\\1', $in_string);\n //return $in_string;\n }",
"function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\n }",
"function do_magic_quotes_gpc(&$ar) {\n if (!is_array($ar)) return false;\n\n foreach ($ar as $key => $value) {\n if (is_array($ar[$key])) {\n do_magic_quotes_gpc($ar[$key]);\n } else {\n $ar[$key] = addslashes($value);\n }\n }\n\n reset($ar);\n}",
"function filter( $str ){\r\n\t\treturn addslashes( $str );\r\n\t}",
"private function _remove_magic_quotes()\n {\n if(get_magic_quotes_gpc()) {\n $_GET = $this->_strip_slashes_deep($_GET);\n $_POST = $this->_strip_slashes_deep($_POST);\n $_COOKIE = $this->_strip_slashes_deep($_COOKIE);\n }\n }",
"function qescape($str)\n{\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n return str_replace('\"', '\\\\\"', $str);\n}",
"public static function addSlashes($cadena)\n\t\t{\n\t\t\treturn str_replace(\"'\", \"''\", $cadena);\n\t\t}",
"function sanitize($str) {\n return addslashes($str);\n}",
"public function addSlash(){\n $this->firstname = addslashes($this->firstname);\n $this->lastname = addslashes($this->lastname);\n $this->company = addslashes($this->company);\n $this->country = addslashes($this->country);\n $this->place = addslashes($this->place);\n $this->street = addslashes($this->street);\n $this->description = addslashes($this->description); \n }",
"function path_escape($v) {\n\treturn preg_replace('/(\\/\\.\\/)|[\\/\\\\\\]|(\\.\\.)/', '', $v);\n}",
"public function escape($value);",
"public function escape($value);",
"function wrapper_escape($string) {\n\t\treturn str_replace(\"'\", \"''\", $string);\n\t}",
"public function escapeString($string);",
"abstract public function escapeString($string);",
"public function escape(string $str): string;",
"abstract public function escape_string( $str );",
"function escape($inString) {\r\n\t\treturn str_replace('\"', '\\\"', $inString);\r\n\t}",
"function fix_magic_quotes() {\n\tglobal $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;\n\n\t// clean gpc of slashes\n\tif (!get_magic_quotes_gpc()) {\n\t\treturn false;\n\t}\n\n\t$_GET = transcribe($_GET);\n\t$_POST = transcribe($_POST);\n\t$_COOKIE = transcribe($_COOKIE);\n\t$_REQUEST = transcribe($_REQUEST);\n\n\t$HTTP_GET_VARS = $_GET;\n\t$HTTP_POST_VARS = $_GET;\n\t$HTTP_COOKIE_VARS = $_COOKIE;\n\n\treturn true;\n\n}",
"function sanitize( $value ) {\n\t\tif(!$value) \n\t\t\treturn $value;\n\t\treturn preg_quote($value, \"/\");\n\t}",
"public function testEscape() {\n\t\t$string = 'Tom \"&/Or\" \\'Jerry\\' <[email protected]>';\n\t\t$expected = 'Tom "&/Or" 'Jerry' <[email protected]>';\n\t\t$result = _::escape($string);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test unescaping a string\n\t\t$result = _::escape($result, false);\n\t\t$this->assertEquals($string, $result);\n\t}",
"protected abstract function escape($string);",
"function RemoveMagicQuotesGPC()\n\t{\n\t\t// Check magic quotes state for GPC\n\t\tif (get_magic_quotes_gpc())\n\t\t{\n\t\t\t// Remove magic quotes in GET\n\t\t\t$_GET = RemoveSlashes($_GET);\n\t\t\t// Remove magic quotes in POST\n\t\t\t$_POST = RemoveSlashes($_POST);\n\t\t\t// Remove magic quotes in COOKIE\n\t\t\t$_COOKIE = RemoveSlashes($_COOKIE);\n\t\t}\n\t}",
"function wd_convert_slash($string){\n return str_replace(\"\\\\\", \"/\", $string);\n}",
"function undo_magic_quotes() {\n if (get_magic_quotes_gpc()) {\n \n $in = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);\n \n while (list($k,$v) = each($in)) {\n foreach ($v as $key => $val) {\n if (!is_array($val)) {\n $in[$k][$key] = stripslashes($val);\n continue;\n }\n $in[] =& $in[$k][$key];\n }\n }\n \n unset($in);\n }\n }",
"protected function escaped()\n {\n return preg_quote('='.env($this->key()), '/');\n }",
"function &stripSlashesGPC( $text, $force = false ) {\n if ( get_magic_quotes_gpc() || $force == true ) {\n $text = stripslashes( $text );\n }\n return $text;\n }",
"function escapeJsonString($value) {\n $escapers = array(\"\\\\\", \"/\", \"\\\"\", \"\\0\", \"\\u\", \" \", \"\\n\", \"\\r\", \"\\t\", \"\\x08\", \"\\x0c\");\n $replacements = array(\"\\\\\\\\\", \"\\\\/\", \"\\\\\\\"\", \" \", \"\", \" \", \"\\\\n\", \"\\\\r\", \"\\\\t\", \"\\\\f\", \"\\\\b\");\n $result = str_replace($escapers, $replacements, $value);\n return $result;\n }",
"static public function real_escape_string($s) { return self::escape($s); }",
"private static function _undoMagicQuotes(){\n\t\t\n\t\tif (get_magic_quotes_gpc()) {\n\n\t\t\tfunction stripslashes_array($data) {\n\t\t\t\tif (is_array($data)) {\n\t\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t\t$data[$key] = stripslashes_array($value);\n\t\t\t\t\t}\n\t\t\t\t\treturn $data;\n\t\t\t\t} else {\n\t\t\t\t\treturn stripslashes($data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_REQUEST = stripslashes_array($_REQUEST);\n\t\t\t$_GET = stripslashes_array($_GET);\n\t\t\t$_POST = stripslashes_array($_POST);\n\t\t\t$_COOKIE = stripslashes_array($_COOKIE);\n\t\t\tif(isset($_FILES))\n\t\t\t\t$_FILES = stripslashes_array($_FILES);\n\t\t}\n\t}",
"function wp_slash_strings_only($value)\n {\n }",
"function stripslashes2($valeur) { //vire les / lorsqu'ils sont en double ou triple\n\t$valeur = str_replace(\"\\\\\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"'\\\\\\\\\",\"'\\\\\",$valeur);\n\t$valeur = stripslashes($valeur);\n\treturn $valeur;\n}",
"public function escapeString(string $value): string;",
"protected function escape($value): string\n {\n $value = strtr(\n $value,\n [\n '%' => '\\%',\n '_' => '\\_',\n '\\\\' => '\\\\\\\\',\n ]\n );\n\n return '%' . $value . '%';\n }",
"function escape_data($data) {\n\n\tif (ini_get('magic_quotes_gpc')) {\t# Controllo se è attivata la modaltà Magic Quotes (che immette dei caratteri \"|\" prima di eventuali apici\n\t\t$data=stripslashes($data);\t# Tolgo i caratteri \"|\" inseriti da Magic Quotes con la funzione stripslashes\n\t\t}\n\treturn $data; # Ritorno la stringa formattata correttamente\n\t}",
"function escape($_str) {\n\t\treturn str_replace('\"', '"', $_str);\n\t}",
"function smartstripslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == true ) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn $str;\n\t}",
"function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }",
"function like_escape($text)\n {\n }",
"function remove_wp_magic_quotes() {\r\n\t\t$_GET = stripslashes_deep($_GET);\r\n\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t$_COOKIE = stripslashes_deep($_COOKIE);\r\n\t\t$_REQUEST = stripslashes_deep($_REQUEST);\r\n\t}",
"function preg_windows_slashes($string_value, $rep_value = \"\\\\\\\\\")\n {\n if (strtoupper(PHP_OS == \"WINDOWS\") || strtoupper(PHP_OS) == 'WINNT') {\n $string_value = str_replace('/', $rep_value, $string_value);\n }\n return $string_value;\n }",
"function escapeString($string) {\nreturn preg_replace('/([\\,;])/','\\\\\\$1', $string);\n}",
"public static function fixSlashes($_str) {\n\t\treturn $_str?str_replace('\\\\','/',$_str):$_str;\n\t}",
"function stripslashes_from_strings_only($value)\n {\n }",
"function ldap_slashes($str){\n $illegal=array(\"(\",\")\",\"#\"); // the + character has problems too, but it's an illegal character\n \n $legal=array();\n foreach ($illegal as $id => $char){ $legal[$id]=\"\\\\\".$char; } //make up the array of legal chars\n \n $str=str_replace($illegal,$legal,$str); //replace them\n return ($str);\n }",
"function backslashit($value)\n {\n }",
"function escape($str) {\n $str = get_magic_quotes_gpc()?stripslashes($str):$str;\n $str = $this->db->escape($str);\n return $str;\n }",
"function testUrlEncodeQuotes2()\n\t{\n\t\t\t$input = \"This is a test with a 'single quote\";\n\t\t\t$expectedOutput = \"This is a test with a 'single quote\";\n\t\t\t$this->assertEqual (\n\t\t\t\t\t$expectedOutput,\n\t\t\t\t\t$this->stringUtils->urlEncodeQuotes($input)\n\t\t\t);\n\t}",
"private function stripslash_gpc(&$value) {\r\n $value = stripslashes($value);\r\n }",
"abstract public function quoteString($value);",
"protected function quoteContent(string $content): string {\n return \"'\".str_replace(\n ['\\\\', \"\\r\", \"\\n\", \"'\"],\n ['\\\\\\\\', '\\\\r', '\\\\n', \"\\\\'\"],\n $content\n ).\"'\";\n }",
"function db($var) {\n return addslashes($var);\n}",
"public function placeholder_escape()\n {\n }",
"public function escape($text);",
"function applescript_safe($string) {\n\t$string=str_replace(\"\\\\\", \"\\\\\\\\\", $string);\n\t$string=str_replace(\"\\\"\", \"\\\\\\\"\", $string);\n\treturn $string;\n}",
"protected static function escape( $line ) {\n\t\t$line = preg_replace( '/\\\\\\\\$/', '', $line );\n\t\t$line = addcslashes( $line, '\\\\\"' );\n\t\t$line = str_replace( \"\\n\", '\\n', $line );\n\t\t$line = '\"' . $line . '\"';\n\n\t\treturn $line;\n\t}",
"function str_backslash($string)\n {\n return str_replace('/', '\\\\', $string);\n }",
"function mysql_prep ($value) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists(\"mysql_real_escape_string\" ); // i.e. PHP >= 4.3.0\n if ( $new_enough_php ) { // PHP 4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if ( $magic_quotes_active ) { $value = stripslashes( $value ); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if ( !magic_quotes_active ) { $value = addslashes( $value ); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n }",
"function _escape($s)\n\t\t{\n\t\t\treturn str_replace(')','\\\\)',str_replace('(','\\\\(',str_replace('\\\\','\\\\\\\\',$s)));\n\t\t}",
"function wp_kses_stripslashes($content)\n {\n }",
"private static function ss(&$s)\n\t{\n\t\t# Damned magic quotes workaround! IMMA AINT N00B!! IMMA FIRIN MAH LAZOR!!1\n\t\tif(version_compare(PHP_VERSION,'5.3','<') and @get_magic_quotes_gpc())\n\t\t\t$s = preg_replace('/\\\\\\(?!&#|\\?#)/','\',stripslashes($s));\n\t}"
] | [
"0.73387116",
"0.732507",
"0.7023051",
"0.69918966",
"0.69446754",
"0.69358253",
"0.691925",
"0.69078296",
"0.6887307",
"0.6867342",
"0.6845253",
"0.68094975",
"0.6806862",
"0.6792091",
"0.67573464",
"0.6706648",
"0.6700177",
"0.668022",
"0.6646282",
"0.6621263",
"0.66130793",
"0.66073185",
"0.660407",
"0.65995836",
"0.6592732",
"0.65865546",
"0.6577168",
"0.6571899",
"0.6571899",
"0.6559378",
"0.65544295",
"0.6544026",
"0.65432554",
"0.6541286",
"0.6531343",
"0.65253884",
"0.6521771",
"0.6519284",
"0.6493712",
"0.64782834",
"0.6457178",
"0.6450004",
"0.64494747",
"0.64422643",
"0.64104366",
"0.6406594",
"0.6404526",
"0.6377038",
"0.6374297",
"0.6373358",
"0.6373358",
"0.63720334",
"0.6355563",
"0.63552916",
"0.6350887",
"0.6340625",
"0.6335592",
"0.632969",
"0.6329667",
"0.6319643",
"0.6310784",
"0.6305474",
"0.6292406",
"0.62669927",
"0.6265328",
"0.6256404",
"0.62557685",
"0.6243363",
"0.6242785",
"0.62383974",
"0.62299895",
"0.6216736",
"0.61877716",
"0.61822575",
"0.6181852",
"0.6178475",
"0.6176674",
"0.6170823",
"0.6165739",
"0.6149904",
"0.6146464",
"0.6141222",
"0.6139952",
"0.6130857",
"0.61284983",
"0.6125176",
"0.6124268",
"0.61158955",
"0.6111723",
"0.61024487",
"0.6099942",
"0.6094921",
"0.6084608",
"0.60813427",
"0.6072737",
"0.60697407",
"0.6065019",
"0.60600185",
"0.6058757",
"0.60492855"
] | 0.6523605 | 36 |
EliminateSlashes get_magic_quotes_gpc() == true | function EliminateSlashes($value) {
if (is_array($value)) {
reset($value);
while (list($key, $val) = each($value))
$value[$key] = EliminateSlashes($val);
return $value;
}
return stripslashes($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _remove_magic_quotes()\n {\n if(get_magic_quotes_gpc()) {\n $_GET = $this->_strip_slashes_deep($_GET);\n $_POST = $this->_strip_slashes_deep($_POST);\n $_COOKIE = $this->_strip_slashes_deep($_COOKIE);\n }\n }",
"public function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }",
"function _check_magic_quotes($value){\n\t\treturn $this->_magic_quotes?stripslashes($value):$value;\n\t}",
"public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n \t\t$_GET = self::stripSlashesDeep($_GET);\r\n \t}\r\n \r\n\t\t\tif(isset($_POST)){\r\n \t\t$_POST = self::stripSlashesDeep($_POST);\r\n \t}\r\n \r\n\t\t\tif(isset($_COOKIE)){\r\n \t\t$_COOKIE = self::stripSlashesDeep($_COOKIE);\r\n \t}\r\n \r\n }\r\n }",
"function RemoveMagicQuotesGPC()\n\t{\n\t\t// Check magic quotes state for GPC\n\t\tif (get_magic_quotes_gpc())\n\t\t{\n\t\t\t// Remove magic quotes in GET\n\t\t\t$_GET = RemoveSlashes($_GET);\n\t\t\t// Remove magic quotes in POST\n\t\t\t$_POST = RemoveSlashes($_POST);\n\t\t\t// Remove magic quotes in COOKIE\n\t\t\t$_COOKIE = RemoveSlashes($_COOKIE);\n\t\t}\n\t}",
"function fix_magic_quotes() {\n\tglobal $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;\n\n\t// clean gpc of slashes\n\tif (!get_magic_quotes_gpc()) {\n\t\treturn false;\n\t}\n\n\t$_GET = transcribe($_GET);\n\t$_POST = transcribe($_POST);\n\t$_COOKIE = transcribe($_COOKIE);\n\t$_REQUEST = transcribe($_REQUEST);\n\n\t$HTTP_GET_VARS = $_GET;\n\t$HTTP_POST_VARS = $_GET;\n\t$HTTP_COOKIE_VARS = $_COOKIE;\n\n\treturn true;\n\n}",
"function undo_magic_quotes() {\n if (get_magic_quotes_gpc()) {\n \n $in = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);\n \n while (list($k,$v) = each($in)) {\n foreach ($v as $key => $val) {\n if (!is_array($val)) {\n $in[$k][$key] = stripslashes($val);\n continue;\n }\n $in[] =& $in[$k][$key];\n }\n }\n \n unset($in);\n }\n }",
"function wp_magic_quotes()\n {\n }",
"static function stripMagic() {\n\t\t@set_magic_quotes_runtime(0);\n\t\t// if magic_quotes_gpc strip slashes from GET POST COOKIE\n\t\tif (get_magic_quotes_gpc()){\n\t\tfunction stripslashes_array($array) {\n\t\t return is_array($array) ? array_map('stripslashes_array',$array) : stripslashes($array);\n\t\t}\n\t\t$_GET= stripslashes_array($_GET);\n\t\t$_POST= stripslashes_array($_POST);\n\t\t$_REQUEST= stripslashes_array($_REQUEST);\n\t\t$_COOKIE= stripslashes_array($_COOKIE);\n\t\t}\n\t}",
"function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\n }",
"private function _wp_magic_quotes() {\n // If already slashed, strip.\n if (function_exists('get_magic_quotes_gpc')) {\n $reflection = new \\ReflectionFunction('get_magic_quotes_gpc');\n if ( ! $reflection->isDeprecated()) {\n if ( get_magic_quotes_gpc() ) {\n $_GET = RevSliderFunctions::stripslashes_deep( $_GET );\n $_POST = RevSliderFunctions::stripslashes_deep( $_POST );\n $_COOKIE = RevSliderFunctions::stripslashes_deep( $_COOKIE );\n }\n }\n }\n\n // Escape with wpdb.\n $_GET = $this->_add_magic_quotes( $_GET );\n $_POST = $this->_add_magic_quotes( $_POST );\n $_COOKIE = $this->_add_magic_quotes( $_COOKIE );\n $_SERVER = $this->_add_magic_quotes( $_SERVER );\n\n // Force REQUEST to be GET + POST.\n $_REQUEST = array_merge( $_GET, $_POST );\n }",
"private static function _undoMagicQuotes(){\n\t\t\n\t\tif (get_magic_quotes_gpc()) {\n\n\t\t\tfunction stripslashes_array($data) {\n\t\t\t\tif (is_array($data)) {\n\t\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t\t$data[$key] = stripslashes_array($value);\n\t\t\t\t\t}\n\t\t\t\t\treturn $data;\n\t\t\t\t} else {\n\t\t\t\t\treturn stripslashes($data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_REQUEST = stripslashes_array($_REQUEST);\n\t\t\t$_GET = stripslashes_array($_GET);\n\t\t\t$_POST = stripslashes_array($_POST);\n\t\t\t$_COOKIE = stripslashes_array($_COOKIE);\n\t\t\tif(isset($_FILES))\n\t\t\t\t$_FILES = stripslashes_array($_FILES);\n\t\t}\n\t}",
"function remove_wp_magic_quotes() {\r\n\t\t$_GET = stripslashes_deep($_GET);\r\n\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t$_COOKIE = stripslashes_deep($_COOKIE);\r\n\t\t$_REQUEST = stripslashes_deep($_REQUEST);\r\n\t}",
"function wp_magic_quotes() {\n\tif ( get_magic_quotes_gpc() ) {\n\t\t$_GET = stripslashes_deep( $_GET );\n\t\t$_POST = stripslashes_deep( $_POST );\n\t\t$_COOKIE = stripslashes_deep( $_COOKIE );\n\t}\n\n\t// Escape with wpdb.\n\t$_GET = add_magic_quotes( $_GET );\n\t$_POST = add_magic_quotes( $_POST );\n\t$_COOKIE = add_magic_quotes( $_COOKIE );\n\t$_SERVER = add_magic_quotes( $_SERVER );\n\n\t// Force REQUEST to be GET + POST.\n\t$_REQUEST = array_merge( $_GET, $_POST );\n}",
"function smartstripslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == true ) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn $str;\n\t}",
"function bwm_clean($s) {\r\n if (get_magic_quotes_gpc())\r\n return trim(stripslashes($s));\r\n return trim($s);\r\n}",
"function StripGPC($s_value)\n{\n\tif (get_magic_quotes_gpc() != 0)\n\t\t$s_value = stripslashes($s_value);\n\treturn ($s_value);\n}",
"function sc_php_escape($value) {\n\tif (is_string($value));\n\t// strip out slashes IF they exist AND magic_quotes is on\n\tif (get_magic_quotes_gpc() && (strstr($value,'\\\"') || strstr($value,\"\\\\'\"))) $value = stripslashes($value);\t\n\t// escape string to make it safe for mysql\n\treturn addslashes($value);\n}",
"function maqic_unquote_gpc()\n{\n if (ini_get('magic_quotes_gpc'))\n {\n $tmp = array ('_POST', '_GET', '_REQUEST', '_COOKIE');\n foreach($tmp as $n)\n recurse($GLOBALS[$n], '$value=stripslashes($value)');\n }\n}",
"function &stripSlashesGPC( $text, $force = false ) {\n if ( get_magic_quotes_gpc() || $force == true ) {\n $text = stripslashes( $text );\n }\n return $text;\n }",
"function privDisableMagicQuotes()\n {\n }",
"function do_magic_quotes_gpc(&$ar) {\n if (!is_array($ar)) return false;\n\n foreach ($ar as $key => $value) {\n if (is_array($ar[$key])) {\n do_magic_quotes_gpc($ar[$key]);\n } else {\n $ar[$key] = addslashes($value);\n }\n }\n\n reset($ar);\n}",
"function remove_ill($str)\r\n {\r\n\t\treturn (!get_magic_quotes_gpc() ? addslashes(trim($str)) : trim($str));\r\n }",
"function smartaddslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == false ) {\n\t\t\t$str = addslashes( $str );\n\t\t}\n\t\treturn $str;\n\t}",
"function mysql_prep($value){\n\t\t$magic_quotes_active = get_magic_quotes_gpc();\n\t\t$new_enough_php = function_exists(\"mysql_real_escape_string\"); // ie PHP >= v4.3.0\n\n\t\tif($new_enough_php){\n\t\t\t// undo any magic quotes effects so mysql_real_escape_quotes can do the work\n\t\t\tif($magic_quotes_active){\n\t\t\t\t$value = stripcslashes($value);\n\t\t\t}\n\t\t\t$value = mysql_real_escape_string($value);\n\t\t}else {\n\t\t\t// if magic quotes aren't on then add slashes manually \n\t\t\tif(!$magic_quotes_active){\n\t\t\t\t$value = addslashes($value);\n\t\t\t\t// if magic quotes are on the slashes already exits\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}",
"function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}",
"function privDisableMagicQuotes()\n {\n $v_result=1;\n\n // ----- Look if function exists\n if ( (!function_exists(\"get_magic_quotes_runtime\"))\n\t || (!function_exists(\"set_magic_quotes_runtime\"))) {\n return $v_result;\n\t}\n\n // ----- Look if already done\n if ($this->magic_quotes_status != -1) {\n return $v_result;\n\t}\n\n\t// ----- Get and memorize the magic_quote value\n\t$this->magic_quotes_status = @get_magic_quotes_runtime();\n\n\t// ----- Disable magic_quotes\n\tif ($this->magic_quotes_status == 1) {\n\t @set_magic_quotes_runtime(0);\n\t}\n\n // ----- Return\n return $v_result;\n }",
"function fromGPC($s){\n if(get_magic_quotes_gpc()){\n return stripslashes($s);\n }else{\n return $s;\n }\n }",
"function clean_quotes($value) {\r\n\r\n\t\t //Trim the value\r\n\r\n\t\t $value = trim($value);\r\n\r\n\t\t \r\n\r\n\t\t// Stripslashes\r\n\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t$value = stripslashes($value);\r\n\r\n\t\t}\r\n\r\n\t\t// Quote the value\r\n\r\n\t\t$value = mysql_real_escape_string($value);\r\n\r\n\t\t//$value = htmlspecialchars ($value);\r\n\r\n\t\treturn $value;\r\n\r\n}",
"function checkRealEscapeString($value);",
"function CleanPostForMysql($target) {\r\n if (get_magic_quotes_gpc()) {\r\n return $target;\r\n } else {\r\n return mysql_real_escape_string($target);\r\n } // if\r\n}",
"function cleanText($str) {\r\n $str = @trim($str);\r\n if (get_magic_quotes_gpc()) {\r\n $str = stripslashes($str);\r\n }\r\n return $str;\r\n}",
"function strip_magic_quotes($data) {\n foreach($data as $k=>$v) {\n $data[$k] = is_array($v) ? strip_magic_quotes($v) : stripslashes($v);\n }\n return $data;\n}",
"function mysql_prep ($value) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists(\"mysql_real_escape_string\" ); // i.e. PHP >= 4.3.0\n if ( $new_enough_php ) { // PHP 4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if ( $magic_quotes_active ) { $value = stripslashes( $value ); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if ( !magic_quotes_active ) { $value = addslashes( $value ); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n }",
"function sanitize($data) {\n $data = htmlentities(get_magic_quotes_gpc() ? stripslashes($data) : $data, ENT_QUOTES, 'UTF-8');\n return $data;\n }",
"function mysql_prep( $value ) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists( \"mysql_real_escape_string\" ); // i.e. PHP >= v4.3.0\n if( $new_enough_php ) { // PHP v4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if( $magic_quotes_active ) { $value = stripslashes( $value ); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if( !$magic_quotes_active ) { $value = addslashes( $value ); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n}",
"private function stripslash_gpc(&$value) {\r\n $value = stripslashes($value);\r\n }",
"function clean($str) {\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn $str;\r\n\t}",
"function _put_safe_slashes ($text = \"\") {\n\t\t$text = str_replace(\"'\", \"'\", trim($text));\n\t\t$text = str_replace(\"\\\\'\", \"\\\\'\", $text);\n\t\t$text = str_replace(\"'\", \"\\\\'\", $text);\n\t\tif (substr($text, -1) == \"\\\\\" && substr($text, -2, 1) != \"\\\\\") {\n\t\t\t$text .= \"\\\\\";\n\t\t}\n\t\treturn $text;\n\t}",
"function test_input($str) {\n\t\t\t\t$str = @trim($str);\n\t\t\t\tif(get_magic_quotes_gpc()) {\n\t\t\t\t$str = stripslashes($str);\n\t\t\t\t}\n\t\t\t\treturn ($str);\n\t\t\t\t}",
"function mf_sanitize($input){\n\t\tif(get_magic_quotes_gpc() && !empty($input)){\n\t\t\t $input = is_array($input) ?\n\t array_map('mf_stripslashes_deep', $input) :\n\t stripslashes(trim($input));\n\t\t}\n\t\t\n\t\treturn $input;\n\t}",
"function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}",
"static function quote_smart($value)\n {\n // Stripslashes\n if (get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n // Quote if not a number or a numeric string\n if (!is_numeric($value)) {\n $value = \"'\" . mysql_real_escape_string($value) . \"'\";\n //$value = \"'\" . mysql_escape_string($value) . \"'\";\n }\n return $value;\n }",
"function stripPostSlashes($string) {\n\t\tif ((get_magic_quotes_gpc()==1) || (get_magic_quotes_runtime()==1))\n\t\t\treturn stripslashes($string);\n\t\telse return $string;\n\t}",
"function mysql_prep($value){\n $magic_quotes_active=get_magic_quotes_gpc();//to check if magic quotes has been activated returns 0 if off and 1 if on\n $newness_of_php=function_exists(\"mysql_real_escape_string\");//to check if the function is present in php; whether new or old php version\n \n if($newness_of_php){\n if($magic_quotes_active){$value= stripslashes($value);}\n $value=mysql_real_escape_string($value);\n }else{\n if(!$magic_quotes_active){$value=addslashes($value);} \n }\n return $value;\n }",
"function sanitize($data)\n{\n$data = trim($data);\n \n// apply stripslashes if magic_quotes_gpc is enabled\nif(get_magic_quotes_gpc())\n{\n$data = stripslashes($data);\n}\n \n// a mySQL connection is required before using this function\n$data = mysql_real_escape_string($data);\n \nreturn $data;\n}",
"function addslashes_strings_only($value)\n {\n }",
"protected function quote_escaped()\n {\n }",
"function DoStripSlashes($fieldValue) {\n if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) { \n if (is_array($fieldValue) ) { \n return array_map('DoStripSlashes', $fieldValue); \n } else { \n return trim(stripslashes($fieldValue)); \n } \n } else { \n return $fieldValue; \n } \n}",
"function addslashes_gpc($gpc)\n {\n }",
"function fix_POST_slashes() {\n\tglobal $fixed_POST_slashes;\n\tif (!$fixed_POST_slashes and get_magic_quotes_gpc()) {\n\t\t$fixed_POST_slashes = true;\n\t\tforeach ($_POST as $key => $val) {\n\t\t\tif (gettype($val) == \"array\") {\n\t\t\t\tforeach ($val as $i => $j) {\n\t\t\t\t\t$val[$i] = stripslashes($j);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$_POST[$key] = stripslashes($val);\n\t\t\t}\n\t\t}\n\t}\n}",
"function mysql_safe_string($string)\n{\n if (get_magic_quotes_gpc() == 1)\n {\n $string = stripslashes($string);\n }\n\n if (function_exists(mysql_real_escape_string))\n {\n $string = mysql_real_escape_string($string);\n }\n else\n {\n $string = mysql_escape_string($string);\n }\n\n return trim($string);\n}",
"function addPostSlashes($string) {\n\t\tif ((get_magic_quotes_gpc()==1) || (get_magic_quotes_runtime()==1))\n\t\t\treturn $string;\n\t\telse return addslashes($string);\n\t}",
"function safeString($string) {\n\t/*if(get_magic_quotes_gpc()) {\n\t\t$string = stripslashes($string);\n\t}\n\t\n\treturn str_replace(\"`\", \"\\`\", mysql_real_escape_string($string));*/\n\treturn $string;\n}",
"function clean($str) {\n\t $str = @trim($str);\n \tif(get_magic_quotes_gpc()) {\n \t$str = stripslashes($str);\n \t}\n \t\treturn mysql_real_escape_string($str);\n \t}",
"public function mysql_prepare_value($value) {\r\r\n\t\t$magic_quotes_active = get_magic_quotes_gpc();\r\r\n\t\t$new_version_php = function_exists(\"mysql_real_escape_string\");\r\r\n\t\t\r\r\n\t\tif($new_version_php){\r\r\n\t\t\t//undo any magic quote effects so mysql_real_escape_string can do the work\r\r\n\t\t\tif($magic_quotes_active) { $value = stripslashes($value); }\r\r\n\t\t\t$value = mysql_real_escape_string($value);\r\r\n\t\t} else {\r\r\n\t\t\t\t//if magic quotes aren't already on then add slashes manually\r\r\n\t\t\t\tif( !$magic_quotes_active ) { $values = addslashes( $value ); }\r\r\n\t\t\t\t//if magic quotes are active, then the slashes already exist\r\r\n\t\t\t}\r\r\n\t\treturn $value;\r\r\n\t}",
"function clean($str) {\r\n $str = @trim($str);\r\n if(get_magic_quotes_gpc()) {\r\n $str = stripslashes($str);\r\n }\r\n return mysql_escape_string($str);\r\n }",
"public function stripslash_gpc($value) {\r\n $value = stripslashes($value);\r\n\t\t$value = htmlspecialchars($value);\r\n\t\t$value = trim($value);\r\n\t\treturn $value;\r\n }",
"function clean($str){\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn mysql_real_escape_string($str);\r\n}",
"public static function StripSlashes($value)\n\t{\n\t\tif (get_magic_quotes_runtime())\n\t\t{\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\tforeach ($value as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($val)) $value[$key] = self::StripSlashes($val);\n\t\t\t\t\telse $value[$key] = stripslashes($val);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse $value = stripslashes($value);\n\t\t}\n\t\treturn $value;\n\t}",
"function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}",
"function __clearstr($val)\n {\n if (!get_magic_quotes_gpc()) $val = addslashes($val);\n return $val;\n }",
"function clean($str){\n $str = @trim($str);\n if(get_magic_quotes_gpc()){\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n}",
"function escape_data($data) {\n\n\tif (ini_get('magic_quotes_gpc')) {\t# Controllo se è attivata la modaltà Magic Quotes (che immette dei caratteri \"|\" prima di eventuali apici\n\t\t$data=stripslashes($data);\t# Tolgo i caratteri \"|\" inseriti da Magic Quotes con la funzione stripslashes\n\t\t}\n\treturn $data; # Ritorno la stringa formattata correttamente\n\t}",
"public function escape_value($value){\n if($this->real_escape_string_e){\n if($this->magic_quotes_a){\n $value = stripcslashes($value);\n }\n $value = mysql_real_escape_string($value);\n }\n if(!$this->magic_quotes_a){\n $value = addslashes($value);\n }\n return $value;\n }",
"function wp_kses_stripslashes($content)\n {\n }",
"private function secure ($value) {\r\n\t if (get_magic_quotes_gpc ()) {\r\n\t $value = stripslashes ($value);\r\n\t }\r\n\t $value = mysql_real_escape_string ($value);\r\n\t return $value;\r\n\t}",
"function privSwapBackMagicQuotes()\n {\n $v_result=1;\n\n // ----- Look if function exists\n if ( (!function_exists(\"get_magic_quotes_runtime\"))\n\t || (!function_exists(\"set_magic_quotes_runtime\"))) {\n return $v_result;\n\t}\n\n // ----- Look if something to do\n if ($this->magic_quotes_status != -1) {\n return $v_result;\n\t}\n\n\t// ----- Swap back magic_quotes\n\tif ($this->magic_quotes_status == 1) {\n \t @set_magic_quotes_runtime($this->magic_quotes_status);\n\t}\n\n // ----- Return\n return $v_result;\n }",
"function clean($str) {\n$str = @trim($str);\nif(get_magic_quotes_gpc()) {\n$str = stripslashes($str);\n}\nreturn mysql_real_escape_string($str);\n}",
"function txt_stripslashes($t)\n\t{\n\t\tif ( $this->get_magic_quotes )\n\t\t{\n \t\t$t = stripslashes($t);\n \t\t$t = preg_replace( \"/\\\\\\(?!&#|\\?#)/\", \"\\", $t );\n \t}\n \t\n \treturn $t;\n }",
"function clean($str){\n\t$str = @trim($str);\n\tif(get_magic_quotes_gpc()){\n\t\t$str = stripslashes($str);\n\t}\n\treturn mysql_real_escape_string($str);\n}",
"function clean($str) {\n $str = @trim($str);\n if(get_magic_quotes_gpc()) {\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n }",
"function clean($str) {\n $str = @trim($str);\n if(get_magic_quotes_gpc()) {\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n }",
"function clean($value) {\n if (get_magic_quotes_gpc()) $value = stripslashes($value);\n if (!is_numeric($value)) $value = addslashes($value);\n return $value;\n}",
"function stripslashes_from_strings_only($value)\n {\n }",
"function add_magic_quotes($input_array)\n {\n }",
"function clean($str) {\r\n\t\t\t\t$str = @trim($str);\r\n\t\t\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t\t\t$str = stripslashes($str);\r\n\t\t\t\t}\r\n\t\t\t\treturn mysql_real_escape_string($str);\r\n\t\t\t}",
"function jc_ipr_f_cleanbothquotes($tmpNeedsCleaning)\n{\n\t$replacethis\t= array('/\\\\\\\\\"/', \"/\\\\\\\\'/\");\n\t$replacethat\t= array('\"', \"'\");\n\t$tmpNeedsCleaning = preg_replace($replacethis, $replacethat, $tmpNeedsCleaning);\n\treturn $tmpNeedsCleaning;\n}",
"function escapeQuote($input, $strip=1) {\r\n\r\n\t$string = stripslashes(trim($input));\r\n\tif ($strip) $string = strip_tags($string);\r\n\t$result = \"\";\r\n\t\r\n\tfor ($i=0;$i<strlen($string);$i++) {\r\n\r\n\t\t$char = substr($string,$i,1);\r\n\t\tif ($char == \"'\") $result .= \"''\";\r\n\t\telseif ($char == \"\\r\") $result .= \"\";\r\n\t\telse $result .= $char;\r\n\r\n\t}\r\n\r\n\treturn \"'\".$result.\"'\";\r\n\r\n}",
"function clean($str) {\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn mysql_real_escape_string($str);\r\n\t}",
"function clean($str) {\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn mysql_real_escape_string($str);\r\n\t}",
"function clean($str) {\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn mysql_real_escape_string($str);\r\n\t}",
"public static function clean_input($input)\n {\n $input = trim(stripslashes($input));\n\n # strip the slashes if magic quotes is on\n if(get_magic_quotes_gpc()) {\n $input = trim(stripslashes($input));\n }\n else {\n $input = trim($input);\n }\n\treturn ($input);\n\n }",
"function stripslashes2($valeur) { //vire les / lorsqu'ils sont en double ou triple\n\t$valeur = str_replace(\"\\\\\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"'\\\\\\\\\",\"'\\\\\",$valeur);\n\t$valeur = stripslashes($valeur);\n\treturn $valeur;\n}",
"function clean($str) {\n $str = @trim($str);\n if(get_magic_quotes_gpc()) {\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n}",
"function escape_data ($data, $dbc) {\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t// Strip the slashes if Magic Quotes is on:\r\n\t\t\t$data = stripslashes($data);\r\n\r\n\t\t\t// Apply trim() and mysqli_real_escape_string():\r\n\t\t\treturn mysqli_real_escape_string ($dbc, trim($data));\r\n\t\t}\r\n\t}",
"function clean($str) {\n\n\n\n\n\n\t\t$str = @trim($str);\n\n\n\n\n\n\t\tif(get_magic_quotes_gpc()) {\n\n\n\n\n\n\t\t\t$str = stripslashes($str);\n\n\n\n\n\n\t\t}\n\n\n\n\n\n\t\treturn mysql_real_escape_string($str);\n\n\n\n\n\n\t}",
"function sanitize($str) {\n return addslashes($str);\n}",
"static function revertSlashes($to_strip = null)\n\t{\t\t\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\tif (isset($to_strip)) {\n\t\t\t\treturn is_array($to_strip)\n\t\t\t\t ? array_map(array('Pie_Bootstrap', 'revertSlashes'), $to_strip) \n\t\t\t\t : stripslashes($to_strip);\n\t\t\t}\n\t\t\t$_COOKIE = self::revertSlashes($_COOKIE);\n\t\t\t$_FILES = self::revertSlashes($_FILES);\n\t\t\t$_GET = self::revertSlashes($_GET);\n\t\t\t$_POST = self::revertSlashes($_POST);\n\t\t\t$_REQUEST = self::revertSlashes($_REQUEST);\n\t\t}\n\t}",
"function nice_addslashes($string)\n{\n // if magic quotes is on the string is already quoted, just return it\n if(MAGIC_QUOTES)\n return $string;\n else\n return addslashes($string);\n}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function clean($str) {\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}",
"function fix_string($string)\n\t{\n\t\tif (get_magic_quotes_gpc()) $string = stripslashes($string);\n\t\treturn htmlentities ($string);\n\t}",
"function clean($str) {\n $str = @trim($str);\n if(get_magic_quotes_gpc()) {\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n }",
"public static function stripSlashes($cadena)\n\t\t{\n\t\t\treturn str_replace(\"''\", \"'\", $cadena);\n\t\t}"
] | [
"0.8489133",
"0.8376537",
"0.8358635",
"0.82394737",
"0.8117513",
"0.8115007",
"0.80812377",
"0.7923795",
"0.78854924",
"0.78694826",
"0.7842625",
"0.7822052",
"0.77171355",
"0.7683883",
"0.75012505",
"0.7329409",
"0.7318122",
"0.72659045",
"0.7261165",
"0.72473824",
"0.72196114",
"0.72188747",
"0.7166624",
"0.713989",
"0.7069063",
"0.7046164",
"0.701301",
"0.6970579",
"0.6947978",
"0.69476616",
"0.69309807",
"0.6904848",
"0.6897887",
"0.68843013",
"0.6883316",
"0.6860153",
"0.67821664",
"0.6769218",
"0.6758128",
"0.67457783",
"0.67238533",
"0.6702072",
"0.6690749",
"0.66890365",
"0.66816825",
"0.66759825",
"0.666937",
"0.66620517",
"0.66522944",
"0.66276646",
"0.6618818",
"0.6609094",
"0.6587857",
"0.65749323",
"0.6546447",
"0.6544871",
"0.6537882",
"0.65328276",
"0.65225345",
"0.65184474",
"0.651545",
"0.6505041",
"0.6484451",
"0.64718425",
"0.6466546",
"0.6463702",
"0.64627135",
"0.6461866",
"0.644644",
"0.6415407",
"0.6414254",
"0.6413766",
"0.6413766",
"0.6393391",
"0.6387534",
"0.6382726",
"0.6379501",
"0.63712263",
"0.6365696",
"0.6364131",
"0.6364131",
"0.6364131",
"0.63638204",
"0.6362201",
"0.6340584",
"0.63389313",
"0.6330989",
"0.6330101",
"0.6325716",
"0.63199025",
"0.6317431",
"0.6317431",
"0.6317431",
"0.6317431",
"0.6317431",
"0.6317431",
"0.6317431",
"0.6317431",
"0.6312902",
"0.631062",
"0.6305671"
] | 0.0 | -1 |
Replace Special character to '' | function replace_specialChar($vTitle) {
$rs_catname = $vTitle;
$spstr = "�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�";
$spArr = @explode("#", $spstr);
$i = 0;
foreach ($spArr as $arr) {
$rs_catname = str_replace($arr, "-", $rs_catname);
$i++;
}
//print_r($rs_catname);exit;
$rs_catname = str_replace("#", "-", $rs_catname);
$rs_catname = str_replace(" ", "-", str_replace("&", "and", $rs_catname));
return $rs_catname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _remove_special_chars($keyword) {\n //\t$keyword = str_replace('\"', '\\\"', $keyword);\n return $keyword;\n}",
"function remove_strange_chars($txt){\n\t\treturn(str_replace(array('<','>',\"'\",\";\",\"&\",\"\\\\\"),'',$txt));\n\t}",
"public function removeSpecialChars()\n {\n $this->input = preg_replace(\"/[^A-Za-z0-9\\-]/\", \" \", $this->input);\n return $this;\n }",
"function removeSpecialChars($oldText)\r\n{\r\n // Se corrige os acentos com iso, taca iso\r\n if ( strlen($oldText) > strlen(utf8_decode($oldText)) )\r\n {\r\n $oldText = utf8_decode($oldText);\r\n }\r\n\r\n /*\r\n * A função \"strtr\" substitui os caracteres acentuados pelos não acentuados.\r\n * A função \"ereg_replace\" utiliza uma expressão regular que remove todos os\r\n * caracteres que não são letras, números e são diferentes de \"_\" (underscore).\r\n */\r\n $newText = preg_replace('[^a-zA-Z0-9_-.]', '', strtr($oldText, 'áàãâéêíóôõúüçÁÀÃÂÉÊÍÓÔÕÚÜÇ ', 'aaaaeeiooouucAAAAEEIOOOUUC_'));\r\n\r\n if ( !(strlen($newText) > 0) )\r\n {\r\n $newText = 'nome_invalido-'.getRandomNumbers().getRandomNumbers();\r\n }\r\n\r\n return $newText;\r\n}",
"function replace_specials_characters($s) {\r\n\t\t\t//$s = mb_convert_encoding($s, 'UTF-8','');\r\n\t\t\t$s = preg_replace(\"/á|à|â|ã|ª/\",\"a\",$s);\r\n\t\t\t$s = preg_replace(\"/Á|À|Â|Ã/\",\"A\",$s);\r\n\t\t\t$s = preg_replace(\"/é|è|ê/\",\"e\",$s);\r\n\t\t\t$s = preg_replace(\"/É|È|Ê/\",\"E\",$s);\r\n\t\t\t$s = preg_replace(\"/í|ì|î/\",\"i\",$s);\r\n\t\t\t$s = preg_replace(\"/Í|Ì|Î/\",\"I\",$s);\r\n\t\t\t$s = preg_replace(\"/ó|ò|ô|õ|º/\",\"o\",$s);\r\n\t\t\t$s = preg_replace(\"/Ó|Ò|Ô|Õ/\",\"O\",$s);\r\n\t\t\t$s = preg_replace(\"/ú|ù|û/\",\"u\",$s);\r\n\t\t\t$s = preg_replace(\"/Ú|Ù|Û/\",\"U\",$s);\r\n\t\t\t$s = str_replace(array(\"ñ\", \"Ñ\"), array(\"n\", \"N\"), $s);\r\n\t\t\t$s = str_replace(array('ç', 'Ç'), array('c', 'C'), $s);\r\n\r\n\t\t\t//$s = str_replace(\" \",\"_\",$s);\r\n\t\t\t//$s = preg_replace('/[^a-zA-Z0-9_\\.-]/', '', $s);\r\n\t\t\treturn $s;\r\n\t\t}",
"function specialchars($text){\n\t\t$newtext = trim($text);\n\t\t$newtext = strip_tags($newtext);\n\t\t$newtext=htmlspecialchars(str_replace('\\\\', '', $newtext),ENT_QUOTES);\n\t\t$newtext=eregi_replace('&','&',$newtext);\n\t\t//$newtext=nl2br($newtext);\n\t\treturn $newtext;\n\t}",
"function __clearstr($val)\n {\n if (!get_magic_quotes_gpc()) $val = addslashes($val);\n return $val;\n }",
"function remove_special_chars($string) {\n\t return preg_replace ('/[^a-zA-Z0-9]/', '', $string);\n\t}",
"function strclean($txt){\n\t$txt=preg_replace('/ ?/i',' ',$txt);\n\t$array=array(\n\t\t'\\\\\\\\'=>'\\\\',\n\t\t'\\\\\\''=>'\\'',\n\t\t'\\\\\"'=>'\"',\n\t\t'&'=>'&'\n\t);\n\treturn str_replace(array_keys($array),array_values($array),$txt);\n}",
"function strclean($txt){\n\t$txt=preg_replace('/ ?/i',' ',$txt);\n\t$array=array(\n\t\t'\\\\\\\\'=>'\\\\',\n\t\t'\\\\\\''=>'\\'',\n\t\t'\\\\\"'=>'\"',\n\t\t'&'=>'&'\n\t);\n\treturn str_replace(array_keys($array),array_values($array),$txt);\n}",
"public static function clearSpecial($cadena){\n\t\t$cadena = htmlentities($cadena);\n\t\t$cadena = preg_replace('/\\&(.)[^;]*;/', '\\\\1', $cadena);\n\t\t$cadena = preg_replace(\"([^A-Za-z0-9_])\",\"\", $cadena);\n\n\t\treturn $cadena;\n\t}",
"function clean_unwanted_characters($oneStr){\n\t$cleaned_str = $oneStr;\r\n// \t$cleaned_str = str_ireplace(\"\\\"\", \"/\", $oneStr);\r\n// \t$cleaned_str = str_ireplace(\"\\\\\", \"/\", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\b\", \" \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\f\", \" / \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\r\", \" / \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\t\", \" \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\u\", \" \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"</\", \"<\\/\", $cleaned_str);\r\n\treturn $cleaned_str;\n\r\n}",
"function char_filter($ojb)\n {\n $badchars='Ý`~!@$%^()+-_=[]{}\\'\\\\:\"|,/<>? '; # Nhung ky tu khong cho phep duoc len danh sach tai day\n for ($i=0;$i<strlen($badchars);$i++){\n $ojb=str_replace($badchars[$i],\"\",$ojb);\n\n }\n\n return $ojb;\n }",
"function removeSpecialCharacter($name) {\n $lowerName = strtolower($name);\n $what = array( 'ä','ã','à','á','â','ê','ë','è','é','ï','ì','í','ö','õ','ò','ó','ô','ü','ù','ú','û','À','Á','É','Í','Ó','Ú','ñ','Ñ','ç','Ç',' ','-','(',')',',',';',':','|','!','\"','#','$','%','&','/','=','?','~','^','>','<','ª','º', \"'\" );\n $by = array( 'a','a','a','a','a','e','e','e','e','i','i','i','o','o','o','o','o','u','u','u','u','A','A','E','I','O','U','n','n','c','C','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-', '-');\n\n return str_replace($what, $by, $lowerName);\n }",
"protected function cleanValue()\n {\n return str_replace([\n '%',\n '-',\n '+',\n ], '', $this->condition->value);\n }",
"function clean_special_character_from_string($string) {\n $string = str_replace(' ', '-', $string); \n // Removes special chars.\n return preg_replace('/[^A-Za-z0-9\\-]/', '', $string);\n}",
"function user_removeChr($content,$conf) {\r\n\t//$content = str_replace('\\r', '2', $content);\r\n\t$content = str_replace(chr(13), '/', $content);\r\n\t$content = str_replace(chr(10), '', $content);\r\n\treturn $content;\r\n}",
"function htmlRemoveSpecialCharacters($input){\n\t\tfor($i=0; $i<strlen($input); $i++){\n\n\t\t\t$value = ord($input[$i]);\n\t\t\tif($value >= 48 && $value <= 57);\n\t\t\telseif ($value >= 65 && $value <= 90) ;\n\t\t\telseif ($value >= 97 && $value <= 122) ;\n\t\t\telseif ($value == 32) ;\n\t\t\telse{\n\t\t\t\t$input = substr($input, 0, $i) . '\\\\' . substr($input, $i);\n\t\t\t}\n\t\t}\n\t\techo $input;\n\t\treturn $input;\n\t}",
"function htmlSpecialChars( $text )\n\t{\n\t\t//return preg_replace(\"/&/i\", '&', htmlspecialchars($text, ENT_QUOTES));\n\t\treturn preg_replace(array(\"/&/i\", \"/ /i\"), array('&', '&nbsp;'), htmlspecialchars($text, ENT_QUOTES));\n\t}",
"public function getAsciiReplace();",
"public static function clear_value($v)\n\t{\n\t\tif(!$v)\n\t\t\treturn '';\n\t\tself::nl($v);\n\t\t$v = str_replace(' ',' ',$v);\n\t\t$v = str_replace('‮','',$v);\n\t\t$v = str_replace('&','&',$v);\n\t\t$v = str_replace('<!--','<!--',$v);\n\t\t$v = str_replace('-->','-->',$v);\n\t\t$v = preg_replace('/<script/i','<script',$v);\n\t\t$v = str_replace('>','>',$v);\n\t\t$v = str_replace('<','<',$v);\n\t\t$v = str_replace('\"','"',$v);\n\t\t$v = str_replace(\"\\n\",'<br />',$v);\n\t\t$v = str_replace('$','$',$v);\n\t\t$v = str_replace('!','!',$v);\n\t\t$v = str_replace(\"'\",''',$v);\n\t\t##\n\t\t$v = preg_replace('/&#([0-9]+);/s','&#\\\\1;',$v);\n\t\t$v = preg_replace('/&#(\\d+?)([^\\d;])/i','&#\\\\1;\\\\2',$v);\n\t\t##\n\t\treturn $v;\n\t}",
"function make_clean($value) {\n\t\t$legal_chars = \"%[^0-9a-zA-Z������� ]%\"; //allow letters, numbers & space\n\t\t$new_value = preg_replace($legal_chars,\"\",$value); //replace with \"\"\n\t\treturn $new_value;\n\t}",
"function prepare_field($field)\n{\n return trim(preg_replace(\"/[<>&=%:'“]/i\", \"\", $field));\n}",
"function amap_ma_remove_shits($toclear) {\n $cleared = str_replace(\"'\", \"'\", $toclear);\n $cleared = str_replace('\"', \""\", $cleared);\n\n return $cleared;\n}",
"function f($t){\n\t$specialChars = array(\t'(r)'\t=> '®',\n\t\t\t\t\t\t\t'(R)'\t=> '®',\n\t\t\t\t\t\t\t'(c)'\t=> '©',\n\t\t\t\t\t\t\t'(C)'\t=> '©',\n\t\t\t\t\t\t\t'(tm)'\t=> '™',\n\t\t\t\t\t\t\t'(TM)'\t=> '™',\n\t\t\t\t\t\t\t'(>)'\t=> '›',\n\t\t\t\t\t\t\t'(>>)'\t=> '»');\n\tforeach($specialChars AS $key => $val) $t = str_replace($key,$val,stripslashes($t));\n\treturn $t;\n}",
"function replace_chars($content)\n\t{\n\t\t//convert all characters to lower case\n\t\t$content = mb_strtolower($content);\n\t\t//$content = mb_strtolower($content, \"UTF-8\");\n\t\t$content = strip_tags($content);\n\n //updated in v0.3, 24 May 2009\n\t\t$punctuations = array(',', ')', '(', '.', \"'\", '\"',\n\t\t'<', '>', '!', '?', '/', '-',\n\t\t'_', '[', ']', ':', '+', '=', '#',\n\t\t'$', '"', '©', '>', '<', \n\t\t' ', '™', '®', ';', \n\t\tchr(10), chr(13), chr(9));\n\n\t\t$content = str_replace($punctuations, \" \", $content);\n\t\t// replace multiple gaps\n\t\t$content = preg_replace('/ {2,}/si', \" \", $content);\n\n\t\treturn $content;\n\t}",
"function filter( $str ){\r\n\t\treturn addslashes( $str );\r\n\t}",
"function xml_special_char($t_data){\n\n if(preg_match(\"/\\\"/\", $t_data)) str_replace(\"\\\"\", \""\", $t_data);\n elseif(preg_match(\"/'/\", $t_data)) str_replace(\"\\'\", \""\", $t_data);\n elseif(preg_match(\"/&/\", $t_data)) str_replace(\"&\", \"&\", $t_data);\n elseif(preg_match(\"/</\", $t_data)) str_replace(\"<\", \"<\", $t_data);\n elseif(preg_match(\"/>/\", $t_data)) str_replace(\">\", \">\", $t_data);\n\n return $t_data;\n }",
"function ab_removeEnts($s){ // reformat all entities so WP won't screw with them\n\treturn preg_replace('|&([0-9a-zA-Z#]{1,5});|', '__abENT__$1;', $s);\n}",
"function caracteresImp($text){\n // purposes\n //echo $text;\n $search = array('á','é','í','ó','ú','Ñ','?','ñ','°','Á','É','Í','Ó','Ú');\n // $search = array('','','','','','','?');\n $replace = array('á','é','í','ó','ú','Ñ','?','ñ','°','Á','É','Í','Ó','Ú');\n //Ñ\n //$tempcaract=str_replace($search,$replace,$text);\n //echo $tempcaract;\n return str_replace($search,$replace,$text);\n\n \n}",
"function special_chars($text){\n if(strpos($text, '&') !== false){\n $text = str_replace(\"&\", \"&\", $text);\n }\n if(strpos($text, '<') !== false){\n $text = str_replace(\"<\", \"<\", $text);\n }\n if(strpos($text, '>') !== false){\n $text = str_replace(\">\", \">\", $text);\n }\n return $text;\n }",
"function mswRemoveDoubleApostrophes($data) {\n return str_replace(\"''\",\"'\",$data);\n}",
"function remove_allpuncutation($text)\n{\n\t$otext = $text;\n\t$text = preg_replace('/[^a-zA-Z0-9|+|-|\\*|Š|š|Ž|ž|À|Á|Â|Ã|Ä|Å|Æ|Ç|È|É|Ê|Ë|Ì|Í|Î|Ï|Ñ|Ò|Ó|Ô|Õ|Ö|Ø|Ù|Ú|Û|Ü|Ý|Þ|ß|à|á|â|ã|ä|å|æ|ç|è|é|ê|ë|ì|í|î|ï|ð|ñ|ò|ó|ô|õ|ö|ø|ù|ú|û|ý|þ|ÿ]/is', ' ', $text);\n\t\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",3);\n\t\n\treturn $text;\n}",
"protected function replaceSpecialChars($value)\r\n\t{\r\n//\t\techo \"$value: \" . preg_replace('/[-]/', '_', $value) . \"\\n\";\r\n\t\treturn preg_replace('/[-]/', '_', $value); //Convert non-word characters, hyphens and dots to underscores\r\n\t}",
"private function removeSpecialCharacters(string $table): string\n {\n return (string) preg_replace('/[^a-zA-Z0-9_]/', '_', $table);\n }",
"function removeUnnecessaryCharas($string)\n{\n return preg_replace('~\\s+~s', '', $string);\n}",
"function Strip($value)\n{\n\t$value = StripGPC($value);\n\t$value = str_replace(\"\\\"\",\"'\",$value);\n\t$value = preg_replace('/[[:cntrl:][:space:]]+/',\" \",$value);\t// zap all control chars and multiple blanks\n\treturn ($value);\n}",
"function phpTrafficA_cleanTextNoAmp($text) {\n$text = str_replace(\"\\'\", \"'\", $text);\n$text = str_replace(\"'\", \"'\", $text);\n$text = str_replace(\"\\\"\", \""\", $text);\n$text = str_replace(\"\\\\\\\"\", \""\", $text);\n$text = str_replace(\"\\\\\", \"\\", $text);\n$text = str_replace(\"\\\\\\\\\", \"\\", $text);\n$text = str_replace(\"\\n\", \"\", $text);\n$text = str_replace(\"\\r\", \"\", $text);\n$text = str_replace(\"<\", \"<\", $text);\n$text = str_replace(\">\", \">\", $text);\nreturn $text;\n}",
"function normalize_special_characters($str, $unwanted=false) {\n \n\t# Quotes cleanup\n\t$str = str_replace(chr(ord(\"`\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"„\")), \",\", $str);\n\t$str = str_replace(chr(ord(\"`\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"“\")), \"\\\"\", $str);\n\t$str = str_replace(chr(ord(\"”\")), \"\\\"\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\n\t$unwanted_array = array('Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y');\n\tif($unwanted)\n \t$str = strtr($str, $unwanted_array);\n\n\t# Bullets, dashes, and trademarks\n\t$str = str_replace(chr(149), \"•\", $str);\t# bullet •\n\t$str = str_replace(chr(150), \"–\", $str);\t# en dash\n\t$str = str_replace(chr(151), \"—\", $str);\t# em dash\n\t$str = str_replace(chr(153), \"™\", $str);\t# trademark\n\t$str = str_replace(chr(169), \"©\", $str);\t# copyright mark\n\t$str = str_replace(chr(174), \"®\", $str);\t# registration mark\n\n\treturn $str;\n}",
"function ChangeToSpecialChar($vTitle) {\r\n $rs_catname = $vTitle;\r\n $spstr = \"¡#¢#£#¥#§#¨#©#«#¬#®#°#±#´#µ#¶##·#¸#»#¿#À#Á#Â#Ã#Ä#Å#Æ#Ç#È#É#Ê#Ë#Ì#Í#Î#Ï#Ñ#Ò#Ó#Ô#Ö#Ø#Ù#Ú#Û#Ü#ß#à#á#ã#â#ã#ä#å#æ#ç#è#é#ê#ë#ì#í#î#ï#ñ#ò#ó#ô#õ#ö#÷#ø#ù#ú#û#ü#ÿ#‚#ƒ#„#…#†#‡#ˆ#‰#‹#Œ#‘#‘#’#“#”#•#–#—#˜#™#›#œ#Ÿ\";\r\n $toReplaceStr = \"�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�\";\r\n $spArr = @explode(\"#\", $spstr);\r\n $tospArr = @explode(\"#\", $toReplaceStr);\r\n\r\n $i = 0;\r\n foreach ($spArr as $arr) {\r\n $rs_catname = str_replace($arr, $tospArr[$i], $rs_catname);\r\n $i++;\r\n }\r\n //print_r($rs_catname);exit;\r\n //$rs_catname = str_replace(\" \",\"-\",str_replace(\"&\",\"and\",$rs_catname));\r\n return $rs_catname;\r\n}",
"function remove_puncutation($text)\n{\t\n\t$otext = $text;\n\t$text = preg_replace('/[^a-zA-Z0-9|+|-|*|\\/|\\.|?|!|Š|š|Ž|ž|À|Á|Â|Ã|Ä|Å|Æ|Ç|È|É|Ê|Ë|Ì|Í|Î|Ï|Ñ|Ò|Ó|Ô|Õ|Ö|Ø|Ù|Ú|Û|Ü|Ý|Þ|ß|à|á|â|ã|ä|å|æ|ç|è|é|ê|ë|ì| í|î|ï|ð|ñ|ò|ó|ô|õ|ö|ø|ù|ú|û|ý|þ|ÿ]/i', ' ', $text);\n\t\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",3);\n\t\n\treturn $text;\n}",
"function filter_user_text($str) {\r\n\tif (!$str) return '';\r\n\r\n\t$str = preg_replace('/(\\r?\\n)+/', ' ', $str);\r\n\t$str = preg_replace('/\\s+/', ' ', $str);\r\n\t$str = str_replace('\"', '\\\"', $str);\r\n//\t$str = str_replace(\"'\", \"\\'\", $str);\r\n\t\r\n\treturn $str;\r\n}",
"public function removeSpecialChars(string $parameter): string\n {\n return preg_replace('#/|{|}#', '', $parameter);\n }",
"public function getUnicodeReplace();",
"public static function removeUnescapedChar($str)\n {\n $string = str_replace(array('<', '>', '&', '{', '}', '*', '/', '(', '[', ']', '@', '!', ')', '&', '*', '#', '$', '%', '^', '|', '?', '+', '=', '\"', ','), array(''), $str);\n $encoding = mb_detect_encoding($string);\n $result = utf8_encode($string);\n if ($encoding == \"UTF-8\" && mb_check_encoding($string, \"UTF-8\")) {\n $result = $string;\n }\n return $result;\n }",
"function clearText(String $text) { \n $comAcentos = array('à', 'á', 'â', 'ã', 'ä', 'å', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ü', 'ú', 'ÿ', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'O', 'Ù', 'Ü', 'Ú');\n $semAcentos = array('a', 'a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'y', 'A', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'N', 'O', 'O', 'O', 'O', 'O', '0', 'U', 'U', 'U');\n return str_replace($comAcentos, $semAcentos, $text);\n }",
"function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}",
"function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}",
"function cleanText($text)\n{\n\t$text = strtolower($text);\n\t//$text = iconv('utf-8', 'ascii//TRANSLIT', $text);\n\t$text = preg_replace(\"/&([a-z])[a-z]+;/i\", \"$1\", htmlentities($text));\n\t$text = preg_replace(\"#[[:punct:]]#\", \"\", $text);\n\treturn ($text);\n}",
"function txt_UNhtmlspecialchars($t=\"\")\n\t{\n\t\t$t = str_replace( \"&\" , \"&\", $t );\n\t\t$t = str_replace( \"<\" , \"<\", $t );\n\t\t$t = str_replace( \">\" , \">\", $t );\n\t\t$t = str_replace( \""\", '\"', $t );\n\t\t$t = str_replace( \"'\", \"'\", $t );\n\t\t\n\t\treturn $t;\n\t}",
"function escape($content = null) {\n return Sanitize::stripAll($content);\n }",
"function phpTrafficA_cleanTextBasic($text) {\n$text = str_replace(\"\\'\", \"'\", $text);\n$text = str_replace(\"'\", \"'\", $text);\n$text = str_replace(\"\\\"\", \""\", $text);\n$text = str_replace(\"\\\\\\\"\", \""\", $text);\n$text = str_replace(\"\\\\\", \"\\", $text);\n$text = str_replace(\"\\\\\\\\\", \"\\", $text);\n$text = str_replace(\"\\n\", \"\", $text);\n$text = str_replace(\"\\r\", \"\", $text);\n$text = str_replace(\"<\", \"<\", $text);\n$text = str_replace(\">\", \">\", $text);\nreturn $text;\n}",
"function remove_ill($str)\r\n {\r\n\t\treturn (!get_magic_quotes_gpc() ? addslashes(trim($str)) : trim($str));\r\n }",
"public static function replaceSpecialChars($_input, $_replaceWhitespace = true)\n {\n $search = array('ä', 'ü', 'ö', 'ß', 'é', 'è', 'ê', 'ó' ,'ô', 'á', 'ź', 'Ä', 'Ü', 'Ö', 'É', 'È', 'Ê', 'Ó' ,'Ô', 'Á', 'Ź');\n $replace = array('ae', 'ue', 'oe', 'ss', 'e', 'e', 'e', 'o', 'o', 'a', 'z', 'Ae', 'Ue', 'Oe', 'E', 'E', 'E', 'O', 'O', 'a', 'z');\n \n $output = str_replace($search, $replace, $_input);\n\n if ($_replaceWhitespace) {\n $pattern = '/[^a-zA-Z0-9._\\-]/';\n } else {\n $pattern = '/[^a-zA-Z0-9._\\-\\s]/';\n }\n return preg_replace($pattern, '', $output);\n }",
"function txt_form2raw($t=\"\")\n\t{\n\t\t$t = str_replace( \"$\", '$' , $t);\n\t\t$t = str_replace( \"\\", '\\\\', $t );\n\t\t\n\t\treturn $t;\n\t}",
"function strip_bad_chars( $input ) {\n $output = preg_replace( \"/[^a-zA-Z0-9_-]/\", \"\", $input );\n return $output;\n }",
"function mswConvertSmartQuotes($string) {\n return $string;\n //$search = array(chr(145),chr(146),chr(147),chr(148),chr(151));\n //$replace = array(\"'\",\"'\",'\"','\"','-');\n //return str_replace($search,$replace,$string);\n}",
"function entify_nonprinting_chars($text)\n{\n $text = str_replace(\"\\r\\n\", \"<br />\", $text);\n $text = str_replace(\"\\n\", \"<br />\", $text);\n $text = str_replace(\"\\r\", \"<br />\", $text); //unnecessary b/c of wordbreak, but included for completeness\n $text = str_replace(\"\\t\", \" \", $text);\n\n return $text;\n}",
"function clean_word_formatting($string){\n $search = array(chr(145), chr(146), chr(147), chr(148), chr(151));\n $replace = array(\"'\", \"'\", '\"', '\"', '-');\n return str_replace($search, $replace, $string);\n}",
"private function clearBoundaryString(string $str): string {\n return str_replace(['\"', '\\r', '\\n', \"\\n\", \"\\r\", \";\", \"\\s\"], \"\", $str);\n }",
"protected function removeSpecialChars($text)\n {\n $specialChars = [\n '.', ',', ';', '?', '!',\n '\"', '\\'', '\\\\', '<', '>',\n '(', ')', '_', '#', '@', '§',\n '€', '$', '®', '©', '◊', '~',\n ':', '°', '&', '≤', '%', '£',\n '0', '1', '2', '3', '4', '5',\n '6', '7', '8', '9', '‡', '{', '}',\n '[', ']'\n ];\n\n return str_replace($specialChars, '', $text);\n }",
"function clear($text) {\n\t$text = preg_replace('/\\s+/', ' ', $text);\n\t$text = trim($text);\n\t$text = addslashes($text);\n\treturn $text;\n}",
"function Strip_Bad_chars($input)\n{\n //$output = preg_replace(\"/[^a-zA-Z0-9_-]/\", \"\", $input);\n $output = preg_replace(\"/[^0-9]/\", \"\", $input);\n return $output;\n}",
"function init_code(&$code)\n\n{\n\n $code .= \"\\n\";\n\n \n\n // code not allowed to contain our special characters\n\n return ($code = strtr($code, array(\"\\x00\" => '', \"\\x01\" => '')));\n\n}",
"function remove_junk($string){\n /*Inserta un salto de linea por linea*/\n $string = nl2br($string);\n /*Traduccion de comilla doble y etiquetas*/\n $string = htmlspecialchars(strip_tags($string, ENT_QUOTES));\n return $string;\n}",
"function replace_curl($string){\n $string = str_replace(\"~\", \"'\", $string);\n return $string;\n}",
"function lwreplace($lwchar){\n return(str_replace(' ','',$lwchar));\n}",
"function filter_chars($str) {\n\treturn preg_replace(\"/[^A-Za-z0-9_]*/\", \"\", $str);\n}",
"function txt_stripslashes($t)\n\t{\n\t\tif ( $this->get_magic_quotes )\n\t\t{\n \t\t$t = stripslashes($t);\n \t\t$t = preg_replace( \"/\\\\\\(?!&#|\\?#)/\", \"\\", $t );\n \t}\n \t\n \treturn $t;\n }",
"function scrub($str) {\n\t$str = preg_replace('/[^A-Za-z0-9]/','',$str);\n\treturn $str;\n}",
"function cleanTitleString($string)\n{\n $count = count($string);\n\n for ($i=0; $i < $count; ++$i)\n {\n if ($string[$i] == '\\'')\n $string[$i] = '%';\n }\n\n return $string;\n}",
"private static function stripIllegalChars()\n {\n $input_arr = array();\n foreach ($_POST as $key => $input_arr)\n {\n $_POST[$key] = preg_replace(\"/[^a-zA-Z0-9\\s!@#$%&*()_\\-=+?.,:\\/]/\", \"\", $input_arr);\n }\n }",
"function sanitize_null_character($param) {\n\treturn input_filter($param);\n}",
"function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}",
"function convert_smart_quotes($string) {\r\n \t$search = array(chr(212),chr(213),chr(210),chr(211),chr(209),chr(208),chr(201),chr(145),chr(146),chr(147),chr(148),chr(151),chr(150),chr(133));\r\n\t$replace = array('‘','’','“','”','–','—','…','‘','’','“','”','–','—','…');\r\n return str_replace($search, $replace, $string); \r\n}",
"function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }",
"function doMkCharacter ($string)\n{\n return preg_replace ('/[^a-zA-Z0-9\\-_:\\.=;]/i', '', trim (substr ($string, 0, 35)));\n}",
"function preclean($dirtyString){\n\t\t//1. removes any bad characters\n\t\t//2. trims whitespace\n\n\t\treturn ereg_replace(\"[^A-Za-z0-9-]\", \"\", trim($dirtyString));\n\t}",
"function remover_caracter($string) {\n\t\t $string = preg_replace(\"/[áàâãä]/\", \"a\", $string);\n\t\t $string = preg_replace(\"/[ÁÀÂÃÄ]/\", \"A\", $string);\n\t\t $string = preg_replace(\"/[éèê]/\", \"e\", $string);\n\t\t $string = preg_replace(\"/[ÉÈÊ]/\", \"E\", $string);\n\t\t $string = preg_replace(\"/[íì]/\", \"i\", $string);\n\t\t $string = preg_replace(\"/[ÍÌ]/\", \"I\", $string);\n\t\t $string = preg_replace(\"/[óòôõö]/\", \"o\", $string);\n\t\t $string = preg_replace(\"/[ÓÒÔÕÖ]/\", \"O\", $string);\n\t\t $string = preg_replace(\"/[úùü]/\", \"u\", $string);\n\t\t $string = preg_replace(\"/[ÚÙÜ]/\", \"U\", $string);\n\t\t $string = preg_replace(\"/ç/\", \"c\", $string);\n\t\t $string = preg_replace(\"/Ç/\", \"C\", $string);\n\t\t $string = preg_replace(\"/[][><}{)(:;,!?*%~^`&#@]/\", \"\", $string);\n\t\t //$string = preg_replace(\"/ /\", \"_\", $string);\n\t\t return $string;\n\t\t}",
"function parseCleanValue($v){\r\n\t\tif($v == \"\"){\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t$v = str_replace(\" \", \" \", $v);\r\n\t\t$v = str_replace(\"&\" , \"&\" , $v);\r\n\t\t$v = str_replace(\"<!--\" , \"<!--\" , $v);\r\n\t\t$v = str_replace(\"-->\" , \"-->\" , $v);\r\n\t\t$v = preg_replace(\"/<script/i\" , \"<script\" , $v);\r\n\t\t$v = str_replace(\">\" , \">\" , $v);\r\n\t\t$v = str_replace(\"<\" , \"<\" , $v);\r\n\t\t$v = str_replace(\"\\\"\" , \""\" , $v);\r\n\t\t$v = preg_replace(\"/\\n/\" , \"<br />\" , $v); // Convert literal newlines\r\n\t\t$v = preg_replace(\"/\\\\\\$/\" , \"$\" , $v);\r\n\t\t$v = preg_replace(\"/\\r/\" , \"\" , $v); // Remove literal carriage returns\r\n\t\t$v = str_replace(\"!\" , \"!\" , $v);\r\n\t\t$v = str_replace(\"'\" , \"'\" , $v); // IMPORTANT: It helps to increase sql query safety.\r\n\t\t// Ensure unicode chars are OK\r\n\t\t$v = preg_replace(\"/&#([0-9]+);/s\", \"&#\\\\1;\", $v);\r\n\t\t// Strip slashes if not already done so.\r\n\t\tif($this->get_magic_quotes){\r\n\t\t\t$v = stripslashes($v);\r\n\t\t}\r\n\t\t// Swap user entered backslashes\r\n\t\t$v = preg_replace(\"/\\\\\\(?!&#|\\?#)/\", \"\\", $v);\r\n\t\treturn $v;\r\n\t}",
"function clean_str( $text )\n\t{ // tomreyn says: I'm afraid this function is more likely to cause to trouble than to fix stuff (you have mysql escaping and html escaping elsewhere where it makes more sense, but strip off < and > here already, but then you don't filter non-visible bytes here)\n\t\t//$text=strtolower($text);\n\t\t//$code_entities_match = array('!','@','#','$','%','^','&','*','(',')','_','+','{','}','|','\"','<','>','?','[',']','\\\\',';',\"'\",',','/','*','+','~','`','=');\n\t\t//$code_entities_replace = array('','','','','','','','','','','','','','','','','','','','','');\n\t\t$code_entities_match = array('$','%','^','&','_','+','{','}','|','\"','<','>','?','[',']','\\\\',';',\"'\",'/','+','~','`','=');\n\t\t$code_entities_replace = array('','','','','','','','','','','','','');\n \n\t\t$text = str_replace( $code_entities_match, $code_entities_replace, $text );\n\t\treturn $text;\n\t}",
"function phpTrafficA_cleanText($text) {\n$text = str_replace(\"&\", \"&\", $text);\n$text = str_replace(\"\\'\", \"'\", $text);\n$text = str_replace(\"'\", \"'\", $text);\n$text = str_replace(\"\\\"\", \""\", $text);\n$text = str_replace(\"\\\\\\\"\", \""\", $text);\n$text = str_replace(\"\\\\\", \"\\", $text);\n$text = str_replace(\"\\\\\\\\\", \"\\", $text);\n$text = str_replace(\"\\n\", \"\", $text);\n$text = str_replace(\"\\r\", \"\", $text);\n$text = str_replace(\"<\", \"<\", $text);\n$text = str_replace(\">\", \">\", $text);\nreturn $text;\n}",
"public static function replaceIllegalChars($value) {\n\t\t$replace_pairs = array(\n\t\t\t\t\"\\t\" => ' ',\n\t\t\t\t\"\\x0B\" => ' ',\n\t\t\t\t\"\\r\" => ' ',\n\t\t\t\t\"\\r\\n\" => ' ',\n\t\t\t\t\"\\n\" => ' '\n\t\t);\n\t\treturn html_entity_decode(filter_var(strtr($value, $replace_pairs), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH));\n\t}",
"function parse_clean_value($val)\n {\n \tif ( $val == \"\" )\n \t{\n \t\treturn \"\";\n \t}\n \n \t$val = str_replace( \" \", \" \", $this->txt_stripslashes($val) );\n \t\n \tif ( isset($this->vars['strip_space_chr']) AND $this->vars['strip_space_chr'] )\n \t{\n \t\t$val = str_replace( chr(0xCA), \"\", $val ); //Remove sneaky spaces\n \t}\n \t\n \t// As cool as this entity is...\n \t\n \t$val = str_replace( \"‮\"\t\t, ''\t\t\t , $val );\n \t\n \t$val = str_replace( \"&\"\t\t\t\t, \"&\" , $val );\n \t$val = str_replace( \"<!--\"\t\t\t, \"<!--\" , $val );\n \t$val = str_replace( \"-->\"\t\t\t, \"-->\" , $val );\n \t$val = preg_replace( \"/<script/i\"\t, \"<script\" , $val );\n \t$val = str_replace( \">\"\t\t\t\t, \">\" , $val );\n \t$val = str_replace( \"<\"\t\t\t\t, \"<\" , $val );\n \t$val = str_replace( '\"'\t\t\t\t, \""\" , $val );\n \t$val = str_replace( \"\\n\"\t\t\t, \"<br />\" , $val ); // Convert literal newlines\n \t$val = str_replace( \"$\"\t\t\t\t, \"$\" , $val );\n \t$val = str_replace( \"\\r\"\t\t\t, \"\" , $val ); // Remove literal carriage returns\n \t$val = str_replace( \"!\"\t\t\t\t, \"!\" , $val );\n \t$val = str_replace( \"'\"\t\t\t\t, \"'\" , $val ); // IMPORTANT: It helps to increase sql query safety.\n \t\n \t// Ensure unicode chars are OK\n \t\n \tif ( $this->allow_unicode )\n\t\t{\n\t\t\t$val = preg_replace(\"/&#([0-9]+);/s\", \"&#\\\\1;\", $val );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Try and fix up HTML entities with missing ;\n\t\t\t//-----------------------------------------\n\n\t\t\t$val = preg_replace( \"/&#(\\d+?)([^\\d;])/i\", \"&#\\\\1;\\\\2\", $val );\n\t\t}\n \t\n \treturn $val;\n }",
"function remake($s)\n{\n $s = str_replace(' ',' ',$s);\n $s = str_replace(\" \",' ',$s);\n $s = html_entity_decode(strip_tags($s,ENT_COMPAT));\n $s = str_replace(' ',' ',$s);\n $s = str_replace(\" \",' ',$s);\n return $s;\n}",
"public static function specialchars($string) {\n $sanitized=array(\n '\\\\' => '\\5c',\n '*' => '\\2a',\n '(' => '\\28',\n ')' => '\\29',\n \"\\x00\" => '\\00');\n \n return str_replace(array_keys($sanitized),array_values($sanitized),$string);\n }",
"public static function clearString(string $str)\n {\n return preg_replace(\"[^a-zA-Z0-9]\", \"\", $str);\n }",
"function search_strip_badchars($line) {\n// \n $line = str_replace(\".\", \" \", $line);\n $line = str_replace(\"\\\"\", \" \", $line);\n $line = str_replace(\"'\", \"\", $line);\n $line = str_replace(\"+\", \" \", $line);\n $line = str_replace(\"-\", \" \", $line);\n $line = str_replace(\"*\", \" \", $line);\n $line = str_replace(\"/\", \" \", $line);\n $line = str_replace(\"!\", \" \", $line);\n $line = str_replace(\"%\", \" \", $line);\n $line = str_replace(\">\", \" \", $line);\n $line = str_replace(\"<\", \" \", $line);\n $line = str_replace(\"^\", \" \", $line);\n $line = str_replace(\"(\", \" \", $line);\n $line = str_replace(\")\", \" \", $line);\n $line = str_replace(\"[\", \" \", $line);\n $line = str_replace(\"]\", \" \", $line);\n $line = str_replace(\"{\", \" \", $line);\n $line = str_replace(\"}\", \" \", $line);\n $line = str_replace(\"\\\\\", \" \", $line);\n $line = str_replace(\"=\", \" \", $line);\n $line = str_replace(\"$\", \" \", $line);\n $line = str_replace(\"#\", \" \", $line);\n $line = str_replace(\"?\", \" \", $line);\n $line = str_replace(\"~\", \" \", $line);\n $line = str_replace(\":\", \" \", $line);\n $line = str_replace(\"_\", \" \", $line);\n $line = str_replace(\" \", \" \", $line);\n $line = str_replace(\"&\", \" \", $line);\n $line = str_replace(\"©\", \" \", $line);\n $line = str_replace(\" \", \" \", $line);\n $line = str_replace(\""\", \" \", $line);\n $line = str_replace(\"&\", \" \", $line);\n $line = str_replace(\";\", \" \", $line);\n $line = str_replace(\"\\n\", \" \", $line);\n return $line;\n}",
"public function cleanKeyFromUnicodeCharacters(string $key): string\n {\n return preg_replace('/&([a-z])[a-z]+;/i', '$1', htmlentities($key));\n }",
"function sa_sanitize_chars($filename) {\n return strtolower(preg_replace('/[^a-zA-Z0-9-_\\.]/', '', $filename));\n}",
"function filteralpha($s){\n return preg_replace(\"/[^: ()_\\-a-zA-Z0-9+]/\",\"\", $s);\n}",
"function trim_quotes_togg($data) {\n\t$data = preg_replace(\"/(^['\\\"]|['\\\"]$)/\", '', $data);\n\t\n\t\n\treturn $data;\n}",
"function replace($x) {\n\t$k1=array(' - ','ß','ä','ö','ü','Ä','Ö','Ü',' ',':','&','?','!','\"',',','.',\"\\'\",\"/\");\n\t$k2=array('-','ss','ae','oe','ue','ae','oe','ue','-','-','und','','','','','',\"\",\"-\");\n\tfor ($i='0';$i<count($k1);$i++) {$x = str_replace($k1[$i],$k2[$i],$x);}\n\treturn $x;\n}",
"function remove_junk($str){\n $str = nl2br($str);\n $str = htmlspecialchars(strip_tags($str, ENT_QUOTES));\n return $str;\n}",
"function clean($string) {\n\t$search = array('&', '\"', '\\'', '<', '>');\n\t$replace = array('&', '"', ''', '<', '>');\n\n\t$string = str_replace($search, $replace, $string);\n\treturn $string;\n}",
"function bwm_clean($s) {\r\n if (get_magic_quotes_gpc())\r\n return trim(stripslashes($s));\r\n return trim($s);\r\n}",
"public static function unsanitize($item) {\n $item = stripcslashes($item);\n $item = str_replace(\"'\", \"'\", $item);\n $item = str_replace(\">\", \">\", $item);\n $item = str_replace(\""\", \"\\\"\", $item);\n $item = str_replace(\"<\", \"<\", $item);\n return $item;\n }",
"function safeString($string)\n {\n return eregi_replace('[^[:alnum:] ]', '', $string);\n }",
"function RSC($txt){\n\t$txt = str_replace(\"'\",\"'\",$txt);\n\t$txt = str_replace(\"!\",\"!\",$txt);\n\t$txt = str_replace(\"’\",\"’\",$txt);\n\t$txt = str_replace(\"‘\",\"‘\",$txt);\n\t$txt = str_replace('“',\"“\",$txt);\n\t$txt = str_replace('”',\"”\",$txt);\n\n\treturn $txt;\n}",
"function cleanString($name) {\n\t\tif (isset($this->getvars[$name])){\n\t\t\t$val = $this->getvars[$name];\n\t\t} else {\n\t\t\t$val = @$this->postvars[$name];\n\t\t}\n\t\tif ($val == '') {\n\t\t\treturn '';\n\t\t}\n\t\tif (is_array($val)) {\n\t\t\tarray_walk_recursive($val, array('Cgn', 'removeCtrlChar'));\n\t\t} else {\n\t\t \tCgn::removeCtrlChar($val);\n\t\t\t$val = (string)$val;\n\t\t}\n\t\treturn $val;\n\n\t}"
] | [
"0.6958952",
"0.69503814",
"0.68559974",
"0.68270534",
"0.6685045",
"0.6652214",
"0.6621676",
"0.6616402",
"0.6613646",
"0.6613646",
"0.6549812",
"0.65081376",
"0.6500428",
"0.64832747",
"0.6465219",
"0.64422905",
"0.64230484",
"0.6421694",
"0.6406246",
"0.6404418",
"0.63776314",
"0.636344",
"0.6349165",
"0.63379574",
"0.62917924",
"0.6275526",
"0.62291265",
"0.6228733",
"0.62192774",
"0.6188981",
"0.6182847",
"0.6144791",
"0.61387235",
"0.6137061",
"0.6043842",
"0.6036231",
"0.60301715",
"0.60222554",
"0.602165",
"0.6020025",
"0.6009981",
"0.6006561",
"0.6004891",
"0.6001515",
"0.5989881",
"0.5989876",
"0.59866047",
"0.59866047",
"0.59752536",
"0.59581804",
"0.5952008",
"0.59498054",
"0.5948314",
"0.5946476",
"0.59458834",
"0.59350073",
"0.59220207",
"0.5919877",
"0.5907343",
"0.5896056",
"0.58873755",
"0.5887234",
"0.58790267",
"0.58743656",
"0.5868832",
"0.5866621",
"0.5866385",
"0.5851016",
"0.58469725",
"0.5838554",
"0.5831243",
"0.58289385",
"0.58230865",
"0.58178174",
"0.58126813",
"0.5806748",
"0.5805052",
"0.5798284",
"0.57959276",
"0.57926947",
"0.5782881",
"0.5782744",
"0.57780445",
"0.5774825",
"0.57691145",
"0.5766741",
"0.5756175",
"0.5753866",
"0.5751883",
"0.5747865",
"0.573785",
"0.5728821",
"0.5724166",
"0.57213837",
"0.5712013",
"0.5707138",
"0.5705791",
"0.57048506",
"0.56999755",
"0.5695177"
] | 0.6055213 | 34 |
Get Special Character from htmlentities of that character | function ChangeToSpecialChar($vTitle) {
$rs_catname = $vTitle;
$spstr = "¡#¢#£#¥#§#¨#©#«#¬#®#°#±#´#µ#¶##·#¸#»#¿#À#Á#Â#Ã#Ä#Å#Æ#Ç#È#É#Ê#Ë#Ì#Í#Î#Ï#Ñ#Ò#Ó#Ô#Ö#Ø#Ù#Ú#Û#Ü#ß#à#á#ã#â#ã#ä#å#æ#ç#è#é#ê#ë#ì#í#î#ï#ñ#ò#ó#ô#õ#ö#÷#ø#ù#ú#û#ü#ÿ#‚#ƒ#„#…#†#‡#ˆ#‰#‹#Œ#‘#‘#’#“#”#•#–#—#˜#™#›#œ#Ÿ";
$toReplaceStr = "�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�";
$spArr = @explode("#", $spstr);
$tospArr = @explode("#", $toReplaceStr);
$i = 0;
foreach ($spArr as $arr) {
$rs_catname = str_replace($arr, $tospArr[$i], $rs_catname);
$i++;
}
//print_r($rs_catname);exit;
//$rs_catname = str_replace(" ","-",str_replace("&","and",$rs_catname));
return $rs_catname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function specialCharsToHTML( $str )\n {\n $search = array(\n 'á', 'é', 'í', 'ó', 'ú',\n 'Á', 'É', 'Í', 'Ó', 'Ú',\n 'ñ', 'Ñ', '¿', '¡'\n );\n $replace = array(\n 'á', 'é', 'í', 'ó', 'ú',\n 'Á', 'É', 'Í', 'Ó', 'Ú',\n 'ñ', 'Ñ', '¿', '¡'\n );\n\n $str = str_replace($search, $replace, $str);\n return $str;\n }",
"function htmlspecialcharsbx($string, $flags = ENT_COMPAT)\r\n\t{\r\n\t\treturn htmlspecialchars($string, $flags, \"ISO-8859-1\");\r\n\t}",
"function he($str) {\n\t\treturn htmlentities($str, ENT_QUOTES, \"UTF-8\");\n\t}",
"function htmlspecialcharsbx($string, $flags = ENT_COMPAT)\n\t{\n\t\treturn htmlspecialchars($string, $flags, (defined(\"BX_UTF\") ? \"UTF-8\" : \"ISO-8859-1\"));\n\t}",
"function htmlSpecialChars( $text )\n\t{\n\t\t//return preg_replace(\"/&/i\", '&', htmlspecialchars($text, ENT_QUOTES));\n\t\treturn preg_replace(array(\"/&/i\", \"/ /i\"), array('&', '&nbsp;'), htmlspecialchars($text, ENT_QUOTES));\n\t}",
"function _wp_kses_decode_entities_chr($matches)\n {\n }",
"function e($string){\n\n return htmlentities($string,'UTF-8', ENT_QUOTES,false);\n\n\n\n\n\n}",
"function specialchars($text){\n\t\t$newtext = trim($text);\n\t\t$newtext = strip_tags($newtext);\n\t\t$newtext=htmlspecialchars(str_replace('\\\\', '', $newtext),ENT_QUOTES);\n\t\t$newtext=eregi_replace('&','&',$newtext);\n\t\t//$newtext=nl2br($newtext);\n\t\treturn $newtext;\n\t}",
"function string_html_specialchars( $p_string ) {\r\n\t# achumakov: @ added to avoid warning output in unsupported codepages\r\n\t# e.g. 8859-2, windows-1257, Korean, which are treated as 8859-1.\r\n\t# This is VERY important for Eastern European, Baltic and Korean languages\r\n\treturn preg_replace(\"/&(#[0-9]+|[a-z]+);/i\", \"&$1;\", @htmlspecialchars( $p_string, ENT_COMPAT, config_get('charset') ) );\r\n}",
"function special_chars($text){\n if(strpos($text, '&') !== false){\n $text = str_replace(\"&\", \"&\", $text);\n }\n if(strpos($text, '<') !== false){\n $text = str_replace(\"<\", \"<\", $text);\n }\n if(strpos($text, '>') !== false){\n $text = str_replace(\">\", \">\", $text);\n }\n return $text;\n }",
"function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n if ( $double_encode ) {\n $string = @htmlspecialchars( $string, $quote_style, $charset );\n } else {\n // Decode & into &\n $string = wp_specialchars_decode( $string, $quote_style );\n\n // Guarantee every &entity; is valid or re-encode the &\n $string = kses_normalize_entities( $string );\n\n // Now re-encode everything except &entity;\n $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n for ( $i = 0; $i < count( $string ); $i += 2 )\n $string[$i ] = @htmlspecialchars( $string[$i], $quote_style, 'UTF-8' );\n\n $string = implode( '', $string );\n }\n\n return $string;\n\n}",
"function encode_special_characters(string $html, bool $double_encoding = true, ?string $encoding = null): string\n{\n $encoding = Internal\\internal_encoding($encoding);\n\n return htmlspecialchars($html, ENT_QUOTES | ENT_HTML5 | ENT_SUBSTITUTE, $encoding, $double_encoding);\n}",
"function h( $s ) {\n return htmlspecialchars($s, ENT_QUOTES, 'utf-8');\n}",
"public function getQuoteChar();",
"function escp($text) {\r\n return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');\r\n}",
"function htmlentities2($text)\n {\n }",
"function convertHtmlEntities($str)\n{\n return htmlentities($str, ENT_QUOTES, \"UTF-8\");\n}",
"function e($string)\n{\n return htmlentities($string, null, 'UTF-8');\n}",
"public function htmlEntitiesToChars($str)\n {\n// if (mb_detect_encoding($str) == 'UTF-8'){\n// decode decimal HTML entities added by web browser\n $str = preg_replace('/&#\\d{2,5};/ue', \"\\$this->utf8_entity_decode('$0')\", $str);\n// decode hex HTML entities added by web browser\n $str = preg_replace('/&#x([a-fA-F0-7]{2,8});/ue', \"\\$this->utf8_entity_decode('&#'.hexdec('$1').';')\", $str ); \n// decode named characters\n $str = html_entity_decode($str, ENT_QUOTES, \"utf-8\");\n// echo $str.'<br />';\n// }\n return $str; \n }",
"function _htmlentities($str) \n {\n $transtab=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES);\n $transtab[chr(38)] = '&';\n return preg_replace(\"/&(?![A-Za-z]{0,4}\\w{2,3};|#[0-9]{2,5};)/\",\"&\" , strtr($str, $transtab));\n }",
"function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }",
"function removeHtmlAccentLigature($str) {\n $str = htmlentities($str, ENT_NOQUOTES, 'utf-8');\n $str = preg_replace('#&([A-Za-z])(?:acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml|space);#', '\\1', $str); // Supréssion accent passe 1 \n $str = preg_replace('#&([A-Za-z]{2})(?:lig);#', '\\1', $str); // Transformations des ligatures \n //echo \"Supression des accents HTML : $str<br>\";\n return $str;\n }",
"function decodespecialchars($str){\n\t$str = ereg_replace(\"\\n\",\"\\\\n\",$str);\n\t$str = ereg_replace(\"\\r\",\"\\\\r\",$str);\n\t$str=ereg_replace(\"'\",\"'\",$str);\n\t$str=ereg_replace(\"&\",\"&\",$str);\n\t$str=ereg_replace(\";\",\"\\;\",$str);\n\t$str=ereg_replace(\"#\",\"#\",$str);\n\t$str=ereg_replace(\""\",'\"',$str);\n\t$str=ereg_replace(\"'\",\"'\",$str);\n\t$str=ereg_replace(\":\",\":\",$str);\n\t$str=ereg_replace(\"/\",\"\\/\",$str);\n\t$str=ereg_replace(\"!\",\"!\",$str);\n\t$str=ereg_replace(\"?\",\"\\?\",$str);\n\t//special character\n\t$str=ereg_replace(\"‚\",\"�\",$str);\n\t$str=ereg_replace(\"ƒ\",\"�\",$str);\n\t$str=ereg_replace(\"„\",\"�\",$str);\n\t$str=ereg_replace(\"…\",\"�\",$str);\n\t$str=ereg_replace(\"†\",\"�\",$str);\n\t$str=ereg_replace(\"‡\",\"�\",$str);\n\t$str=ereg_replace(\"ˆ\",\"�\",$str);\n\t$str=ereg_replace(\"‰\",\"�\",$str);\n\t$str=ereg_replace(\"Š\",\"�\",$str);\n\t$str=ereg_replace(\"‹\",\"�\",$str);\n\t$str=ereg_replace(\"Œ\",\"�\",$str);\n\t$str=ereg_replace(\"‘\",\"�\",$str);\n\t$str=ereg_replace(\"’\",\"�\",$str);\n\t$str=ereg_replace(\"“\",\"�\",$str);\n\t$str=ereg_replace(\"”\",\"�\",$str);\n\t$str=ereg_replace(\"•\",\"�\",$str);\n\t$str=ereg_replace(\"–\",\"�\",$str);\n\t$str=ereg_replace(\"—\",\"�\",$str);\n\t$str=ereg_replace(\"˜\",\"�\",$str);\n\t$str=ereg_replace(\"™\",\"�\",$str);\n\t$str=ereg_replace(\"š\",\"�\",$str);\n\t$str=ereg_replace(\"›\",\"�\",$str);\n\t$str=ereg_replace(\"œ\",\"�\",$str);\n\t$str=ereg_replace(\"Ÿ\",\"�\",$str);\n\t$str=htmlspecialchars_decode($str);\n\treturn $str;\n}",
"function tep_decode_specialchars($string){\n $string=str_replace('>', '>', $string);\n $string=str_replace('<', '<', $string);\n $string=str_replace(''', \"'\", $string);\n $string=str_replace('"', \"\\\"\", $string);\n $string=str_replace('&', '&', $string);\n\n return $string;\n }",
"function h($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}",
"function safehtml($in) {\n return htmlentities($in,ENT_COMPAT,'UTF-8');\n}",
"public static function returnEscaped($input) {\r\n\t\t//htmlentities escapes all characters which have HTML character entity \r\n\t\t$escapedString = htmlentities($input, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE, 'ISO-8859-1', false);\r\n\t\treturn $escapedString;\r\n\t}",
"public function getEscapeCharacter()\n {\n return $this->escape_character;\n }",
"function wp_specialchars_decode($text, $quote_style = \\ENT_NOQUOTES)\n {\n }",
"function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {\n\t$string = (string) $string;\n\n\tif ( 0 === strlen( $string ) ) {\n\t\treturn '';\n\t}\n\n\t// Don't bother if there are no entities - saves a lot of processing\n\tif ( strpos( $string, '&' ) === false ) {\n\t\treturn $string;\n\t}\n\n\t// Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value\n\tif ( empty( $quote_style ) ) {\n\t\t$quote_style = ENT_NOQUOTES;\n\t} elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {\n\t\t$quote_style = ENT_QUOTES;\n\t}\n\n\t// More complete than get_html_translation_table( HTML_SPECIALCHARS )\n\t$single = array( ''' => '\\'', ''' => '\\'' );\n\t$single_preg = array( '/�*39;/' => ''', '/�*27;/i' => ''' );\n\t$double = array( '"' => '\"', '"' => '\"', '"' => '\"' );\n\t$double_preg = array( '/�*34;/' => '"', '/�*22;/i' => '"' );\n\t$others = array( '<' => '<', '<' => '<', '>' => '>', '>' => '>', '&' => '&', '&' => '&', '&' => '&' );\n\t$others_preg = array( '/�*60;/' => '<', '/�*62;/' => '>', '/�*38;/' => '&', '/�*26;/i' => '&' );\n\n\tif ( $quote_style === ENT_QUOTES ) {\n\t\t$translation = array_merge( $single, $double, $others );\n\t\t$translation_preg = array_merge( $single_preg, $double_preg, $others_preg );\n\t} elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) {\n\t\t$translation = array_merge( $double, $others );\n\t\t$translation_preg = array_merge( $double_preg, $others_preg );\n\t} elseif ( $quote_style === 'single' ) {\n\t\t$translation = array_merge( $single, $others );\n\t\t$translation_preg = array_merge( $single_preg, $others_preg );\n\t} elseif ( $quote_style === ENT_NOQUOTES ) {\n\t\t$translation = $others;\n\t\t$translation_preg = $others_preg;\n\t}\n\n\t// Remove zero padding on numeric entities\n\t$string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string );\n\n\t// Replace characters according to translation table\n\treturn strtr( $string, $translation );\n}",
"function sanitize_utf8($str){\n return htmlentities($str);\n }",
"function AviaSpecialCharacters()\n\t{\n\t\treturn avia_special_characters::instance();\n\t}",
"public function encodeOnly($string){\n $final = html_entity_decode($string);\n return $final;\n }",
"public static function specialchars($str, $double_encode = true) {\n\t\t// Force the string to be a string\n\t\t$str = (string) $str;\n\n\t\t// Do encode existing HTML entities (default)\n\t\tif ($double_encode === true) {\n\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n\t\t} else {\n\t\t\t// Do not encode existing HTML entities\n\t\t\t// From PHP 5.2.3 this functionality is built-in, otherwise use a regex\n\t\t\tif (version_compare(PHP_VERSION, '5.2.3', '>=')) {\n\t\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8', false);\n\t\t\t} else {\n\t\t\t\t$str = preg_replace('/&(?!(?:#\\d++|[a-z]++);)/ui', '&', $str);\n\t\t\t\t$str = str_replace(array('<', '>', '\\'', '\"'), array('<', '>', ''', '"'), $str);\n\t\t\t}\n\t\t}\n\n\t\treturn $str;\n\t}",
"function secu_txt($text) {\n return htmlentities(strip_tags($text), ENT_QUOTES, 'UTF-8');\n}",
"function htmlRemoveSpecialCharacters($input){\n\t\tfor($i=0; $i<strlen($input); $i++){\n\n\t\t\t$value = ord($input[$i]);\n\t\t\tif($value >= 48 && $value <= 57);\n\t\t\telseif ($value >= 65 && $value <= 90) ;\n\t\t\telseif ($value >= 97 && $value <= 122) ;\n\t\t\telseif ($value == 32) ;\n\t\t\telse{\n\t\t\t\t$input = substr($input, 0, $i) . '\\\\' . substr($input, $i);\n\t\t\t}\n\t\t}\n\t\techo $input;\n\t\treturn $input;\n\t}",
"function htmlchars($string = \"\")\n{\n return htmlspecialchars($string, ENT_QUOTES, \"UTF-8\");\n}",
"function h($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8');\n}",
"function h($string, $quote_style = ENT_COMPAT, $charset = 'ISO-8859-1'){\n return htmlentities($string, $quote_style, $charset);\n }",
"public static function specialchars($value) {\n\t\treturn htmlspecialchars($value, ENT_QUOTES, Config::get('application.encoding'), false);\n\t}",
"function escape($html) { return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\"); }",
"function ha($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_QUOTES | ENT_IGNORE, 'UTF-8');\n}",
"public static function specialchars($str, $double_encode = TRUE)\n\t{\n\t\t// Do encode existing HTML entities (default)\n\t\tif ($double_encode == TRUE)\n\t\t{\n\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Do not encode existing HTML entities\n\t\t\t// From PHP 5.2.3 this functionality is built-in, otherwise use a regex\n\t\t\tif (version_compare(PHP_VERSION, '5.2.3', '>='))\n\t\t\t{\n\t\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8', FALSE);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$str = preg_replace('/&(?!(?:#\\d+|[a-z]+);)/i', '&', $str);\n\t\t\t\t$str = str_replace(array('<', '>', '\\'', '\"'), array('<', '>', ''', '"'), $str);\n\t\t\t}\n\t\t}\n\n\t\treturn $str;\n\t}",
"function h($s) {\n return htmlspecialchars($s, ENT_QUOTES, 'UTF-8');\n}",
"function e(string $s): string\n{\n return htmlspecialchars($s, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');\n}",
"function ab_removeEnts($s){ // reformat all entities so WP won't screw with them\n\treturn preg_replace('|&([0-9a-zA-Z#]{1,5});|', '__abENT__$1;', $s);\n}",
"function esc($str) {\n return htmlEnt($str);\n}",
"function xml_special_char($t_data){\n\n if(preg_match(\"/\\\"/\", $t_data)) str_replace(\"\\\"\", \""\", $t_data);\n elseif(preg_match(\"/'/\", $t_data)) str_replace(\"\\'\", \""\", $t_data);\n elseif(preg_match(\"/&/\", $t_data)) str_replace(\"&\", \"&\", $t_data);\n elseif(preg_match(\"/</\", $t_data)) str_replace(\"<\", \"<\", $t_data);\n elseif(preg_match(\"/>/\", $t_data)) str_replace(\">\", \">\", $t_data);\n\n return $t_data;\n }",
"function decode_entities($text) {\n $text= html_entity_decode($text,ENT_QUOTES,\"ISO-8859-1\"); #NOTE: UTF-8 does not work!\n //$text= preg_replace_callback('/&#(\\d+);/',\"chr(\\\\1)\",$text); #decimal notation\n //$text= preg_replace_callback('/&#x([a-f0-9]+);/mei',\"chr(0x\\\\1)\",matches); #hex notation\n return $text;\n}",
"function convert_smart_quotes($string) {\r\n \t$search = array(chr(212),chr(213),chr(210),chr(211),chr(209),chr(208),chr(201),chr(145),chr(146),chr(147),chr(148),chr(151),chr(150),chr(133));\r\n\t$replace = array('‘','’','“','”','–','—','…','‘','’','“','”','–','—','…');\r\n return str_replace($search, $replace, $string); \r\n}",
"function string_html_entities( $p_string ) {\r\n\treturn htmlentities( $p_string, ENT_COMPAT, config_get('charset') );\r\n}",
"function txt_htmlspecialchars($t=\"\")\n\t{\n\t\t// Use forward look up to only convert & not {\n\t\t$t = preg_replace(\"/&(?!#[0-9]+;)/s\", '&', $t );\n\t\t$t = str_replace( \"<\", \"<\" , $t );\n\t\t$t = str_replace( \">\", \">\" , $t );\n\t\t$t = str_replace( '\"', \""\", $t );\n\t\t$t = str_replace( \"'\", ''', $t );\n\t\t\n\t\treturn $t; // A nice cup of?\n\t}",
"function xml_entities($text, $charset = 'UTF-8'){\n\t\t$xml_special_chars = array(\""\",\"&\",\"'\",\"<\",\">\");\n $text = htmlentities($text, ENT_COMPAT, $charset, false);\n\n $xml_special_char_regex = \"(?\";\n foreach($xml_special_chars as $key => $value){\n $xml_special_char_regex .= \"(?!$value)\";\n }\n $xml_special_char_regex .= \")\";\n \n $pattern = \"/$xml_special_char_regex&([a-zA-Z0-9]+;)/\";\n return preg_replace($pattern, '&${1}', $text);\n}",
"function secur($string){return htmlspecialchars($string, ENT_QUOTES|ENT_SUBSTITUTE);}",
"function normalize_special_characters($str, $unwanted=false) {\n \n\t# Quotes cleanup\n\t$str = str_replace(chr(ord(\"`\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"„\")), \",\", $str);\n\t$str = str_replace(chr(ord(\"`\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"“\")), \"\\\"\", $str);\n\t$str = str_replace(chr(ord(\"”\")), \"\\\"\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\n\t$unwanted_array = array('Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y');\n\tif($unwanted)\n \t$str = strtr($str, $unwanted_array);\n\n\t# Bullets, dashes, and trademarks\n\t$str = str_replace(chr(149), \"•\", $str);\t# bullet •\n\t$str = str_replace(chr(150), \"–\", $str);\t# en dash\n\t$str = str_replace(chr(151), \"—\", $str);\t# em dash\n\t$str = str_replace(chr(153), \"™\", $str);\t# trademark\n\t$str = str_replace(chr(169), \"©\", $str);\t# copyright mark\n\t$str = str_replace(chr(174), \"®\", $str);\t# registration mark\n\n\treturn $str;\n}",
"function uc2html($str) {\r\n $ret = '';\r\n\r\n if (function_exists(\"iconv\")) {\r\n $ret = iconv(\"UCS-2LE\",\"CP949\",$str);\r\n\r\n }\r\n else\r\n {\r\n for( $i=0; $i<strlen($str)/2; $i++ ) {\r\n $charcode = ord($str[$i*2])+256*ord($str[$i*2+1]);\r\n $ret .= '&#'.$charcode;\r\n }\r\n }\r\n return $ret;\r\n }",
"function escape($string) {\n\n return htmlentities($string, ENT_QUOTES, 'ISO-8859-15');\n}",
"function encode($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}",
"function protection($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}",
"public static function htmlSpecialChars($string, $flags = ENT_COMPAT, $encoding = null)\n\t{\n\t\tif (empty($encoding))\n\t\t{\n\t\t\t$encoding = Main\\Localization\\Translation::getCurrentEncoding();\n\t\t}\n\t\treturn \\htmlspecialchars($string, $flags, $encoding, true);\n\t}",
"public static function removeUnescapedChar($str)\n {\n $string = str_replace(array('<', '>', '&', '{', '}', '*', '/', '(', '[', ']', '@', '!', ')', '&', '*', '#', '$', '%', '^', '|', '?', '+', '=', '\"', ','), array(''), $str);\n $encoding = mb_detect_encoding($string);\n $result = utf8_encode($string);\n if ($encoding == \"UTF-8\" && mb_check_encoding($string, \"UTF-8\")) {\n $result = $string;\n }\n return $result;\n }",
"function replace_specials_characters($s) {\r\n\t\t\t//$s = mb_convert_encoding($s, 'UTF-8','');\r\n\t\t\t$s = preg_replace(\"/á|à|â|ã|ª/\",\"a\",$s);\r\n\t\t\t$s = preg_replace(\"/Á|À|Â|Ã/\",\"A\",$s);\r\n\t\t\t$s = preg_replace(\"/é|è|ê/\",\"e\",$s);\r\n\t\t\t$s = preg_replace(\"/É|È|Ê/\",\"E\",$s);\r\n\t\t\t$s = preg_replace(\"/í|ì|î/\",\"i\",$s);\r\n\t\t\t$s = preg_replace(\"/Í|Ì|Î/\",\"I\",$s);\r\n\t\t\t$s = preg_replace(\"/ó|ò|ô|õ|º/\",\"o\",$s);\r\n\t\t\t$s = preg_replace(\"/Ó|Ò|Ô|Õ/\",\"O\",$s);\r\n\t\t\t$s = preg_replace(\"/ú|ù|û/\",\"u\",$s);\r\n\t\t\t$s = preg_replace(\"/Ú|Ù|Û/\",\"U\",$s);\r\n\t\t\t$s = str_replace(array(\"ñ\", \"Ñ\"), array(\"n\", \"N\"), $s);\r\n\t\t\t$s = str_replace(array('ç', 'Ç'), array('c', 'C'), $s);\r\n\r\n\t\t\t//$s = str_replace(\" \",\"_\",$s);\r\n\t\t\t//$s = preg_replace('/[^a-zA-Z0-9_\\.-]/', '', $s);\r\n\t\t\treturn $s;\r\n\t\t}",
"private function dohtmlentities($string) {\r\n\r\n return htmlentities($string, ENT_QUOTES, \"UTF-8\");\r\n\r\n }",
"function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)\n\t{\n\t\treturn strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));\n\t}",
"public function getEscapeChar()\n {\n return $this->getProtected($this->db->dsql(), 'escape_char');\n }",
"protected static function filter_htmlencode($value)\n\t{\n\t\treturn filter_var($value, FILTER_SANITIZE_SPECIAL_CHARS); \n\t}",
"public function getQuoteCharacter()\n {\n return $this->quote_character;\n }",
"public function escape ($str) {\r\n\t\treturn htmlentities($str, ENT_QUOTES, 'utf-8');\r\n\t}",
"function ascii_to_text ($str)\n{\n\t# Empty string to build up.\n\t$new = '';\n\n\t# The pattern used in preg_match. Searches for &#<3 letters/numbers/mix of>;\n\t$pattern = '/&#([a-zA-Z0-9]+){1,3};/';\n\n\t# Match all occurences of pattern, and store in array $matches\n\tpreg_match_all($pattern, $str, $matches);\n\n\t# Traverse the $matches array, using chr() to convert them back.\n\tforeach ($matches[1] as $ascii)\n\t{\n\t\t$new .= chr($ascii);\n\t}\n\n\treturn $new;\n}",
"function unaccent_string($string) {\n if(strpos($string = htmlentities($string, ENT_QUOTES, 'UTF-8'), '&') !== false) {\n $string = html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string), ENT_QUOTES, 'UTF-8');\n }\n return $string;\n}",
"function wp_kses_normalize_entities2($matches)\n {\n }",
"function escape($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}",
"public function escapeTextData($str)\n {\n if (!$str) {\n return; \n }\n\n //It's the wild wild web... and people import stuff from everywhere \n //We've seen these things pop up... \n $str = preg_replace(\"/\\r|\\n|\\t|\\'|\\\"/\", \" \",$str);\n\n // get rid of existing entities else double-escape\n $str = html_entity_decode(stripslashes($str),ENT_QUOTES,'UTF-8');\n $str = $this->escapeNonLatin1($str); \n $ar = preg_split('/(?<!^)(?!$)/u', $str ); // return array of every multi-byte character\n $str2 = ''; \n foreach ($ar as $c){\n $o = ord($c); \n $charInBytes = strlen($c); \n\n # trash any remaining larger than 3 bytes or 1 byte and bellow 31 \n if ( $charInBytes < 3 && ($o > 31 || strlen($c) > 1) ) {\n $str2 .= $c; \n } \n else {\n error_log(\"invalid char o: $o - c:[$c]\");\n $str2 .= ' '; \n } \n } \n return trim($str2);\n }",
"function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}",
"function h($text){\n\treturn htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\n}",
"function wp_kses_normalize_entities3($matches)\n {\n }",
"function unconvertHTML($strInput)//Convert html special code to standart form\n{\n\t//$strInput = html_entity_decode($strInput);\n\t$strInput = str_replace('"', '\"', $strInput);\n\t$strInput = str_replace(\"'\", \"'\", $strInput);\n\treturn $strInput;\n}",
"function txt_UNhtmlspecialchars($t=\"\")\n\t{\n\t\t$t = str_replace( \"&\" , \"&\", $t );\n\t\t$t = str_replace( \"<\" , \"<\", $t );\n\t\t$t = str_replace( \">\" , \">\", $t );\n\t\t$t = str_replace( \""\", '\"', $t );\n\t\t$t = str_replace( \"'\", \"'\", $t );\n\t\t\n\t\treturn $t;\n\t}",
"function tarkista($s) {\n\t\n\t$etsi = array('#', '´', '%', '|', '--', '\\t');\n\t$korv = array('#', ''', '%', '|', '–', ' ');\n\n\t$s = htmlspecialchars($s);\n\t$s = trim(str_replace($etsi, $korv, $s));\n\t$s = stripslashes($s);\n\t$enc = mb_detect_encoding($s, 'UTF-8', true);\n\n\tif ($enc == 'UTF-8'){\n\t\treturn $s;\n\t} else {\n\t\treturn utf8_encode($s);\n\t}\n\t\n}",
"function f($t){\n\t$specialChars = array(\t'(r)'\t=> '®',\n\t\t\t\t\t\t\t'(R)'\t=> '®',\n\t\t\t\t\t\t\t'(c)'\t=> '©',\n\t\t\t\t\t\t\t'(C)'\t=> '©',\n\t\t\t\t\t\t\t'(tm)'\t=> '™',\n\t\t\t\t\t\t\t'(TM)'\t=> '™',\n\t\t\t\t\t\t\t'(>)'\t=> '›',\n\t\t\t\t\t\t\t'(>>)'\t=> '»');\n\tforeach($specialChars AS $key => $val) $t = str_replace($key,$val,stripslashes($t));\n\treturn $t;\n}",
"public static function string_sanitize($s) {\n $result = preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", html_entity_decode($s, ENT_QUOTES));\n return $result;\n }",
"function __($htmlText, $ent = 0) {\n if ( ! $ent ) $ent = ENT_COMPAT | ENT_HTML401;\n\n $matches = Array();\n $sep = '###HTMLTAG###';\n\n preg_match_all(\":</{0,1}[a-z]+[^>]*>:i\", $htmlText, $matches);\n\n $tmp = preg_replace(\":</{0,1}[a-z]+[^>]*>:i\", $sep, $htmlText);\n $tmp = explode($sep, $tmp);\n\n for ($i=0; $i<count($tmp); $i++)\n $tmp[$i] = htmlentities($tmp[$i], $ent, 'UTF-8', false);\n\n $tmp = join($sep, $tmp);\n\n for ($i=0; $i<count($matches[0]); $i++)\n $tmp = preg_replace(\":$sep:\", $matches[0][$i], $tmp, 1);\n\n return $tmp;\n}",
"function change_hunchar($text)\n{\n\t\n\t$text = htmlentities($text);\n\t\n\t$mit = array(\"í\", \"é\", \"á\", \"ú\", \"ő\", \"ü\", \"ö\", \"ű\", \"ó\", \"Í\", \"É\", \"Á\", \"Ú\", \"Ó\", \"Ü\", \"Ö\", \"Ű\", \"Ő\", \" \", \",\");\n\t$mire = array(\"i\", \"e\", \"a\", \"u\", \"o\", \"u\", \"o\", \"u\", \"o\", \"i\", \"e\", \"a\", \"u\", \"o\", \"u\", \"o\", \"u\", \"o\", \"_\", \"\");\n\t$szoveg = str_replace($mit, $mire, strtolower($text));\n\t\n\n\treturn $szoveg;\n}",
"function wp_kses_normalize_entities( $string, $context = 'html' ) {\n $string = str_replace( '&', '&', $string );\n \n // Change back the allowed entities in our list of allowed entities.\n if ( 'xml' === $context ) {\n $string = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_xml_named_entities', $string );\n } else {\n $string = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string );\n }\n $string = preg_replace_callback( '/&#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string );\n $string = preg_replace_callback( '/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string );\n \n return $string;\n}",
"function e($var){\n return trim(htmlentities($var,ENT_QUOTES,\"UTF-8\"));\n}",
"function atk_htmlentities($string, $quote_style=ENT_COMPAT, $charset=null)\n{\n\treturn atkString::htmlentities($string, $quote_style, $charset);\n}",
"function wp_kses_decode_entities($content)\n {\n }",
"public function htmlspecial($text) {\n // This converts single quote to '\n $tooltip = htmlspecialchars($text,ENT_QUOTES);\n // since the result is parsed again with xml_parser, and xml_parser\n // autoconverts (apparently) ' back to single quote,\n // and then generates a parse error if this single quote occurs\n // within an atribute value expresses as <x attr='y'> (i.e. y has a\n // single quote).\n // Because of this we change ' to ’ -- which xml_parser\n // apparently leaves unchanged, and generates no error.\n $tooltip = preg_replace('/'/','’',$tooltip);\n return $tooltip;\n}",
"function s2_htmlencode($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}",
"public function getUnicodeReplace();",
"private static function safe_charset($html) {\n\t//--\n\treturn SmartUnicode::html_entities($html);\n\t//--\n}",
"public function getStringQuotingCharacter(): CharacterInterface;",
"function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}",
"function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}",
"function entify($string) { \n /* used by /samuel/cv/, should leave tags as is and only convert chars */\n # echo \"<!-- $string -->\\n\";\n $from = array('/&/',\n '/å/', '/ä/', '/ö/',\n '/Å/', '/Ä/', '/Ö/',\n );\n $to = array('&',\n 'å', 'ä', 'ö',\n 'Å', 'Ä', 'Ö',\n );\n # echo \"<!-- $string -->\\n\";\n return preg_replace($from, $to, $string);\n }",
"public final function transform(string $content) : string\n {\n $content = htmlspecialchars_decode($content);\n return preg_replace('/(\\p{L}|\\p{Z})|\\p{C}/', '', $content);\n }",
"public function htmlspecial($text) {\n // First, use the php function to convert quotes to html entities:\n // This converts single quote to '\n $tooltip = htmlspecialchars($text,ENT_QUOTES);\n // since the result is parsed again with xml_parser, and xml_parser\n // autoconverts (apparently) ' back to single quote,\n // and then generates a parse error if this single quote occurs\n // within an atribute value expresses as <x attr='y'> (i.e. y has a\n // single quote).\n // Because of this we change ' to ’ -- which xml_parser\n // apparently leaves unchanged, and generates no error.\n $tooltip = preg_replace('/'/','’',$tooltip);\n return $tooltip;\n}",
"function remove_strange_chars($txt){\n\t\treturn(str_replace(array('<','>',\"'\",\";\",\"&\",\"\\\\\"),'',$txt));\n\t}",
"public function getAsciiReplace();",
"function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}",
"function txt_bbcode($var) {\n\n $txt = utf8_encode(html_entity_decode($var));\n\n return $txt;\n}"
] | [
"0.6947594",
"0.681536",
"0.6741272",
"0.6713604",
"0.66439146",
"0.6614129",
"0.6572494",
"0.6535862",
"0.6492173",
"0.6457078",
"0.64229894",
"0.6422246",
"0.6407662",
"0.6373916",
"0.6369826",
"0.63575757",
"0.63519675",
"0.63463295",
"0.6335674",
"0.6334063",
"0.6329216",
"0.6324987",
"0.632197",
"0.63061297",
"0.6289881",
"0.62853736",
"0.62805086",
"0.6269091",
"0.625977",
"0.62412024",
"0.6226209",
"0.6197966",
"0.619765",
"0.6189312",
"0.6179514",
"0.61739403",
"0.6171087",
"0.6167927",
"0.615863",
"0.6150991",
"0.6150264",
"0.6146749",
"0.6136361",
"0.6132959",
"0.6117488",
"0.6113839",
"0.6100464",
"0.60999143",
"0.6096724",
"0.6088366",
"0.60794175",
"0.6077121",
"0.606569",
"0.6055794",
"0.60370934",
"0.60253054",
"0.6015481",
"0.6010167",
"0.6009266",
"0.60089517",
"0.6005794",
"0.5996606",
"0.59877115",
"0.5987258",
"0.5974015",
"0.5961834",
"0.59374666",
"0.59325945",
"0.59315175",
"0.59272546",
"0.5925369",
"0.5917399",
"0.59144855",
"0.59140545",
"0.5913609",
"0.59120697",
"0.5910151",
"0.59092486",
"0.5902687",
"0.5900354",
"0.5885847",
"0.5884518",
"0.588333",
"0.58762616",
"0.5864432",
"0.5856768",
"0.58541363",
"0.5840478",
"0.58249843",
"0.582383",
"0.58185005",
"0.5802813",
"0.5802254",
"0.5802254",
"0.5798737",
"0.5791171",
"0.5788777",
"0.5784406",
"0.5772565",
"0.5772025",
"0.576072"
] | 0.0 | -1 |
replace given string to another in a string Used on restaurant detail page. | function FrontgetReplace($str, $frlp, $trlp) {
$reqstr = str_replace($frlp, $trlp, $str);
return $reqstr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function tpl_modifier_replace($string, $search, $replace)\r\n{\r\n\treturn str_replace($search, $replace, $string);\r\n}",
"function smarty_modifier_myreplace($string, $search) {\n\tif (count($search) > 0) {\n\t\t$newstring = strtr($string, $search);\n\t\treturn $newstring;\n\t} else {\n\t\treturn $string;\n\t}\n}",
"function stri_replace($find,$replace,$string)\n{\n if(!is_array($find))\n $find = array($find);\n \n if(!is_array($replace))\n {\n if(!is_array($find))\n $replace = array($replace);\n else\n {\n // this will duplicate the string into an array the size of $find\n $c = count($find);\n $rString = $replace;\n unset($replace);\n for ($i = 0; $i < $c; $i++)\n {\n $replace[$i] = $rString;\n }\n }\n }\n foreach($find as $fKey => $fItem)\n {\n $between = explode(strtolower($fItem),strtolower($string));\n $pos = 0;\n foreach($between as $bKey => $bItem)\n {\n $between[$bKey] = substr($string,$pos,strlen($bItem));\n $pos += strlen($bItem) + strlen($fItem);\n }\n $string = implode($replace[$fKey],$between);\n }\n return($string);\n}",
"function replace($str){\n $newstring=str_replace(\"/\",\" \", $str);\n return $newstring;\n\n }",
"protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }",
"protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }",
"function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}",
"function acf_str_replace($string = '', $search_replace = array())\n{\n}",
"public function stringReplace(){\n\t\t\t\treturn str_replace(\"WEB APPLICATION\",\"WEBSITE\",$this->sentence);\n\t\t\t}",
"function replace( $search, $replace ) {\n\treturn partial( 'str_replace', $search, $replace );\n}",
"function str_placeholder($replace, $string)\n {\n return str_replace(\n array_keys($replace),\n array_values($replace),\n $string\n );\n }",
"public function replace($key,$value,$string){\n\t\treturn str_replace(\"::$key::\",$value,$string);\n\t}",
"public function strreplace( $orig, $old, $new ) {\n\t\treturn \"REPLACE({$orig}, {$old}, {$new})\";\n\t}",
"function replace($p, $str){\n $p2 = __t($p)->map(function($x) use($str){return $str;});\n return $p2();\n }",
"function r($search, $replace, $subject) {\n\t\treturn str_replace($search, $replace, $subject);\n\t}",
"private function _str_replace($p_str){\n\t\t// $to = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');\n\n\t\t// $str = explode(',',str_replace($from, $to, $p_str));\n\n\t\t// return str_replace('/\\s+/', ' ', word_limiter($str[0],7,''));\n\t\treturn preg_replace('/\\s+/', ' ',$p_str);\n\t}",
"function replace($search,$replace){\n\t\tsettype($search,\"string\");\n\n\t\t// prevod StringBuffer na string\n\t\tif(is_object($replace)){\n\t\t\t$replace = $replace->toString();\n\t\t}\n\n\t\tfor($i=0;$i<sizeof($this->_Items);$i++){\n\t\t\t$this->_Items[$i]->replace($search,$replace);\n\t\t}\n\t}",
"public function contentStrReplace() {}",
"function changeA($v1)\n{\n//WARNING! DO NOT USE FOR EMAILS ! Function removes the @ sign and the fullstop!\n\n//\t$Cust_Addr = strtr($Cust_Addr, array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES))); //this baby does the trick!!!\n//\t$Cust_Addr = preg_replace('/\\s/u', '_', $Cust_Addr);//this baby also does the trick!!!\n\n//$html_reg = '/<+\\s*\\/*\\s*([A-Z][A-Z0-9]*)\\b[^>]*\\/*\\s*>+/i';\n//$v1 = htmlentities( preg_replace( $html_reg, '', $v1 ) );\n//echo \"<br>after htmlent:\".$v1.\"<br><br><br>\";\n$v1 = preg_replace(\"/'/\",\"_\",$v1);\n$v1 = preg_replace(\"/‘/\",\"_\",$v1);\n$v1 = preg_replace(\"/’/\",\"_\",$v1);\n$v1 = preg_replace(\"/&/\",\"and\",$v1);\n$v1 = preg_replace(\"/,/\",\"+\",$v1);\n$v1 = preg_replace(\"/…/\",\".\",$v1);\n$v1 = preg_replace(\"/…/\", '_', $v1);\n$v1 = str_replace(' ', '_', $v1);\n\n$v1 = preg_replace(\"/ /\",\"_\",$v1);\n$v1 = preg_replace(\"/ /\",\"_\",$v1);\n\n//$v1 = strtr($v1, array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES))); //this baby does the trick!!!\n\n$v1 = str_replace(\" \",\"_\",$v1);\n$v1 = str_replace(\" \",\"_\",$v1);\n\n//echo \"<br>afterstreplacec:\".$v1.\"<br><br><br>\";\n\n/*\n$old_pattern = array(\"/[^a-zA-Z0-9]/\", \"/_+/\", \"/_$/\");\n$new_pattern = array(\"_\", \"_\", \"\");\n$v2 = preg_replace($old_pattern, $new_pattern , $v1);\n//All characters but a to z, A to z and 0 to 9 are replaced by an underscore. Multiple connected underscores are reduced to a single underscore and trailing underscores are removed.\n*/\n$v2 = $v1;\nreturn $v2;\n}",
"protected static function replace_slug_in_string($input, $slug)\n {\n }",
"function str_a_replace($array, $string) {\n foreach ($array as $from => $to)\n $string = str_replace($from, $to, $string);\n \n return $string;\n}",
"function str_replace_first($from, $to, $content) {\n $from = '/' . preg_quote($from, '/') . '/';\n return preg_replace($from, $to, $content, 1);\n }",
"function replace_specialChar($vTitle) {\r\n $rs_catname = $vTitle;\r\n $spstr = \"�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�\";\r\n $spArr = @explode(\"#\", $spstr);\r\n $i = 0;\r\n foreach ($spArr as $arr) {\r\n $rs_catname = str_replace($arr, \"-\", $rs_catname);\r\n $i++;\r\n }\r\n //print_r($rs_catname);exit;\r\n $rs_catname = str_replace(\"#\", \"-\", $rs_catname);\r\n $rs_catname = str_replace(\" \", \"-\", str_replace(\"&\", \"and\", $rs_catname));\r\n return $rs_catname;\r\n}",
"function qoute_replacment($phrase){\r\n\t$find = array(\"\\’\", \"’\", \"\\‘\", \"‘\", \"\\'\", \"'\", \"—\", '\\”', '”', '\\“', '“', '\\\"', '\"',\"\\n\",\"\\r\",\"…\");\r\n\t//defince what to replace the find array with\r\n\t$replace = array(\"'\", \"'\", \"'\", \"'\", \"'\", \"'\", \"-\", \""\", \""\", \""\", \""\", \""\", \""\",\" \",\" \",\"...\");\r\n\t//html entities code incase you want that\r\n\t#$replace = array(\"'\", \"'\", \"'\", \"'\", \"'\", \"'\",\"—\", \""\", \""\", \""\", \""\", \""\", \""\");\r\n\t//do the replacing\r\n\t$newphrase = str_replace($find, $replace, $phrase);\r\n \t//return the replacing for output\r\n\treturn $newphrase;\r\n}",
"protected static function __replace(string $substring, string $replacement, string $str): string {\n\t\treturn str_replace($substring, $replacement, $str);\n\t}",
"function removeString($originalString, $subString, $replaceWith)\n{\n $newVal = str_replace($subString, $replaceWith, $originalString);\n return $newVal ? $newVal : $originalString;\n}",
"function replace($template,$_DICTIONARY){\n\t\tforeach ($_DICTIONARY as $clave=>$valor) {\n\t\t\t$template = str_replace('#'.$clave.'#', $valor, $template);\n\t\t}\t\t\n\t\treturn $template;\n\t}",
"function replace_curl($string){\n $string = str_replace(\"~\", \"'\", $string);\n return $string;\n}",
"function lynt_antispam_replace($field)\n {\n $replaced = str_replace('=\"comment\"', '=\"lynt-comment\"', $field);\n return $replaced;\n }",
"private function hello(){\n \techo str_replace(\"this\",\"that\",\"HELLO WORLD!!\");\n \t\t}",
"public static function stringrpl($r,$str){\n\t$temp = substr($str,6);\n\t$out1 = substr_replace($str,\"$r\",6);\n\t$out1 .= $temp;\n\t\n\t$temp = substr($out1,4);\n\t$out = substr_replace($out1,\"$r\",4);\n\t$out .= $temp;\n\treturn $out;\n}",
"function find_replace($request) {\r\n\r\n $content = $request['content'];\r\n $keywords = $request['keywords'];\r\n\r\n foreach ($keywords as $keyword) {\r\n $content = str_replace($keyword['find'], $keyword['replace'], $content);\r\n }\r\n\r\n return $content;\r\n}",
"function replace_en($string, $eventTitle=''){\n\t\t\t\treturn (empty($eventTitle))?\n\t\t\t\t\tstr_replace('[event-name]', \"<span class='eventName'>Event Name</span>\", $string):\n\t\t\t\t\tstr_replace('[event-name]', $eventTitle, $string);\n\t\t\t}",
"function str_replace_first($search, $replace, $subject)\n {\n return Str::replaceFirst($search, $replace, $subject);\n }",
"static function replace( $search, $replace, $str = null )\n {\n if ( is_array( $search ) && ! $str ) {\n return self::dictReplace( $search, $replace );\n } // end if is array and no str\n $str = str_replace($search, $replace, $str);\n return $str;\n }",
"function replace($search,$replace = null){\n\t\tif(is_array($search)){\n\t\t\t$_replaces_keys = array();\n\t\t\t$_replaces_values = array();\n\t\t\tforeach(array_keys($search) as $key){\n\t\t\t\t$_replaces_keys[] = $key;\n\t\t\t\t$_replaces_values[] = $search[$key];\n\t\t\t} \n\t\t\tif(sizeof($_replaces_keys)==0){\n\t\t\t\treturn $this;\n\t\t\t} \n\t\t\t$this->_String4 = str_replace($_replaces_keys,$_replaces_values,$this->_String4);\n\t\t\treturn $this;\n\t\t}\n\t\t$this->_String4 = str_replace($search,$replace,$this->_String4);\n\t\treturn $this;\n\t}",
"public function replace($search,$replace,$field='*',$table,$where_sql=''){\n\t\t$field=($field!='*'?\"`\".$field.\"`\":'*');// An field den einai * tote 8a ginei `field`\n\t\t$sql=\"SELECT `\".$table.\"`.\".$field.\" FROM `\".$table.\"` \".$where_sql.\" ;\";\n\t\t$queryr1=$this->query($sql);\n\t\t$rows=$this->fetch_all(MYSQL_NUM);\n\t\t\n\t\tfor($i=0;$i<count($rows);$i++){\n\t\t\tfor($j=0;$j<$this->qresult->field_count;$j++){\n\t\t\t\tif(isset($rows[$i][$j])){\n\t\t\t\t\tif(strpos($rows[$i][$j],$search)!==false){\n\t\t\t\t\t\t//echo $rows[$i][$j];\n\t\t\t\t\t\t//echo preg_replace('/'.$search.'/',$replace,$rows[$i][$j]);\n\t\t\t\t\t\t$output[$i][$this->qresult->fields[$j]['name']]=str_replace($search,$replace,$rows[$i][$j]);\n\t\t\t\t\t\t//echo $output[$i][$this->qresult->fields[$j]['name']];\n\t\t\t\t\t\t$sql=\"UPDATE `\".$this->qresult->fields[$j]['table'].\"` SET \".$this->qresult->fields[$j]['name'].\"='\".$output[$i][$this->qresult->fields[$j]['name']].\"' WHERE \".$this->qresult->fields[$j]['name'].\"= '\".$rows[$i][$j].\"'\";\n\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t$this->query($sql);\n\t\t\t\t\t\t$this->qresult=$queryr1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($search,$replace,$field,$table,$where_sql,$sql,$queryr1,$this->qresult);\n\t\treturn @$output;\n\t}",
"public static function alm_filters_replace_string($string = ''){\n if($string){\n \t$string = str_replace('alm_filter_', '', $string);\n\t\t\t\treturn $string;\n }\n }",
"function trataApostrofe($str){\n\t\t$result_subst = str_replace(\"\\'\", \"'\", $str);\n\t\t$result_subst = str_replace(\"'\", \"\\'\", $result_subst);\n\t\treturn $result_subst;\n\t}",
"protected function _prepareString($str)\r\n {\r\n $url = Mage::getBaseUrl();\r\n $url = str_replace('/index.php', '', $url);\r\n\r\n $str = str_replace('/index.php', '', $str);\r\n\r\n return str_replace($url, 'http://example.com/', $str);\r\n }",
"function slug($string, $spaceRepl = \"-\") {\n\t $string = str_replace(\"&\", \"and\", $string);\n\t\n\t // Delete any chars but letters, numbers, spaces and _, -\n\t $string = preg_replace(\"/[^a-zA-Z0-9 _-]/\", \"\", $string);\n\t\n\t // Optional: Make the string lowercase\n\t $string = strtolower($string);\n\t\n\t // Optional: Delete double spaces\n\t $string = preg_replace(\"/[ ]+/\", \" \", $string);\n\t\n\t // Replace spaces with replacement\n\t $string = str_replace(\" \", $spaceRepl, $string);\n\t\n\t return $string;\n\t}",
"private function _substitute_variable($text, $variable, $object, $function)\n\t{\n\t\tif (strstr($text, $variable))\n\t\t{\n\t\t\t$value = call_user_func(array($object, $function));\n\t\t\t$text = str_replace($variable, $value, $text);\n\t\t}\n\t\treturn $text;\n\t}",
"public function slug($string, $replacement = '_');",
"function str_replace_from_offset($search, $replace, $subject, $count = -1, $offset = 0) {\r\n\t\t$substr = substr($subject, $offset);\r\n\t\t$substr = str_replace($search, $replace, $substr, $count);\r\n\t\t$subject = substr($subject, 0, $offset) . $substr;\r\n\t\treturn $subject;\r\n\t}",
"function our_str_replace($find, &$replacements, $subject)\n\n{\n\n $l = strlen($find);\n\n // allocate some memory\n\n $new_subject = str_repeat(' ', strlen($subject));\n\n $new_subject = '';\n\n foreach($replacements as $r)\n\n {\n\n if(($pos = strpos($subject, $find)) === false) break;\n\n $new_subject .= substr($subject, 0, $pos).$r;\n\n $subject = substr($subject, $pos+$l);\n\n // the above appears to be the fastest method\n\n //$subject = substr_replace($subject, $r, $pos, $l);\n\n //$subject = substr($subject, 0, $pos).$r.substr($subject, $pos+strlen($find));\n\n }\n\n $new_subject .= $subject;\n\n return $new_subject;\n\n}",
"public function replaceInline($string)\n\t{\n\t\t$string = $this->replaceInlineCode($string);\n\t\t$string = $this->replaceAnchors($string);\n\t\t$string = $this->replaceImages($string);\n\t\t$string = $this->replaceStrongEmphasis($string);\n\n\t\t// Take care of \"hard\" breaks\n\t\t$string = preg_replace('/ {2,}\\n/', \"<br />\\n\", $string);\n\n\t\t// Replace escaped characters\n\t\t$string = str_replace(array_keys($this->specialTable), $this->specialTable, $string);\n\n\t\treturn $string;\n\t}",
"function first_str_replace($haystack, $needle, $replace) {\n\t$pos = strpos($haystack, $needle);\n\tif ($pos !== false) return substr_replace($haystack, $replace, $pos, strlen($needle));\n\treturn $haystack;\n}",
"function replace_string_in_file($filename, $string_to_replace, $replace_with){\n \n $content=file_get_contents($filename);\n $content_chunks=explode($string_to_replace, $content);\n $content=implode($replace_with, $content_chunks);\n file_put_contents($filename, $content);\n \n }",
"function str_lreplace($search, $replace, $subject)\r\n{\r\n $pos = strrpos($subject, $search);\r\n if ($pos !== false) {\r\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\r\n }\r\n return $subject;\r\n}",
"public function testReplace1()\n {\n $this->assertEquals(Str::replace('foo', 'oo', 'yy'), 'fyy');\n }",
"function strReplaceFirst($from, $to, $subject) {\n\t\t$from = '/'.preg_quote($from, '/').'/';\n\t\treturn preg_replace($from, $to, $subject, 1);\n\t}",
"private function rep($var) {\r\n $search[] = chr(194);\r\n $replace[] = '';\r\n $search[] = chr(183);\r\n $replace[] = '·';\r\n $search[] = chr(180);\r\n $replace[] = '´';\r\n $search[] = chr(175);\r\n $replace[] = '¯';\r\n $search[] = '\\/';\r\n $replace[] = '/';\r\n $search[] = '\\s';\r\n $replace[] = ' ';\r\n $search[] = '\\p';\r\n $replace[] = '|';\r\n $search[] = '[URL]';\r\n $replace[] = '';\r\n $search[] = '[/URL]';\r\n $replace[] = '';\r\n $search[] = '[b]';\r\n $replace[] = '';\r\n $search[] = '[/b]';\r\n $replace[] = '';\r\n\r\n return str_replace($search, $replace, $var);\r\n }",
"public function testReplace2()\n {\n $this->assertEquals(Str::replace('foo', 'o', 'y'), 'fyy');\n }",
"function replace($x) {\n\t$k1=array(' - ','ß','ä','ö','ü','Ä','Ö','Ü',' ',':','&','?','!','\"',',','.',\"\\'\",\"/\");\n\t$k2=array('-','ss','ae','oe','ue','ae','oe','ue','-','-','und','','','','','',\"\",\"-\");\n\tfor ($i='0';$i<count($k1);$i++) {$x = str_replace($k1[$i],$k2[$i],$x);}\n\treturn $x;\n}",
"function str_replace_first($search, $replace, $subject) {\n $pos = strpos($subject, $search);\n if ($pos !== false) {\n return substr_replace($subject, $replace, $pos, strlen($search));\n }\n return $subject;\n }",
"function cmfcString_replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}",
"static function cityStateReplace($string, $geoip)\n {\n $string = str_replace('{city}', ucwords(strtolower($geoip->city_name)), $string);\n $string = str_replace('{state}', strtoupper($geoip->region_name), $string);\n $string = str_replace('{city_slug}', SoeHelper::getSlug($geoip->city_name), $string);\n $string = str_replace('{city_lower}', strtolower($geoip->city_name), $string);\n $string = str_replace('{state_lower}', strtolower($geoip->region_name), $string);\n\n return $string;\n }",
"protected function stringReplace($what, $with, $string)\r\n {\r\n return str_replace($what, $with, $string);\r\n }",
"private function _replaceVariable($str, $pos, $var, $repl)\n {\n $expr = substr($str, $pos, strpos($str, ')', $pos + 1) - $pos + 1);\n $eqsign = strpos($expr, '=');\n if (false !== $eqsign)\n {\n $name = substr($expr, $eqsign + 1, strlen($expr) - $eqsign - 2);\n }\n return substr_replace($str, \"(?P<$name>$repl)\", $pos, strlen($expr));\n }",
"public function replaceTag($tag, $string, &$output)\n {\n $output = str_replace($tag, $string, $output);\n }",
"public function replace( $old, $new );",
"function str_replace_first($search, $replace, $subject) {\n\t$pos = strpos($subject, $search);\n\tif ($pos !== false) {\n\t\treturn substr_replace($subject, $replace, $pos, strlen($search));\n\t}\n\t\n\treturn $subject;\n}",
"public function reemplazar($antiguo, $nuevo, $donde)\n\t\t{\n\t\t\treturn str_replace($antiguo, $nuevo, $donde);\n\t\t}",
"private static function dictReplace( $dictionary, $str )\n {\n foreach ($dictionary as $key => $value) {\n $str = str_replace($key, $value, $str);\n } // end foreach $dictionary\n return $str;\n }",
"function string_rewrite_value($value)\r\n\t{\r\n\t\t$value = $this->string_strip_accents($value);\r\n\t\t$value = strtolower($value);\r\n\t\t$value = str_replace('/', '-', $value);\r\n\t\t$value = preg_replace(\"#([^.a-zA-Z0-9-_\\40])#\", \"\", $value);\r\n\t\t$value = trim($value);\r\n\t\t$value = preg_replace(\"([\\40])\", \"-\", $value);\r\n\t\t$value = preg_replace(\"(-{2,})\", \"-\", $value);\r\n\r\n\t\treturn $value;\r\n\t}",
"private static function strReplaceFirst($needle, $replace, $haystack) {\n\t\t$pos = strpos($haystack, $needle);\n\t\t\n\t\tif ($pos !== false) {\n\t\t\treturn substr_replace($haystack, $replace, $pos, strlen($needle));\n\t\t}\n\t\t\n\t\treturn $haystack;\n\t}",
"function _ws_apply_replace_tokens($str, $student, $contact, $link = '') {\n switch ($student['gender_id']) {\n case 1:\n $hisher = 'her';\n $heshe = 'she';\n $himher = 'her';\n break;\n\n case 2:\n $hisher = 'his';\n $heshe = 'he';\n $himher = 'him';\n break;\n\n default:\n $hisher = 'their';\n $heshe = 'they';\n $himher = 'them';\n }\n\n $patterns = array(\n '{student.first_name}', '{student.last_name}',\n '{contact.first_name}', '{contact.last_name}',\n '{he/she}', '{she/he}', '{his/her}', '{her/his}', '{him/her}', '{her/him}',\n '{link}',\n );\n $replacements = array(\n $student['first_name'], $student['last_name'],\n $contact['first_name'], $contact['last_name'],\n $heshe, $heshe, $hisher, $hisher, $himher, $himher,\n $link,\n );\n return str_ireplace($patterns, $replacements, $str);\n}",
"public function replace_text($text) {\n\t\tif (strlen($text) == 0) {\n\t\t\treturn 'Onbekend';\n\t\t}\n\t\t$text = str_replace('no', 'nee', $text);\n\t\t$text = str_replace('yes', 'ja', $text);\n\t\t$text = str_replace('on', 'aan', $text);\n\t\t$text = str_replace('off', 'uit', $text);\t\t\n\t\treturn $text;\n\t}",
"function str_replace_first($search, $replace, $subject)\n {\n return Str::replaceFirst($search, $replace, $subject);\n }",
"function propertyStringReplace($htmlString, $array) {\n foreach($array as $property => $value) {\n $htmlString = str_replace('%'.$property.'%', $value, $htmlString);\n }\n return $htmlString;\n}",
"function str_lreplace($search, $replace, $subject) {\n\t$pos = strrpos($subject, $search);\n\n\tif($pos !== false) {\n\t\t$subject = substr_replace($subject, $replace, $pos, strlen($search));\n\t}\n\treturn $subject;\n}",
"function str_replace_once($needle, $replace, $haystack) {\n\t// and replaces it with $replace.\n\t$pos = strpos($haystack, $needle);\n\tif ($pos === false) {\n\t\t// Nothing found\n\t\treturn $haystack;\n\t}\n\treturn substr_replace($haystack, $replace, $pos, strlen($needle));\n}",
"public function replacePlaceholders($string)\n {\n $placeholders = array(\n '%host%' => new Resque\\Host,\n '%worker%' => new Resque\\Worker,\n '%pid%' => getmypid(),\n '%date%' => date('Y-m-d'),\n '%time%' => date('H:i')\n );\n\n return strtr($string, $placeholders);\n }",
"function filter_paces_site_url( $string ) {\n $site_url = \"{site_url}\";\n $replaceData = site_url();\n $string = str_replace($site_url, $replaceData, $string);\n\n return $string;\n }",
"function url($string) {\n global $links;\n $output = $string;\n if(isset($links) && count($links)) {\n foreach($links as $link) { //cari override\n if($link['url'] == $string)\n $output = $link['override'];\n }\n }\n \n return $output;\n }",
"function format_string_for_url($string) {\n\t\t$string = str_replace(\n\t\t\tarray('&', \"'\", ' ', '/'),\n\t\t\tarray('and', '', '_', '_'),\n\t\t\t$string\n\t\t);\n\t\t$string = strtolower(iconv(\"UTF-8\", \"ASCII//TRANSLIT\", $string));\n\t\treturn $string;\n\t}",
"function replace($text){\n\t\t\t\t\t\t\t\t\t\t$arrayText = array('TRUONG TIEU HOC','TRUONG THCS', 'TRUONG THPT');\n\t\t\t\t\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t\t\t\t\tfor ($i=0; $i < 3 ; $i++) { \n\t\t\t\t\t\t\t\t\t\t\tif (strpos($text, $arrayText[$i]) !== false) {\n\t\t\t\t\t\t\t\t\t\t\t\t$str = str_replace($arrayText[$i],\"\",$text);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn $str;\n\t\t\t\t\t\t\t\t\t}",
"private function replaceTag(&$text, $newContent, $competitionId) {\n $text = preg_replace('/{hapodi id=\"'.$competitionId .'\"}/s', $newContent, $text);\n }",
"public function transform(string $string): string\n {\n str_replace(' ', '-', $string);\n }",
"function userReplace($key, $text) {\r\n if (!$this->feed['params']['user_replace_on']) return $text;\r\n if (!is_array($this->feed['params']['replace'])) return $text;\r\n if (count($this->feed['params']['replace'][$key])) {\r\n foreach ($this->feed['params']['replace'][$key] as $v) {\r\n if ($v['limit'] == '') $v['limit'] = -1;\r\n $text = preg_replace($v['search'], $v['replace'], $text, $v['limit']);\r\n }\r\n }\r\n return $text;\r\n }",
"function str_complete_replace($find, $replace, $string)\n{\n\tif (is_array($find))\n\t{\n\t\t$noredo = array(); // array to store which keys don't need re-replacing (used to prevent stupidity with some repeating replacements)\n\t\t$perfect = 0; // the number of finds that need no replacing\n\t\twhile ($perfect < count($find))\n\t\t{\n\t\t\t$perfect = 0;\n\t\t\tfor ($i = 0; $i < count($find); $i++)\n\t\t\t{\n\t\t\t\t$findl = $find[$i];\n\t\t\t\tif ($findl == \"\") { $findl = \" \"; }\n\t\t\t\tif (is_array($replace))\n\t\t\t\t{\n\t\t\t\t\t$replacel = $replace[$i];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$replacel = $replace;\n\t\t\t\t}\n\t\t\t\tif (strpos($string,$findl) !== false)\n\t\t\t\t{\n\t\t\t\t\tif (strpos($replacel,$findl) === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$string = str_replace($findl,$replacel,$string);\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (strpos($string,$findl) !== false);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($noredo[$i] != true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$string = str_replace($findl,$replacel,$string);\n\t\t\t\t\t\t\t$noredo[$i] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$perfect++; // The amount of unreplaced finds must go up; otherwise it starts\n\t\t\t\t\t\t\t // an indefinitely loop with the search string\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// No replacing needed, increment the unreplaced finds\n\t\t\t\t\t$perfect++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tif ($find == \"\") { $find = \" \"; }\n\t\tif (strpos($replace,$find) === false)\n\t\t{\n\t\t\techo strpos($string,$findl);\n\t\t\twhile (strpos($string,$find) !== false)\n\t\t\t{\n\t\t\t\t$string = str_replace($find,$replace,$string);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// What it finds is in what it replaces things as; hence, it will create\n\t\t\t// an infinite loop under normal circumstances. Just replace it once to avoid\n\t\t\t// this.\n\t\t\t$string = str_replace($find,$replace,$string);\n\t\t}\n\t}\n\treturn $string;\n}",
"private function remove($str,$replace,$replaceWith=''){\n return str_replace($replace, $replaceWith, $str);\n }",
"function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}",
"public function replace($section, $str) {\n\t\t\treturn \\uri\\actions::modify($this->object, 'replace', $section, $str);\n\t\t}",
"public function replaceBetween(string $string, string $str, string $start, string $end): string\n {\n return preg_replace('/'.preg_quote($start).'[\\s\\S]+?'.preg_quote($end).'/', $str, $string);\n }",
"static function strReplace($search, array $replace, $subject) {\n foreach ($replace as $value) {\n $subject = preg_replace(\"/$search/\", $value, $subject, 1);\n }\n\n return $subject;\n }",
"function str_lreplace($search, $replace, $subject) {\n $pos = strrpos($subject, $search);\n if($pos !== false) {\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\n }\n return $subject;\n}",
"function str_lreplace($search, $replace, $subject) {\n $pos = strrpos($subject, $search);\n if($pos !== false) {\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\n }\n return $subject;\n}",
"private function resolveReplacement(Mailcode_Parser_Safeguard_Formatter_Location $location) : string\n {\n if($location->requiresAdjustment())\n {\n return $this->getReplaceString($location);\n }\n\n return $location->getPlaceholder()->getNormalizedText();\n }",
"public static function str_replace_once($needle , $replace , $haystack){\n // and replaces it with $replace.\n $pos = strpos($haystack, $needle);\n if ($pos === false) {\n // Nothing found\n return $haystack;\n }\n return substr_replace($haystack, $replace, $pos, strlen($needle));\n }",
"public static function stringReplace($str)\n {\n trim($str);\n\n /**replace the username with the given string */\n $inputStr = \"Hello <<UserName>>, How are you?\";\n $str1 = \"<<UserName>>\";\n $str2 = str_replace($str1, $str, $inputStr);\n echo $str2;\n }",
"public function replace( $string, $args, $omit = array() ) {\n\n\t\t$string = wp_strip_all_tags( $string );\n\n\t\t// Let's see if we can bail super early.\n\t\tif ( strpos( $string, '%%' ) === false ) {\n\t\t\treturn WPSEO_Utils::standardize_whitespace( $string );\n\t\t}\n\n\t\t$args = (array) $args;\n\t\tif ( isset( $args['post_content'] ) && ! empty( $args['post_content'] ) ) {\n\t\t\t$args['post_content'] = WPSEO_Utils::strip_shortcode( $args['post_content'] );\n\t\t}\n\t\tif ( isset( $args['post_excerpt'] ) && ! empty( $args['post_excerpt'] ) ) {\n\t\t\t$args['post_excerpt'] = WPSEO_Utils::strip_shortcode( $args['post_excerpt'] );\n\t\t}\n\t\t$this->args = (object) wp_parse_args( $args, $this->defaults );\n\n\t\t// Clean $omit array.\n\t\tif ( is_array( $omit ) && $omit !== array() ) {\n\t\t\t$omit = array_map( array( __CLASS__, 'remove_var_delimiter' ), $omit );\n\t\t}\n\n\t\t$replacements = array();\n\t\tif ( preg_match_all( '`%%([^%]+(%%single)?)%%?`iu', $string, $matches ) ) {\n\t\t\t$replacements = $this->set_up_replacements( $matches, $omit );\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_replacements' - Allow customization of the replacements before they are applied.\n\t\t *\n\t\t * @api array $replacements The replacements.\n\t\t *\n\t\t * @param array $args The object some of the replacement values might come from,\n\t\t * could be a post, taxonomy or term.\n\t\t */\n\t\t$replacements = apply_filters( 'wpseo_replacements', $replacements, $this->args );\n\n\t\t// Do the actual replacements.\n\t\tif ( is_array( $replacements ) && $replacements !== array() ) {\n\t\t\t$string = str_replace( array_keys( $replacements ), array_values( $replacements ), $string );\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_replacements_final' - Allow overruling of whether or not to remove placeholders\n\t\t * which didn't yield a replacement.\n\t\t *\n\t\t * @example <code>add_filter( 'wpseo_replacements_final', '__return_false' );</code>\n\t\t *\n\t\t * @api bool $final\n\t\t */\n\t\tif ( apply_filters( 'wpseo_replacements_final', true ) === true && ( isset( $matches[1] ) && is_array( $matches[1] ) ) ) {\n\t\t\t// Remove non-replaced variables.\n\t\t\t$remove = array_diff( $matches[1], $omit ); // Make sure the $omit variables do not get removed.\n\t\t\t$remove = array_map( array( __CLASS__, 'add_var_delimiter' ), $remove );\n\t\t\t$string = str_replace( $remove, '', $string );\n\t\t}\n\n\t\t// Undouble separators which have nothing between them, i.e. where a non-replaced variable was removed.\n\t\tif ( isset( $replacements['%%sep%%'] ) && ( is_string( $replacements['%%sep%%'] ) && $replacements['%%sep%%'] !== '' ) ) {\n\t\t\t$q_sep = preg_quote( $replacements['%%sep%%'], '`' );\n\t\t\t$string = preg_replace( '`' . $q_sep . '(?:\\s*' . $q_sep . ')*`u', $replacements['%%sep%%'], $string );\n\t\t}\n\n\t\t// Remove superfluous whitespace.\n\t\t$string = WPSEO_Utils::standardize_whitespace( $string );\n\n\t\treturn $string;\n\t}",
"function replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}",
"private static function str_replace($search, $replace, $str)\n {\n if (is_array($str))\n {\n foreach ($str as $key => $value)\n {\n if (is_scalar($value))\n {\n $str[$key] = str_replace($search, $replace, $value);\n }\n }\n }\n else\n {\n $str = str_replace($search, $replace, $str);\n }\n\n return $str;\n }",
"function _zt($text, $replace = [])\r\n{\r\n\treturn strtr($text, $replace);\r\n}",
"public function replaceVars($str, array $vars){\n foreach($vars as $key => $value){\n $str = str_replace(\"{\" . $key . \"}\", $value, $str);\n }\n return $str;\n }",
"static function replaceF($S)\n {\n $template = \"Hello <<UserName>>, How are you?\";\n //str_replace to replace <<UserName>> from template\n echo str_replace(\"<<UserName>>\", $S , $template).\"\\n\";\n }",
"protected function replace_vars( $string ) {\n\t\treturn $this->replace_vars->replace( $string, $this->presentation->source );\n\t}",
"function replaceShortCode( $text, $array){\n\t$shortCodes = array( '%fname%', '%lname%', '%address%', '%address2%', '%city%', '%state%', '%zip%', '%pnumber%', \n\t\t\t\t\t\t '%pnumbertype%', '%snumber%', '%snumberType%', '%email%', '%job%', '%cover%', '%resume%', '%siteName%' );\n\t$variables = array( $array->fname, $array->lname, $array->address, $array->address2, $array->city, $array->state, $array->zip, $array->pnumber, \n\t\t\t\t\t\t $array->pnumbertype, $array->snumber, $array->snumberType, $array->email, $array->job, $array->cover, $array->resume, get_option( 'blogname' ) );\n\t\n\t$newText = str_replace( $shortCodes, $variables, $text );\n\t\n\treturn $newText;\n}",
"function lb_replace_tags($text, $product) {\n $search = array(\n '[product_name]', \n '[product_price]', \n '[product_merchant]',\n '[product_brand]',\n );\n \n $replace = array(\n $product['name'], \n round((float)$product['finalprice']/100, 0),\n $product['merchant'],\n $product['brand'],\n );\n \n $return_text = str_replace($search, $replace, $text);\n \n error_log('lb_replace_tags - $return_text: ' . $return_text . ', product: ' . print_r($product, true));\n\n return $return_text;\n}"
] | [
"0.640134",
"0.63971454",
"0.6310503",
"0.6263212",
"0.6254047",
"0.6254047",
"0.6240745",
"0.62279683",
"0.6143493",
"0.6096184",
"0.6044394",
"0.5983438",
"0.5958176",
"0.5950945",
"0.59274155",
"0.5836681",
"0.58195853",
"0.58045965",
"0.5776366",
"0.5754938",
"0.5733894",
"0.57328856",
"0.5725436",
"0.5717522",
"0.5715486",
"0.56892174",
"0.5641877",
"0.56328505",
"0.56316286",
"0.56285024",
"0.56278545",
"0.5616109",
"0.56141025",
"0.56140876",
"0.56129014",
"0.56071955",
"0.5604722",
"0.5602404",
"0.5592692",
"0.5588195",
"0.5577311",
"0.55648816",
"0.5562853",
"0.55614245",
"0.55482244",
"0.55462426",
"0.553991",
"0.55331415",
"0.5521821",
"0.5519595",
"0.551781",
"0.5513376",
"0.55132765",
"0.5512182",
"0.54991215",
"0.54989624",
"0.549759",
"0.5481854",
"0.5480708",
"0.5475047",
"0.5466406",
"0.5463608",
"0.5458353",
"0.54544777",
"0.5448409",
"0.54476434",
"0.5446937",
"0.5446192",
"0.54432267",
"0.54408324",
"0.5426998",
"0.5425775",
"0.5425595",
"0.54254454",
"0.542443",
"0.54242283",
"0.5417943",
"0.5412557",
"0.5412216",
"0.5409623",
"0.5409535",
"0.540697",
"0.5406302",
"0.54053473",
"0.5402105",
"0.5395523",
"0.53932816",
"0.53932816",
"0.53696626",
"0.53641295",
"0.53460115",
"0.53412914",
"0.5332259",
"0.5329519",
"0.5327353",
"0.5316546",
"0.5307866",
"0.53027046",
"0.5301651",
"0.5296466"
] | 0.6555261 | 0 |
Create cache files for Front End Use | function include_caching($file) {
$cachefile = SITE_CACHES_FILES . $file;
$cachetime = 5 * 60; //secondes
if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {
include($cachefile);
} else {
$fp = fopen($cachefile, 'w');
fwrite($fp, ob_get_contents());
fclose($fp);
ob_end_flush();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function _createCacheFile() {\r\n $paths = array();\r\n $paths['apps'] = File::getDirectoriesNames(ZEEYE_APPS_PATH);\r\n $paths['libs'] = File::getDirectoriesNames(ZEEYE_LIBS_PATH);\r\n File::write(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH, '<?php ' . PHP_EOL . '$paths = ' . var_export($paths, true) . ';');\r\n self::$_hasCacheFile = true;\r\n }",
"private function write_cache() {\n if (!file_exists(CACHE_DIR))\n mkdir(CACHE_DIR, 0755, TRUE);\n\n if (is_dir(CACHE_DIR) && is_writable(CACHE_DIR)) {\n if (function_exists(\"sem_get\") && ($mutex = @sem_get(2013, 1, 0644 | IPC_CREAT, 1)) && @sem_acquire($mutex))\n file_put_contents($this->cache_file, $this->html . $this->debug) . sem_release($mutex);\n /**/\n else if (($mutex = @fopen($this->cachefile, \"w\")) && @flock($mutex, LOCK_EX))\n file_put_contents($this->cache_file, $this->html . $this->debug) . flock($mutex, LOCK_UN);\n /**/\n }\n }",
"function &createCache() {}",
"protected function createCacheFile()\n {\n $this->createCacheDir();\n\n $cacheFilePath = $this->getCacheFile();\n\n if ( ! file_exists($cacheFilePath)) {\n touch($cacheFilePath);\n }\n }",
"public function cacheSetup()\n\t{\n\t\t// Generate the name\n\t\t$time = $this->modified;\n\t\t$extension = $this->type;\n\t\t$fileName = pathinfo($this->name, PATHINFO_FILENAME) . \".\" . md5($this->name . '.' . $time);\n\t\t$name = $fileName . \".\" . $extension;\n\n\t\t// Generate the cache file path\n\t\t$this->cacheFilePath = realpath(public_path() . '/' . $this->app['assets::config']['cache_path']) . '/' . $name;\n\n\t\t// Generate the cache file URL\n\t\t$this->cacheFileUrl = $this->app['assets::config']['cache_url'] . $name;\n\n\t\treturn $this->cacheFile = $name;\n\t}",
"public function cacheFile()\n\t{\n\t\t$data[] = \"<?php\";\n\t\t$data[] = \"defined('LUNA_SYSTEM') or die('Hacking attempt!');\\n\";\n\n\t\t$routes = Route::orderBy('type')->orderBy('controller')->get()->toArray();\n\n\t\tif (!empty($routes)) {\n\t\t\tforeach ($routes as $route) {\n\t\t\t\t$call_back = isset($route['action']) ? $route['controller'] . \":\" . $route['action'] : $route['controller'];\n\t\t\t\tif (!isset($route['method'])) {\n\t\t\t\t\t$data[] = '$app->get(\"' . $route['route'] . '\", \"' . $call_back . '\");';\n\t\t\t\t} else {\n\t\t\t\t\t$methods = explode(',', preg_replace('/\\s+/', '', $route['method']));\n\t\t\t\t\tforeach ($methods as $method) {\n\t\t\t\t\t\t$data[] = '$app->' . strtolower($method) . '(\"' . $route['route'] . '\", \"' . $call_back . '\");';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$output = implode(\"\\n\", $data);\n\n\t\twrite_file(LUNA_CACHEPATH . \"/data/routes.php\", $output);\n\t}",
"protected function createAllCaches() {}",
"public static function getCache() {}",
"public function getCache();",
"protected function setCache()\n {\n if ($this->cache) {\n $cacheFile = $this->getCacheFile();\n $this->setupCachePath($cacheFile);\n file_put_contents($cacheFile, $this->templateOutput);\n }\n }",
"public function rebuildCache()\r\n {\r\n $themes = $this->scanJsonFiles();\r\n // file_put_contents($this->cachePath, json_encode($themes, JSON_PRETTY_PRINT));\r\n\r\n $stub = file_get_contents(__DIR__ . '/stubs/cache.stub');\r\n $contents = str_replace('[CACHE]', var_export($themes, true), $stub);\r\n file_put_contents($this->cachePath, $contents);\r\n }",
"private function writeCookieFileCache()\n {\n $timeLive = Carbon::now()->addMinutes(480);\n Cache::put('AuthApiBpmCookie', $this->cookies, $timeLive);\n Log::info('Получены новые куки'.$this->cookies);\n }",
"public function getCacheDir();",
"function cachefile($url = false) {\n\t\tif(!$url) {\n\t\t\t$url = uniqid();\n\t\t}\n\t\t\n\t\t$request_hash = sha1($url);\n\t\t\n\t\t$tmp_path = sys_get_temp_dir();\n\t\t\n\t\t$cache_name = 'wmjapi-' . $this->token_hash . '-' \n\t\t\t. sha1($url) . '.json';\n\t\t\n\t\tif(substr($tmp_path, -1) !== '/') {\n\t\t\t$tmp_path = $tmp_path . '/';\n\t\t}\n\t\t\n\t\t$cache_file = $tmp_path . $cache_name;\n\t\t\n\t\treturn $cache_file;\n\t}",
"private static function prep() {\n\t\tif (!isset(F3::$global['CACHE'])) {\n\t\t\t// Extensions usable as cache back-ends\n\t\t\t$_exts=array_intersect(\n\t\t\t\texplode('|','apc|xcache'),get_loaded_extensions()\n\t\t\t);\n\t\t\tforeach (array_keys($_exts,'') as $_null)\n\t\t\t\tunset($_exts[$_null]);\n\t\t\t$_exts=array_merge($_exts,array());\n\t\t\tF3::$global['CACHE']=$_exts[0]?:\n\t\t\t\t('folder='.F3::$global['BASE'].'cache/');\n\t\t}\n\t\tif (preg_match(\n\t\t\t'/^(?:(folder)\\=(.+\\/)|(apc)|(memcache)=(.+))|(xcache)/i',\n\t\t\tF3::$global['CACHE'],$_match)) {\n\t\t\tif ($_match[1]) {\n\t\t\t\tif (!file_exists($_match[2])) {\n\t\t\t\t\tif (!is_writable(dirname($_match[2])) &&\n\t\t\t\t\t\tfunction_exists('posix_getpwuid')) {\n\t\t\t\t\t\t\t$_uid=posix_getpwuid(posix_geteuid());\n\t\t\t\t\t\t\tF3::$global['CONTEXT']=array(\n\t\t\t\t\t\t\t\t$_uid['name'],realpath(dirname($_match[2]))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\ttrigger_error(F3::TEXT_Write);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// Create the framework's cache folder\n\t\t\t\t\tmkdir($_match[2],0755);\n\t\t\t\t}\n\t\t\t\t// File system\n\t\t\t\tself::$l1cache=array('type'=>'folder','id'=>$_match[2]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_ext=strtolower($_match[3]?:($_match[4]?:$_match[6]));\n\t\t\t\tif (!extension_loaded($_ext)) {\n\t\t\t\t\tF3::$global['CONTEXT']=$_ext;\n\t\t\t\t\ttrigger_error(F3::TEXT_PHPExt);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ($_match[4]) {\n\t\t\t\t\t// Open persistent MemCache connection(s)\n\t\t\t\t\t// Multiple servers separated by semi-colon\n\t\t\t\t\t$_pool=explode(';',$_match[5]);\n\t\t\t\t\t$_mcache=NULL;\n\t\t\t\t\tforeach ($_pool as $_server) {\n\t\t\t\t\t\t// Hostname:port\n\t\t\t\t\t\tlist($_host,$_port)=explode(':',$_server);\n\t\t\t\t\t\tif (is_null($_port))\n\t\t\t\t\t\t\t// Use default port\n\t\t\t\t\t\t\t$_port=11211;\n\t\t\t\t\t\t// Connect to each server\n\t\t\t\t\t\tif (is_null($_mcache))\n\t\t\t\t\t\t\t$_mcache=memcache_pconnect($_host,$_port);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmemcache_add_server($_mcache,$_host,$_port);\n\t\t\t\t\t}\n\t\t\t\t\t// MemCache\n\t\t\t\t\tself::$l1cache=array('type'=>$_ext,'id'=>$_mcache);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t// APC and XCache\n\t\t\t\t\tself::$l1cache=array('type'=>$_ext);\n\t\t\t}\n\t\t\tself::$l1cache['current']=FALSE;\n\t\t\treturn TRUE;\n\t\t}\n\t\t// Unknown back-end\n\t\ttrigger_error(self::TEXT_Backend);\n\t\treturn FALSE;\n\t}",
"function getCacheFilename() {\n\t\treturn 'cache/fc-categories.php';\n\t}",
"public function getCacheDirectory() {}",
"public function storeCache() {\n\t\tif ($this->cacheFilePath) {\n\t\t\tfile_put_contents($this->cacheFilePath, serialize($this->classFileIndex));\n\t\t}\n\t}",
"private function createEnvironment() {\n\t\t$this->cache_folder = dirname(__FILE__) . \"/\" . $this->cache_folder;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($this->cache_folder))\n\t\t\tmkdir($this->cache_folder);\n\n\t\t// Get the index file path\n\t\t$indexFilepath = $this->cache_folder . \"/\" . $this->cache_index;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($indexFilepath))\n\t\t\ttouch($indexFilepath);\n\t}",
"function _createCacheDirectory() {\n // Create cache directory if it doesnt exist\n if (!file_exists($this->thumbnail_dir)) {\n @mkdir($this->thumbnail_dir, 0777, true);\n } else {\n // Try to make the directory writable\n @chmod($this->thumbnail_dir, 0777);\n }\n }",
"protected function prepareCache()\n {\n $oldUmask = umask(0);\n mkdir($this->cacheDirectory, 0777);\n mkdir($this->getObjectsDirectory(), 0777);\n\n $this->cacheInfo = array(\"objects\" => array());\n file_put_contents($this->cacheDirectory . self::CACHE_INFO_FILENAME, json_encode(array(\"cache\" => $this->cacheInfo)));\n @chmod($this->cacheDirectory . self::CACHE_INFO_FILENAME, 0666);\n umask($oldUmask);\n }",
"public function saveToCacheForever();",
"private function _getCachePath() {\n return DIR_PUBLIC_CACHE_SEARCHES . $this->_id . '.json';\n }",
"public function cache()\n {\n\n $route = Route::requireRoueFiiles();\n if (file_put_contents($this->cacheFile, serialize($route))) {\n echo 'OK';\n } else {\n echo 'ERROR';\n }\n }",
"public static function getCacheFile() {\n\t\t$cache = false;\n\t\t$can_be_cached = PageCache::canBeCached();\n\t\tif ($can_be_cached) {\n\t\t\t// Before checking cache, lets check cache reffreshment triggers (specific prices)\n\t\t\tPageCacheDAO::triggerReffreshment();\n\n\t\t\t$controller = Dispatcher::getInstance()->getController();\n\t\t\t$cache_life = 60 * ((int)Configuration::get('pagecache_'.$controller.'_timeout'));\n\t\t\t$cache_file = PageCache::_getCacheFilepath();\n\n\t\t\tif (Tools::getIsset('delpagecache') && file_exists($cache_file)) {\n\t\t\t\tunlink($cache_file);\n\t\t\t}\n\n\t\t\t$pseudo_uri = self::getPseudoRequestURI();\n\t\t\t$filemtime = @filemtime($cache_file);\n\t\t\tif ($filemtime && ($cache_life < 0 or (microtime(true) - $filemtime < $cache_life))) {\n\t\t\t\tif (Configuration::get('pagecache_stats')) {\n\t\t\t\t\tPageCacheDAO::incrementCountHit($pseudo_uri);\n\t\t\t\t}\n\t\t\t\t$cache = $cache_file;\n\t\t\t}\n\n\t\t\t// Store cache used in a readable cookie (0=no cache; 1=server cache; 2=browser cache)\n\t\t\tif (self::isDisplayStats()) {\n\t\t\t\t$cache_type = 0;\n\t\t\t\tif ($cache) {\n\t\t\t\t\t$cache_type = 1;\n\t\t\t\t}\n\t\t\t\tif (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */\n\t\t\t\t\tsetcookie('pc_type_' . md5($pseudo_uri), $cache_type, time()+60*60*1, '/', null, 0);\n\t\t\t\telse\n\t\t\t\t\tsetcookie('pc_type_' . md5($pseudo_uri), $cache_type, time()+60*60*1, '/', null, 0, false);\n\t\t\t}\n\t\t}\n\t\tif (Configuration::get('pagecache_logs') > 1) {\n\t\t\t// Log debug\n\t\t\t$controller = Dispatcher::getInstance()->getController();\n\t\t\t$is_ajax = Tools::getIsset('ajax') ? 'true' : 'false';\n\t\t\t$is_get = strcmp($_SERVER['REQUEST_METHOD'], 'GET') == 0 ? 'true' : 'false';\n\t\t\t$ctrl_enabled = Configuration::get('pagecache_'.$controller) ? 'true' : 'false';\n\t\t\t$is_debug = !Configuration::get('pagecache_debug') || Tools::getValue('dbgpagecache') !== false ? 'false' : 'true';\n\t\t\t$token_ok = (int)(Configuration::get('PS_TOKEN_ENABLE')) != 1 ? 'true' : 'false';\n\t\t\t$is_logout = Tools::getValue('logout') === false && Tools::getValue('mylogout') === false ? 'false' : 'true';\n\t\t\t$can_be_cached = $can_be_cached ? 'true' : 'false';\n\t\t\t$cache_life = 60 * ((int)Configuration::get('pagecache_'.$controller.'_timeout'));\n\t\t\t$cache_file = PageCache::_getCacheFilepath();\n\t\t\t$exists = file_exists($cache_file) ? 'true' : 'false';\n\t\t\t$date_infos = '';\n\t\t\tif (file_exists($cache_file)) {\n\t\t\t\t$now = date(\"d/m/Y H:i:s\", microtime(true));\n\t\t\t\t$last_date = date(\"d/m/Y H:i:s\", filemtime($cache_file));\n\t\t\t\t$date_infos = \"now=$now file=$last_date\";\n\t\t\t}\n\t\t\tLogger::addLog(\"PageCache | cache | !is_ajax($is_ajax) && is_get($is_get) && ctrl_enabled($ctrl_enabled) \".\n\t\t\t\t\"&& !is_debug($is_debug) && token_ok($token_ok) && !is_logout($is_logout) = $can_be_cached \".\n\t\t\t\t\"controller=$controller cache_life=$cache_life cache_file=$cache_file exists=$exists $date_infos\", 1, null, null, null, true);\n\t\t}\n\t\treturn $cache;\n\t}",
"private static function _readCacheFile() {\r\n if (!self::$_hasCacheFile) {\r\n self::_createCacheFile();\r\n }\r\n\r\n $paths = array();\r\n require(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH);\r\n self::$_paths = $paths;\r\n }",
"public static function cache()\n {\n $cache = Cache::instance('system');\n if (!$cache->get('config-autoload')) {\n $cache->set('config-autoload', self::$data);\n }\n }",
"private function get_cache() {\n exit(file_get_contents($this->cache_file));\n }",
"protected static function createBaseTcaCacheFile() {}",
"protected function saveToCache() {}",
"function cache($type, $parameters, $data)\n{\n if($type == 'browse')\n $filename = CACHE.'/browse.'.$parameters['browsenode'].'.'.$parameters['page'].'.'.$parameters['mode'].'.dat';\n if($type == 'search')\n $filename = CACHE.'/search.'.$parameters['search'].'.'.$parameters['page'].'.'.$parameters['mode'].'.dat';\n if($type == 'asin')\n $filename = CACHE.'/asin.'.$parameters['asin'].'.'.$parameters['mode'].'.dat';\n \n $data = serialize($data);\n \n $fp = fopen($filename, 'wb');\n if(!$fp||(fwrite($fp, $data)==-1))\n {\n echo ('<p>Error, could not store cache file');\n }\n fclose($fp);\n}",
"protected function getCacheFile(){\n\t\treturn $this->getPath() . $this->getCacheName();\n\t}",
"function subsite_manager_make_cron_cache(){\n\n if(subsite_manager_on_subsite()){\n $site = elgg_get_site_entity();\n $file_path = get_config(\"dataroot\") . \"subsite_manager/\";\n\n // make correct file structure\n if(!is_dir($file_path)){\n mkdir($file_path);\n }\n\n $file_path .= $site->getGUID() . \"/\";\n\n if(!is_dir($file_path)){\n mkdir($file_path);\n }\n\n // cache file\n $file_path .= \"cron_cache.json\";\n\n if(!file_exists($file_path)){\n $crons = array();\n\n $hooks = get_config(\"hooks\");\n\n if(!empty($hooks[\"cron\"])){\n foreach($hooks[\"cron\"] as $interval => $functions){\n if(($interval != \"all\") && !empty($functions)){\n $crons[] = $interval;\n }\n }\n }\n\n file_put_contents($file_path, json_encode($crons));\n }\n }\n }",
"private function setCache()\n\t{\n\t\t$this->_cache = new Cache('./', array('prefix' => 'pageReader'));\n\t}",
"public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}",
"public function generateConfigCache()\n\t{\n\t\t// Generate the class/template laoder cache file\n\t\t$objCacheFile = new \\File('system/cache/config/autoload.php', true);\n\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strFile = 'system/modules/' . $strModule . '/config/autoload.php';\n\n\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t{\n\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t}\n\t\t}\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the module loader cache file\n\t\t$objCacheFile = new \\File('system/cache/config/modules.php', true);\n\t\t$objCacheFile->write(\"<?php\\n\\n\");\n\n\t\t$objCacheFile->append(sprintf(\"static::\\$active = %s;\\n\", var_export(\\ModuleLoader::getActive(), true)));\n\t\t$objCacheFile->append(sprintf(\"static::\\$disabled = %s;\", var_export(\\ModuleLoader::getDisabled(), true)));\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the config cache file\n\t\t$objCacheFile = new \\File('system/cache/config/config.php', true);\n\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strFile = 'system/modules/' . $strModule . '/config/config.php';\n\n\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t{\n\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t}\n\t\t}\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the page mapping array\n\t\t$arrMapper = array();\n\t\t$objPages = \\PageModel::findPublishedRootPages();\n\n\t\tif ($objPages !== null)\n\t\t{\n\t\t\twhile ($objPages->next())\n\t\t\t{\n\t\t\t\t$strBase = ($objPages->dns ?: '*');\n\n\t\t\t\tif ($objPages->fallback)\n\t\t\t\t{\n\t\t\t\t\t$arrMapper[$strBase . '/empty.fallback'] = $strBase . '/empty.' . $objPages->language;\n\t\t\t\t}\n\n\t\t\t\t$arrMapper[$strBase . '/empty.' . $objPages->language] = $strBase . '/empty.' . $objPages->language;\n\t\t\t}\n\t\t}\n\n\t\t// Generate the page mapper file\n\t\t$objCacheFile = new \\File('system/cache/config/mapping.php', true);\n\t\t$objCacheFile->write(sprintf(\"<?php\\n\\nreturn %s;\\n\", var_export($arrMapper, true)));\n\t\t$objCacheFile->close();\n\n\t\t// Add a log entry\n\t\t$this->log('Generated the config cache', __METHOD__, TL_CRON);\n\t}",
"protected function _create_cached()\n {\n if($this->url_params['c'])\n {\n // Resize to highest width or height with overflow on the larger side\n $this->image->resize($this->url_params['w'], $this->url_params['h'], Image::INVERSE);\n\n // Crop any overflow from the larger side\n $this->image->crop($this->url_params['w'], $this->url_params['h']);\n }\n else\n {\n // Just Resize\n $this->image->resize($this->url_params['w'], $this->url_params['h']);\n }\n\n // Apply any valid watermark params\n $watermarks = Arr::get($this->config, 'watermarks');\n if ( ! empty($watermarks))\n {\n foreach ($watermarks as $key => $watermark)\n {\n if (key_exists($key, $this->url_params))\n {\n $image = Image::factory($watermark['image']);\n $this->image->watermark($image, $watermark['offset_x'], $watermark['offset_y'], $watermark['opacity']);\n }\n }\n }\n\n // Save\n if($this->url_params['q'])\n {\n //Save image with quality param\n $this->image->save($this->cached_file, $this->url_params['q']);\n }\n else\n {\n //Save image with default quality\n $this->image->save($this->cached_file, Arr::get($this->config, 'quality', 80));\n }\n }",
"private function generateCache()\n {\n $schmaTabls = [];\n foreach (self::$allSchema as $Schema) {\n $schmaTabls[] = Tools::parse_object_TO_array($Schema);\n }\n self::setgenerateCACHE_SELECT($schmaTabls);\n }",
"public static function save_cache() {\n if (self::$_cache_invalid) {\n if (@file_put_contents(self::$_path_cache_file\n , serialize(self::$_abs_file_paths))) {\n error_log('failed to write absolute file path cache to: ' . self::$_path_cache_file);\n }\n }\n }",
"function add_to_cache($className, $path)\n{\n global $cache_map, $cache_file;\n\n if(!empty($className))\n {\n if(!$cache_map)\n $cache_map = array();\n\n $cache_map[$className] = $path;\n\n file_put_contents($cache_file, '<?php ' . \"\\n\" . '$cache_map = ' .\"\\n\" . var_export($cache_map, true) . ';' );\n\n }\n}",
"function cache();",
"function __construct($cache_file_name, $cache_file_time, $cache_file_extension, $cache_file_path){\n\n\t\tif($cache_file_extension == '')\t\n\t\t\t$cache_file_extension = '.cache';\n\t\t\n\t\tif(!is_dir($cache_file_path)){\n\t\t\t$oldumask = umask(0);\n\t\t\tmkdir($cache_file_path,0777,true);\n\t\t\tumask($oldumask);\t\n\t\t}\t\t\n\n\t\tCache::$path = $cache_file_path.'/'.$cache_file_name.$cache_file_extension;\n\t\tCache::$time = $cache_file_time;\n\t\t//echo Cache::$path;\n\t\t//exit;\n\t}",
"protected function createCacheTables() {}",
"public function cache() {\r\n\t\t$key = $this->cacher.'.' . $this->hash();\r\n\t\tif (($content = pzk_store($key)) === NULL) {\r\n\t\t\t$content = $this->getContent();\r\n\t\t\tpzk_store($key, $content);\r\n\t\t}\r\n\t\techo $content;\r\n\t}",
"public function getCacheFile()\n\t{\n\t\treturn $this->tempDir . '/' . $this->filename;\n\t}",
"public function cacheBin() {\n return 'cache_forsrights_webservice';\n }",
"private function getCacheFile() {\n return new File($this->rootPath, self::CACHE_FILE);\n }",
"function cacheFile($dir, $file, $data)\n{\n if (!Config::Caching)\n return;\n\n debug('Cache', \"Saving $file to $dir local storage\");\n\n $path = pathJoin([$dir, $file]);\n file_put_contents($path, $data);\n chmod($path, 0666);\n}",
"protected function __construct() {\n if (!file_exists(self::getCachePath())) {\n mkdir(self::getCachePath(), 0777, true);\n }\n }",
"public function cache() {\n\t\tif (count($this->args) === 1) {\n\t\t\tif ($this->args[0] === 'webroot') {\n\t\t\t\t$this->args = array('css', 'js');\n\t\t\t} elseif ($this->args[0] === 'app') {\n\t\t\t\t$this->args = array_values($this->caches);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->args as $key => $val) {\n\t\t\tif (array_key_exists($val, $this->caches)) {\n\t\t\t\t$this->args[$key] = $this->caches[$val];\n\t\t\t}\n\t\t}\n\n\t\t$this->out('Deleting cache files:');\n\n\t\tif (empty($this->args)) {\n\t\t\t$this->_empty(CACHE);\n\t\t\t$this->out('Complete cache dir emptied');\n\t\t\treturn;\n\t\t}\n\t\tforeach ($this->args as $arg) {\n\t\t\tif (in_array($arg, array('css', 'js'))) {\n\t\t\t\t$this->{$arg}();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!is_dir(CACHE . $arg)) {\n\t\t\t\t$this->err('No cache dir \\'' . $arg . '\\'');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->_empty(CACHE . $arg);\n\t\t\t$this->out('Cache \\'' . $arg . '\\' deleted');\n\t\t}\n\n\t\tif (empty($this->args)) {\n\t\t\t$this->engines();\n\t\t}\n\t}",
"public function startCache() {}",
"private function cacheFolder(){\n $cachePath = ROOT . \"/\" . $this->_config['cachePath'];\n if (!is_dir( $cachePath )) { // no\n if (!mkdir( $cachePath, 0755, true)) { // so make it\n if (!is_dir( $cachePath )) { // check again to protect against race conditions\n\n // uh-oh, failed to make that directory\n $this->sendErrorImage(\"Failed to create cache directory at: $cachePath\");\n }\n }\n }\n }",
"function begin_cache($file) {\r\n clearstatcache();\r\n $cachename = \"cache_\" . basename($file) . \".html\";\r\n $spit = '/';\r\n if (strpos($file, '/') == false)\r\n $spit = '\\\\';\r\n $cachename_all = dirname($file) . $spit . $cachename;\r\n if (file_exists($cachename_all)) {\r\n // redirection policy\r\n redirection($cachename);\r\n }\r\n ob_start();\r\n}",
"function set_cache($cache_file = '')\n {\n $data = array();\n switch ($cache_file) {\n case 'configurations':\n $data = modules::run('configurations/get_configuration', array('array' => TRUE)); \n break;\n case 'configurations_vi':\n $data = modules::run('configurations/get_configuration', array('array' => TRUE, 'lang' => 'vi')); \n break;\n case 'configurations_en':\n $data = modules::run('configurations/get_configuration', array('array' => TRUE, 'lang' => 'en')); \n break;\n case 'pages':\n $data = modules::run('pages/get_page_data', array('array' => TRUE)); \n break;\n case 'menus':\n $data = modules::run('menus/get_menu_data', array('array' => TRUE)); \n break;\n default:\n break;\n }\n return $data;\n }",
"public function generateInternalCache()\n\t{\n\t\t// Purge\n\t\t$this->purgeInternalCache();\n\n\t\t// Rebuild\n\t\t$this->generateConfigCache();\n\t\t$this->generateDcaCache();\n\t\t$this->generateLanguageCache();\n\t\t$this->generateDcaExtracts();\n\t}",
"private static function create_cache_dir() {\n if ( ! is_writable(self::$_cache_dir)) {\n if ( ! file_exists(self::$_cache_dir)) {\n if ( ! @mkdir(self::$_cache_dir, 0755, TRUE))\n throw new Exception('failed to create cache directory: '\n . self::$_cache_dir);\n } else \n throw new Exception(self::$_cache_dir . ' is not writable');\n }\n }",
"private function generate_solr_cache()\r\n\t{\r\n\t\tfile_put_contents($this->solr_cache_file, $this->solr_stream);\r\n\t}",
"abstract protected function cacheData();",
"public function write()\n\t{\n\t\t$source = $this->compile();\n\n\t\t// file location\n\t\t$file = $this->template->getEnvironment()->getCache() . '/';\n\t\t$file .= $this->template->getEnvironment()->getCacheFilename($this->filename);\n\n\t\t// attempt to create the directory if needed\n\t\tif(!is_dir(dirname($file)))\n\t\t{\n\t\t\tmkdir(dirname($file), 0777, true);\n\t\t}\n\n\t\t// write to tempfile and rename\n\t\t$tmpFile = tempnam(dirname($file), basename($file));\n\t\tif(@file_put_contents($tmpFile, $source) !== false)\n\t\t{\n\t\t\tif(@rename($tmpFile, $file))\n\t\t\t{\n\t\t\t\tchmod($file, 0644);\n\t\t\t}\n\t\t}\n\t}",
"public function cacheFolder() {\n\t\t$full_path = trim(str_replace(MODX_BASE_PATH, '', trim($this->config['cacheFolder'])), DIRECTORY_SEPARATOR);\n\n\t\tif (!file_exists(MODX_BASE_PATH . $full_path)) {\n\t\t\t$tmp = explode(DIRECTORY_SEPARATOR, $full_path);\n\t\t\t$path = MODX_BASE_PATH;\n\t\t\tforeach ($tmp as $v) {\n\t\t\t\tif (!empty($v)) {\n\t\t\t\t\t$path .= $v . DIRECTORY_SEPARATOR;\n\t\t\t\t\tif (!file_exists($path)) {\n\t\t\t\t\t\tmkdir($path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (substr($full_path, -1) !== DIRECTORY_SEPARATOR) {\n\t\t\t$full_path .= DIRECTORY_SEPARATOR;\n\t\t}\n\n\t\t// Could not create cache directory\n\t\tif (!file_exists(MODX_BASE_PATH . $full_path)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the latest cache files\n\t\t$this->config['cacheFolder'] = $cacheFolder = MODX_BASE_PATH . $full_path;\n\t\t$regexp = '('.$this->config['jsFilename'].'|'.$this->config['cssFilename'].')';\n\t\t$regexp .= '_(\\d{10})';\n\t\t$regexp .= '('.$this->config['jsExt'].'|'.$this->config['cssExt'].')';\n\n\t\t$files = scandir($cacheFolder);\n\t\tforeach ($files as $file) {\n\t\t\tif ($file == '.' || $file == '..') {continue;}\n\n\t\t\tif (preg_match(\"/^$regexp$/iu\", $file, $matches)) {\n\t\t\t\tif ($matches[3] == $this->config['jsExt']) {\n\t\t\t\t\t$this->current['js'][] = array(\n\t\t\t\t\t\t'file' => $matches[0],\n\t\t\t\t\t\t'time' => filemtime($cacheFolder . $file),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->current['css'][] = array(\n\t\t\t\t\t\t'file' => $matches[0],\n\t\t\t\t\t\t'time' => filemtime($cacheFolder . $file),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public function setUpCache();",
"protected function initCaches() {}",
"private function _createCacheFile($data, $key)\n\t{\n\t\t$cache_path = APPPATH.'cache/' . __CLASS__;\n\t\t$filepath = $cache_path .\"/\". $key . \".xml\";\n\t\n\t\tif (! is_dir($cache_path))\n\t\t\tmkdir($cache_path . \"\", 0777, TRUE);\n\t\t\n\t\tif(! is_really_writable($cache_path))\n\t\t\treturn;\n\n\t\tif ( ! $fp = fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE))\n\t\t{\n\t\t\t// print(\"<!-- Unable to write cache file: \".$filepath.\" -->\\n\");\n\t\t\tlog_message('error', \"Unable to write cache file: \".$filepath);\n\t\t\treturn;\n\t\t}\n\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp, $data);\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\t\tchmod($filepath, DIR_WRITE_MODE);\n\n\t\t// print(\"<!-- Cache file written: \" . $filepath . \" -->\\n\");\n\t\tlog_message('debug', \"Cache file written: \" . $filepath);\n\t}",
"abstract function cache_output();",
"public function cacheModuleToFile() {\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->order = 'name ASC';\n\t\t$modules = ComModules::model()->findAll($criteria);\n\t\t$arrayModule = '';\n\n\t\tforeach($modules as $module) {\n\t\t\t$arrayModule .= $module->name . \"\\n\";\n\t\t}\n\t\t$filePath = Yii::getPathOfAlias('application.config');\n\t\t$fileHandle = fopen($filePath.'/cache_module.php', 'w');\n\t\tfwrite($fileHandle, $arrayModule);\n\t\tfclose($fileHandle);\n\t}",
"public function PreparerMiseEnCache()\n\t\t{\n\t\t\tob_start();\n\t\t}",
"public function startContrexxCaching()\n {\n if (!$this->boolIsEnabled) {\n return null;\n }\n $files = glob($this->strCachePath . $this->strCacheFilename . \"*\");\n\n foreach ($files as $file) {\n if (filemtime($file) > (time() - $this->intCachingTime)) {\n //file was cached before, load it\n readfile($file);\n exit;\n } else {\n $File = new \\Cx\\Lib\\FileSystem\\File($file);\n $File->delete();\n }\n }\n\n //if there is no cached file, start recording\n ob_start();\n }",
"public function getCachePath()\r\n\t{\r\n\t\t$path = AD.$this->getConfig()->getChildren(\"cache\")->getString(\"path\");\r\n\t\tif(!is_dir($path))\r\n\t\t{\r\n\t\t\tmkdir($path, 0777, true);\r\n\t\t}\r\n\t\treturn $path;\r\n\t}",
"public function makeCacheHash() {}",
"public static function getCacheFilepath() {\n\t\tdie('<br>ERROR: the file /override/classes/controller/FrontController.php <b>must be patched for PageCache</b>.\n\t\t\t<br><br><b>SOLUTION</b>: Comment or delete this line in <b>/override/classes/controller/FrontController.php</b><pre style=\"border:1px solid gray;background-color:#cdcdcd;padding:5px\">$cache_file = PageCache::getCacheFilepath();</pre>\n\t\t\tand replace <pre style=\"border:1px solid gray;background-color:#cdcdcd;padding:5px\">file_put_contents($cache_file, $html);</pre> by <pre style=\"border:1px solid gray;background-color:#cdcdcd;padding:5px\">PageCache::cacheThis($html);</pre>\n\t\t');\n\t}",
"public function web_common(){\n\t\t//get_num(4) because: 0 = CLASS_KEY, 1=CLASS, 2=TASK_KEY, 3=TASK, 4=remainder\n\t\t$file = str_replace('|', DIRECTORY_SEPARATOR, lc('uri')->get('f', ''));\n\t\tif($file == ''){\n\t\t\t$tmps = lc('uri')->get_num();\n\t\t\tforeach($tmps as $k => $tmp){\n\t\t\t\tif($k >= 3 && $tmp != ''){\n\t\t\t\t\t$file .= $tmp.DIRECTORY_SEPARATOR;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(substr($file, -1) == DIRECTORY_SEPARATOR){\n\t\t\t$file = substr($file, 0, -1);\n\t\t}\n\t\t$file\t\t = str_replace(array('..', '|'), array('', DIRECTORY_SEPARATOR), $file);\n\t\t$template\t = ll('client')->get('template', 'default');\n\t\t$allowedExt\t = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'ico');\n\t\t$file_cache\t = TPLPATH.$template.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$file;\n\t\tforeach($allowedExt as $ext){\n\t\t\tif(ll('files')->exists($file_cache.'.'.$ext)){\n\t\t\t\t$file_cache .= '.'.$ext;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!ll('files')->exists($file_cache)){\n\t\t\t$file_cache = TPLPATH.'default'.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$file;\n\t\t\tforeach($allowedExt as $ext){\n\t\t\t\tif(ll('files')->exists($file_cache.'.'.$ext)){\n\t\t\t\t\t$file_cache .= '.'.$ext;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!ll('files')->exists($file_cache)){\n\t\t\t$file_cache = TPLPATH.'img'.DIRECTORY_SEPARATOR.$file;\n\t\t\tforeach($allowedExt as $ext){\n\t\t\t\tif(ll('files')->exists($file_cache.'.'.$ext)){\n\t\t\t\t\t$file_cache .= '.'.$ext;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!ll('files')->exists($file_cache)){\n\t\t\tlc('error')->show_error(404, 'Page not Found');\n\t\t}else{\n\t\t\t$this->send_image($file_cache, $ext);\n\t\t}\n\t}",
"function install_caches()\n\t{\n\t\t//-----------------------------------------\n\t\t// Get DB\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver'] );\n\t\t//-----------------------------------------\n\t\t// Do Caches\n\t\t//-----------------------------------------\n\t\n\t\t$output = $this->install->cache_and_cleanup();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_progress( $output ) );\t\t\n\t\t$this->install->template->next_action = '?p=done';\n\t}",
"protected static function createExtLocalconfCacheEntry() {}",
"protected function createCacheDir()\n {\n if ( ! file_exists($this->cacheDir)) {\n mkdir($this->cacheDir);\n }\n }",
"protected function saveToPackageCache() {}",
"protected function getRuntimeCache() {}",
"public static function removeCacheFiles() {}",
"protected function build_sitemap_root_cache_file() {\n\n\t\t$sitemap_content = $this->build_sitemap_root();\n\n\t\t\\file_put_contents( // phpcs:ignore\n\t\t\t$this->get_sitemap_root_cache_file_path(),\n\t\t\t$sitemap_content\n\t\t);\n\n\t}",
"public function generateDcaCache()\n\t{\n\t\t$arrFiles = array();\n\n\t\t// Parse all active modules\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strDir = 'system/modules/' . $strModule . '/dca';\n\n\t\t\tif (!is_dir(TL_ROOT . '/' . $strDir))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach (scan(TL_ROOT . '/' . $strDir) as $strFile)\n\t\t\t{\n\t\t\t\tif (strncmp($strFile, '.', 1) !== 0 && substr($strFile, -4) == '.php')\n\t\t\t\t{\n\t\t\t\t\t$arrFiles[] = substr($strFile, 0, -4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$arrFiles = array_values(array_unique($arrFiles));\n\n\t\t// Create one file per table\n\t\tforeach ($arrFiles as $strName)\n\t\t{\n\t\t\t// Generate the cache file\n\t\t\t$objCacheFile = new \\File('system/cache/dca/' . $strName . '.php', true);\n\t\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\t\t// Parse all active modules\n\t\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t\t{\n\t\t\t\t$strFile = 'system/modules/' . $strModule . '/dca/' . $strName . '.php';\n\n\t\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t\t{\n\t\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Close the file (moves it to its final destination)\n\t\t\t$objCacheFile->close();\n\t\t}\n\n\t\t// Add a log entry\n\t\t$this->log('Generated the DCA cache', __METHOD__, TL_CRON);\n\t}",
"public static function getCache()\n\t{\n\t if (!self::$cache) {\n\t\t\t$frontendOptions = array('lifetime' => 604800, \n\t\t\t\t\t\t\t\t\t 'automatic_serialization' => true);\n\t\t\t$backendOptions = array('cache_dir' => APPLICATION_PATH . '/../data/cache');\n\t\t\tself::$cache \t = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);\n\t }\n\t\treturn self::$cache;\n\t}",
"public function init() {\n\t\t$this->cacheDir = $this->chatBot->vars[\"cachefolder\"];\n\n\t\t//Making sure that the cache folder exists\n\t\tif (!dir($this->cacheDir)) {\n\t\t\tmkdir($this->cacheDir, 0777);\n\t\t}\n\t}",
"public function cachePath($name)\n\t\t\t{\n\t\t\t global $CFG;\n\t\t\t $cacheFolder = $CFG['site']['project_path'].$CFG['feature']['data_cache']['folder'];\n\t\t\t if(!$cacheFolder) $cacheFolder = trim($_SERVER['DOCUMENT_ROOT'],'/').'/cache/';\n\t\t\t return $cacheFolder . md5(strtolower(trim($name))) . '.cache';\n\t\t \t}",
"public static function getCacheControl() {}",
"public static function getCache() {\n\n if (Config::get('app.cache') != 0 && !Auth::check()) { //\n $page = (Paginator::getCurrentPage() > 1 ? Paginator::getCurrentPage() : '');\n $key = 'route-' . Str::slug(Request::fullurl()) . $page;\n\n if (Cache::has($key)) {\n die(Cache::get($key));\n }\n }\n }",
"public function cache()\n {\n add_settings_field(\n 'cache',\n apply_filters($this->plugin_name . 'label-cache', esc_html__('Cache', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-library',\n [\n 'description' => 'Enable cacheing of your security.txt file.',\n 'id' => 'cache',\n 'class' => 'hide-when-disabled',\n 'value' => isset($this->options['cache']) ? $this->options['cache'] : false,\n ]\n );\n }",
"function get_cache($key) {\n return $this->get_cache_dir() . $key . '.cache';\n }",
"private function readCache(): void{\n //stdClass é uma classe predefinido ou dinamica\n $this->cache = new stdClass();\n if(file_exists('cache.cache')){\n $this->cache = json_decode(file_get_contents('cache.cache'));\n }\n }",
"public function createCache()\n {\n $lockHandler = new LockHandler(self::RETROFIT_LOCK_FILE);\n $lockHandler->lock(true);\n\n // loop through registered services and write to file\n foreach ($this->services as $service) {\n $classMetaDataProvider = new ClassMetaDataProvider($service);\n $generatedClassMetaDataProvider = new GeneratedClassMetaDataProvider($classMetaDataProvider);\n $generatedClass = $this->restClientGenerator->generate($classMetaDataProvider, $generatedClassMetaDataProvider);\n\n $this->cacheWriter->write($generatedClassMetaDataProvider, $generatedClass);\n }\n\n $lockHandler->release();\n\n return count($this->services);\n }",
"protected\n function setCachePath()\n {\n $cachePath = public_path() . config('album.paths.cache');\n\n if (!file_exists($cachePath)) mkdir($cachePath, 0777, true);\n\n return $cachePath;\n }",
"function Cache_Container_file($options = '')\n {\n if (is_array($options)) {\n $this->setOptions($options, array_merge($this->allowed_options, array('cache_dir', 'filename_prefix', 'max_userdata_linelength')));\n }\n clearstatcache();\n if ($this->cache_dir) {\n // make relative paths absolute for use in deconstructor.\n // it looks like the deconstructor has problems with relative paths\n if (OS_UNIX && '/' != $this->cache_dir{0} )\n $this->cache_dir = realpath( getcwd() . '/' . $this->cache_dir) . '/';\n\n // check if a trailing slash is in cache_dir\n if ($this->cache_dir{strlen($this->cache_dir)-1} != DIRECTORY_SEPARATOR)\n $this->cache_dir .= '/';\n\n if (!file_exists($this->cache_dir) || !is_dir($this->cache_dir))\n mkdir($this->cache_dir, 0755);\n }\n $this->entries = array();\n $this->group_dirs = array();\n \n } // end func contructor\n\n function fetch($id, $group)\n {\n $file = $this->getFilename($id, $group);\n if (PEAR::isError($file)) {\n return $file;\n }\n\n if (!file_exists($file)) {\n return array(null, null, null);\n }\n // retrive the content\n if (!($fh = @fopen($file, 'rb'))) {\n return new Cache_Error(\"Can't access cache file '$file'. Check access rights and path.\", __FILE__, __LINE__);\n }\n // File locking (shared lock)\n if ($this->fileLocking) {\n flock($fh, LOCK_SH);\n }\n // file format:\n // 1st line: expiration date\n // 2nd line: user data\n // 3rd+ lines: cache data\n $expire = trim(fgets($fh, 12));\n if ($this->max_userdata_linelength == 0 ) {\n $userdata = trim(fgets($fh));\n } else {\n $userdata = trim(fgets($fh, $this->max_userdata_linelength));\n }\n $buffer = '';\n while (!feof($fh)) {\n \t$buffer .= fread($fh, 8192);\n }\n $cachedata = $this->decode($buffer);\n\n // Unlocking\n if ($this->fileLocking) {\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n\n // last usage date used by the gc - maxlifetime\n // touch without second param produced stupid entries...\n touch($file,time());\n clearstatcache();\n\n return array($expire, $cachedata, $userdata);\n } // end func fetch\n\n /**\n * Stores a dataset.\n *\n * WARNING: If you supply userdata it must not contain any linebreaks,\n * otherwise it will break the filestructure.\n */\n function save($id, $cachedata, $expires, $group, $userdata)\n {\n $this->flushPreload($id, $group);\n\n $file = $this->getFilename($id, $group);\n if (!($fh = @fopen($file, 'wb'))) {\n return new Cache_Error(\"Can't access '$file' to store cache data. Check access rights and path.\", __FILE__, __LINE__);\n }\n\n // File locking (exclusive lock)\n if ($this->fileLocking) {\n flock($fh, LOCK_EX);\n }\n // file format:\n // 1st line: expiration date\n // 2nd line: user data\n // 3rd+ lines: cache data\n $expires = $this->getExpiresAbsolute($expires);\n fwrite($fh, $expires . \"\\n\");\n fwrite($fh, $userdata . \"\\n\");\n fwrite($fh, $this->encode($cachedata));\n\n // File unlocking\n if ($this->fileLocking) {\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n\n // I'm not sure if we need this\n\t// i don't think we need this (chregu)\n // touch($file);\n\n return true;\n } // end func save\n\n function remove($id, $group)\n {\n $this->flushPreload($id, $group);\n\n $file = $this->getFilename($id, $group);\n if (PEAR::isError($file)) {\n return $file;\n }\n\n if (file_exists($file)) {\n $ok = unlink($file);\n clearstatcache();\n\n return $ok;\n }\n\n return false;\n } // end func remove\n\n function flush($group)\n {\n $this->flushPreload();\n $dir = ($group) ? $this->cache_dir . $group . '/' : $this->cache_dir;\n\n $num_removed = $this->deleteDir($dir);\n unset($this->group_dirs[$group]);\n clearstatcache();\n\n return $num_removed;\n } // end func flush\n\n function idExists($id, $group)\n {\n return file_exists($this->getFilename($id, $group));\n } // end func idExists\n\n /**\n * Deletes all expired files.\n *\n * Garbage collection for files is a rather \"expensive\", \"long time\"\n * operation. All files in the cache directory have to be examined which\n * means that they must be opened for reading, the expiration date has to be\n * read from them and if neccessary they have to be unlinked (removed).\n * If you have a user comment for a good default gc probability please add it to\n * to the inline docs.\n *\n * @param integer Maximum lifetime in seconds of an no longer used/touched entry\n * @throws Cache_Error\n */\n function garbageCollection($maxlifetime)\n {\n $this->flushPreload();\n clearstatcache();\n\n $ok = $this->doGarbageCollection($maxlifetime, $this->cache_dir);\n\n // check the space used by the cache entries \n if ($this->total_size > $this->highwater) {\n \n krsort($this->entries);\n reset($this->entries);\n \n while ($this->total_size > $this->lowwater && list($lastmod, $entry) = each($this->entries)) {\n if (@unlink($entry['file'])) {\n $this->total_size -= $entry['size'];\n } else {\n new CacheError(\"Can't delete {$entry['file']}. Check the permissions.\");\n }\n }\n \n }\n \n $this->entries = array();\n $this->total_size = 0;\n \n return $ok;\n } // end func garbageCollection\n \n /**\n * Does the recursive gc procedure, protected.\n *\n * @param integer Maximum lifetime in seconds of an no longer used/touched entry\n * @param string directory to examine - don't sets this parameter, it's used for a\n * recursive function call!\n * @throws Cache_Error\n */\n function doGarbageCollection($maxlifetime, $dir)\n {\n if (!is_writable($dir) || !is_readable($dir) || !($dh = opendir($dir))) {\n return new Cache_Error(\"Can't remove directory '$dir'. Check permissions and path.\", __FILE__, __LINE__);\n }\n\n while ($file = readdir($dh)) {\n if ('.' == $file || '..' == $file)\n continue;\n\n $file = $dir . $file;\n if (is_dir($file)) {\n $this->doGarbageCollection($maxlifetime,$file . '/');\n continue;\n }\n\n // skip trouble makers but inform the user\n if (!($fh = @fopen($file, 'rb'))) {\n new Cache_Error(\"Can't access cache file '$file', skipping it. Check permissions and path.\", __FILE__, __LINE__);\n continue;\n }\n\n $expire = fgets($fh, 11);\n fclose($fh);\n $lastused = filemtime($file);\n \n $this->entries[$lastused] = array('file' => $file, 'size' => filesize($file));\n $this->total_size += filesize($file);\n \n // remove if expired\n if (( ($expire && $expire <= time()) || ($lastused <= (time() - $maxlifetime)) ) && !unlink($file)) {\n new Cache_Error(\"Can't unlink cache file '$file', skipping. Check permissions and path.\", __FILE__, __LINE__);\n }\n }\n\n closedir($dh);\n\n // flush the disk state cache\n clearstatcache();\n\n } // end func doGarbageCollection\n\n /**\n * Returns the filename for the specified id.\n *\n * @param string dataset ID\n * @param string cache group\n * @return string full filename with the path\n * @access public\n */\n function getFilename($id, $group)\n {\n if (isset($this->group_dirs[$group])) {\n return $this->group_dirs[$group] . $this->filename_prefix . $id;\n }\n\n $dir = $this->cache_dir . $group . '/';\n if (is_writeable($this->cache_dir)) {\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n clearstatcache();\n }\n } else {\n return new Cache_Error(\"Can't make directory '$dir'. Check permissions and path.\", __FILE__, __LINE__);\n }\n $this->group_dirs[$group] = $dir;\n\n return $dir . $this->filename_prefix . $id;\n } // end func getFilename\n\n /**\n * Deletes a directory and all files in it.\n *\n * @param string directory\n * @return integer number of removed files\n * @throws Cache_Error\n */\n function deleteDir($dir)\n {\n if (!is_writable($dir) || !is_readable($dir) || !($dh = opendir($dir))) {\n return new Cache_Error(\"Can't remove directory '$dir'. Check permissions and path.\", __FILE__, __LINE__);\n }\n\n $num_removed = 0;\n\n while (false !== $file = readdir($dh)) {\n if ('.' == $file || '..' == $file)\n continue;\n\n $file = $dir . $file;\n if (is_dir($file)) {\n $file .= '/';\n $num = $this->deleteDir($file . '/');\n if (is_int($num))\n $num_removed += $num;\n } else {\n if (unlink($file))\n $num_removed++;\n }\n }\n // according to php-manual the following is needed for windows installations.\n closedir($dh);\n unset( $dh);\n if ($dir != $this->cache_dir) { //delete the sub-dir entries itself also, but not the cache-dir.\n rmDir($dir);\n $num_removed++;\n }\n\n return $num_removed;\n } // end func deleteDir\n \n}",
"function cached($type, $parameters)\n{\n if($type == 'browse')\n $filename = CACHE.'/browse.'.$parameters['browsenode'].'.'.$parameters['page'].'.'.$parameters['mode'].'.dat';\n if($type == 'search')\n $filename = CACHE.'/search.'.$parameters['search'].'.'.$parameters['page'].'.'.$parameters['mode'].'.dat';\n if($type == 'asin')\n $filename = CACHE.'/asin.'.$parameters['asin'].'.'.$parameters['mode'].'.dat';\n \n // is cached data missing or > 1 hour old?\n if(!file_exists($filename) ||\n ((mktime() - filemtime($filename)) > 60*60))\n {\n return false;\n }\n $data = file($filename);\n $data = join($data, '');\n return unserialize($data);\n}",
"function check_cache ($cache_dir, $quality, $zoom_crop) {\n if(!file_exists($cache_dir)) {\n // give 777 permissions so that developer can overwrite\n // files created by web server user\n mkdir($cache_dir);\n chmod($cache_dir, 0777);\n }\n\n show_cache_file($cache_dir, $quality, $zoom_crop);\n}",
"protected function makeCacheFile($file, $data)\n\t{\n\t\t// Do stuff\n\t}",
"protected function getContentFromCacheFile() {}",
"private static function getCacheFileName (FilePath $tpFileName, I $templateCacheTime, B $tpInvariable = NULL) {\r\n\t\t// Make the CACHE sub-directory && set some requirements;\r\n $objTPLNoChange = $tpInvariable == NULL ? new B (FALSE) : new B (TRUE);\r\n\r\n // Make CACHE directory, based on variable ...\r\n if ($objTPLNoChange->toBoolean () == FALSE) {\r\n // Make the cache dir, based on _GET array (page);\r\n\t\t $objTPLCacheDir = new S ('dir_cache_' .\r\n\t\t $objSHA1 = sha1 (implode (_U, $_GET->toArray ())));\r\n } else {\r\n // Invariate the cache directory ...\r\n $objTPLCacheDir = new S ('dir_cache_' .\r\n $objSHA1 = sha1 ($tpFileName . $templateCacheTime));\r\n }\r\n\r\n // Get the a/b/c/d directory structure\r\n for ($i = 0; $i < strlen ($objSHA1); ++$i) {\r\n // Append the DIR ...\r\n $objTPLCacheDir->prependString ('cache_' . $objSHA1[$i] . _S);\r\n }\r\n\r\n // Make directories, recursive ...\r\n\t\tif (!is_dir (DOCUMENT_ROOT .\r\n CACHE_DIR . _S . $objTPLCacheDir)) {\r\n // Mkdir, recursive ...\r\n\t\t\tmkdir (DOCUMENT_ROOT . CACHE_DIR .\r\n _S . $objTPLCacheDir, 0777, TRUE);\r\n\t\t}\r\n\r\n // Make the cache_fname string;\r\n if ($objTPLNoChange->toBoolean () == FALSE) {\r\n // Do return variable to _GET array;\r\n return new FilePath (CACHE_DIR . _S . $objTPLCacheDir . _S . 'cache_' .\r\n sha1 ($tpFileName . md5 ($templateCacheTime . implode (_U, $_GET->toArray ()) . self::$objTpEXECounter->doInc ())) .\r\n _U . md5 ($tpFileName . $templateCacheTime . implode (_U, $_GET->toArray ())), FALSE);\r\n } else {\r\n // Do return unvariable to _GET array (to page I mean);\r\n return new FilePath (CACHE_DIR . _S . $objTPLCacheDir . _S . 'cache_' .\r\n sha1 ($tpFileName . md5 ($templateCacheTime)) . _U .\r\n md5 ($tpFileName . $templateCacheTime), FALSE);\r\n }\r\n }",
"public function saveCache()\n {\n if($this->isCacheExists()){\n if($this->isUpdateRequired()){\n $this->updateCache();\n }\n } else {\n $this->packData()->writeFile();\n }\n }",
"function cachePage($params=array()){\n\t\t$PageID = $this->getPageID($params);\n\t\t\n\t\tif ( !isset($params['data']) ) trigger_error('Missing parameter \"data\": '.Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t$Data = $params['data'];\n\t\t$Language = ( isset($params['lang']) ? $params['lang'] : $this->app->_conf['lang']);\n\t\tif ( class_exists('Dataface_AuthenticationTool') ){$auth =& Dataface_AuthenticationTool::getInstance();\n\t\t\t$UserID = ( isset($params['user']) ? $params['user'] : $auth->getLoggedInUsername());\n\t\t} else {\n\t\t\t$UserID = null;\n\t\t}\n\t\t\n\t\t$Expires = (isset($params['expires']) ? $params['expires'] : time() + $this->lifeTime);\n\t\t$tables = (isset($params['tables']) ? $params['tables'] : '');\n\t\t$Dependencies = (is_array($tables) ? implode(',',$tables) : $tables);\n\t\t\n\t\tif ( $this->useGzipCompression && extension_loaded('zlib') ){\n\t\t\t// If we are using GZIP compression then we will use zlib library\n\t\t\t// functions (gzcompress) to compress the data also for storage\n\t\t\t// in the database.\n\t\t\t// Apparently we have to play with the headers and footers of the \n\t\t\t// gzip file for it to work properly with the web browsers.\n\t\t\t// see http://ca.php.net/gzcompress user comments.\n\t\t\t\n\t\t\t$size = strlen($Data);\n\t\t\t$crc = crc32($Data);\n\t\t\t/*\n\t\t\t$Data_gz = \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\".\n\t\t\t\t\t\tsubstr(gzcompress($Data,9),0, $size-4).\n\t\t\t\t\t\t$this->_gzipGetFourChars($crc).\n\t\t\t\t\t\t$this->_gzipGetFourChars($size);\n\t\t\t*/\n\t\t\t/* Fix for IE compatibility .. seems to work for mozilla too. */\n\t\t\t$Data_gz = \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\".\n\t\t\t\t\t\tsubstr(gzcompress($Data,9),0, $size);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif ( isset($params['randomize']) and $params['randomize'] ){\n\t\t\t// We are keeping multiple versions of this page so that we can \n\t\t\t// show them on a random rotation. This is to simulate dynamicism\n\t\t\t// while still caching pages.\n\t\t\t\n\t\t\t// Basically the following query will delete existing cached versions\n\t\t\t// of this page except for the most recent X versions - where X\n\t\t\t// is the number specified in the $randomize parameter. The \n\t\t\t// $randomize parameter is the number of versions of this page\n\t\t\t// that should be used on random rotation.\n\t\t\t$res = mysql_query(\"\n\t\t\t\tDELETE FROM `\".addslashes($this->tableName).\"`\n\t\t\t\tWHERE \n\t\t\t\t\t`PageID`='\".addslashes($PageID).\"' AND\n\t\t\t\t\t`Language`='\".addslashes($Language).\"' AND\n\t\t\t\t\t`UserID`='\".addslashes($UserID).\"' AND\n\t\t\t\t\t`GenID` NOT IN (\n\t\t\t\t\t\tSELECT `GenID` FROM `\".addslashes($this->tableName).\"`\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t`PageID`='\".addslashes($PageID).\"' AND\n\t\t\t\t\t\t\t`Language`='\".addslashes($Language).\"' AND\n\t\t\t\t\t\t\t`UserID`='\".addslashes($UserID).\"'\n\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t`LastModified` desc\n\t\t\t\t\t\tLIMIT \".(intval($params['randomize']) - 1).\"\n\t\t\t\t)\", $this->app->db() );\n\t\t\t\n\t\t\tif ( !$res ){\n\t\t\t\ttrigger_error(mysql_error($this->app->db()), E_USER_ERROR);\n\t\t\t}\n\t\t} else {\n\t\t\t// We are not randomizing. We delete any existing pages.\n\t\t\t$res = mysql_query(\"\n\t\t\t\tDELETE FROM `\".addslashes($this->tableName).\"`\n\t\t\t\tWHERE\n\t\t\t\t\t`PageID`='\".addslashes($PageID).\"' AND\n\t\t\t\t\t`Language`='\".addslashes($Language).\"' AND\n\t\t\t\t\t`UserID`='\".addslashes($UserID).\"'\", $this->app->db());\n\t\t\tif ( !$res ){\n\t\t\t\ttrigger_error(mysql_error($this->app->db()), E_USER_ERROR);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Get the headers so we can reproduce them properly.\n\t\tif ( function_exists('headers_list') ){\n\t\t\t$headers = serialize(headers_list());\n\t\t} else {\n\t\t\t$headers = array();\n\t\t}\t\n\t\t\n\t\t// Now we can insert the cached page.\n\t\t$sql = \"\n\t\t\tINSERT INTO `\".addslashes($this->tableName).\"`\n\t\t\t(`PageID`,`Language`,`UserID`,`Dependencies`,`Expires`,`Data`,`Data_gz`, `Headers`)\n\t\t\tVALUES\n\t\t\t('\".addslashes($PageID).\"',\n\t\t\t '\".addslashes($Language).\"',\n\t\t\t '\".addslashes($UserID).\"',\n\t\t\t '\".addslashes($Dependencies).\"',\n\t\t\t FROM_UNIXTIME('\".addslashes($Expires).\"'),\n\t\t\t '\".addslashes($Data).\"',\n\t\t\t '\".addslashes($Data_gz).\"',\n\t\t\t '\".addslashes($headers).\"'\n\t\t\t)\";\n\t\t\t//file_put_contents('/tmp/dump.sql',$sql);\n\t\t$res = mysql_query($sql, $this->app->db());\n\t\t\n\t\tif ( !$res ){\n\t\t\ttrigger_error(mysql_error($this->app->db()), E_USER_ERROR);\n\t\t}\n\t\n\t\tif ( @$this->app->_conf['_output_cache']['cachedir'] ){\n\t\t\t$filename = DATAFACE_SITE_PATH.'/'.$this->app->_conf['_output_cache']['cachedir'];\n\t\t\t$dir = $PageID{0};\n\t\t\t$filename = $filename.'/'.$dir;\n\t\t\tif ( !file_exists($filename)){\n\t\t\t\tmkdir($filename, 0777);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$filename .= '/'.$PageID.'-'.md5($Language.'-'.$UserID);\n\t\t\tif ( file_exists($filename) ){\n\t\t\t\t@unlink($filename);\n\t\t\t} \n\t\t\t//echo \"Opening $filename\";\n\t\t\t$fh = fopen($filename, 'w');\n\t\t\tif ( $fh ){ \n\t\t\t\tfwrite($fh, $Data);\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t\t\n\t\t\t$fh = fopen($filename.'.gz', 'w');\n\t\t\tif ( $fh ){\n\t\t\t\tfwrite($fh, $Data_gz);\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t}",
"function elgg_get_filepath_cache() {\n\tglobal $CONFIG;\n\tstatic $FILE_PATH_CACHE;\n\tif (!$FILE_PATH_CACHE) {\n\t\t$FILE_PATH_CACHE = new ElggFileCache($CONFIG->dataroot);\n\t}\n\n\treturn $FILE_PATH_CACHE;\n}",
"protected function cacheTldList()\n {\n $fileName = $this->getCachePath( '/domainparser_tlds.json' );\n file_put_contents( $fileName, json_encode( $this->getTldList() ) );\n }",
"public function tempPageCacheContent() {}"
] | [
"0.8032596",
"0.7266751",
"0.7152086",
"0.70346427",
"0.69950426",
"0.6909286",
"0.6856285",
"0.68492174",
"0.6748739",
"0.67213154",
"0.6671114",
"0.66402024",
"0.6599811",
"0.6592925",
"0.65740734",
"0.65656614",
"0.6564179",
"0.65263647",
"0.65126586",
"0.6494167",
"0.6493654",
"0.64739585",
"0.64381903",
"0.64347255",
"0.64293754",
"0.6419519",
"0.641384",
"0.64052653",
"0.63971984",
"0.6395149",
"0.6388129",
"0.6365255",
"0.63588035",
"0.63532984",
"0.63463086",
"0.6336106",
"0.6335927",
"0.63296586",
"0.6329265",
"0.6328189",
"0.63229793",
"0.6319245",
"0.6303671",
"0.629714",
"0.62882996",
"0.62808734",
"0.6270469",
"0.62702715",
"0.6262361",
"0.62617046",
"0.625355",
"0.62457037",
"0.6241639",
"0.6239485",
"0.62256926",
"0.62252474",
"0.61924094",
"0.6190656",
"0.6180885",
"0.6166468",
"0.6163184",
"0.6159776",
"0.61569065",
"0.6155912",
"0.615529",
"0.61537105",
"0.61396396",
"0.6137837",
"0.6136107",
"0.61357147",
"0.6129174",
"0.6125646",
"0.6115887",
"0.61080647",
"0.6100658",
"0.6100323",
"0.60995644",
"0.6076015",
"0.6073049",
"0.6072317",
"0.605787",
"0.6056629",
"0.605451",
"0.60477984",
"0.60461",
"0.60424227",
"0.603618",
"0.6033981",
"0.6022805",
"0.60196793",
"0.6013106",
"0.60116065",
"0.59915185",
"0.5991196",
"0.5970161",
"0.5961435",
"0.5956433",
"0.59388554",
"0.59381354",
"0.59313005"
] | 0.64248854 | 25 |
/ Make Size Format | function MakeSize($str, $type) {
$rStr = @explode("x", $str);
if ($type == 'inch') {
$reqSize = $rStr[0] . '"' . "x" . $rStr[1] . '"';
} elseif ($type == 'feet') {
$reqSize = $rStr[0] . "'" . 'x' . $rStr[1] . "'";
}
return $reqSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFormatSize() {}",
"function cre_resize_bytes($size) {\n $count = 0;\n $format = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\");\n while(($size/1024)>1 && $count<8) {\n $size=$size/1024;\n $count++;\n }\n $return = number_format($size,0,'','.').\" \".$format[$count];\n return $return;\n }",
"function sizeFormat($size) { \n if($size<1024) \n { \n return $size.\" bytes\"; \n } \n else if($size<(1024*1024)) \n { \n $size=round($size/1024,1); \n return $size.\" KB\"; \n } \n else if($size<(1024*1024*1024)) \n { \n $size=round($size/(1024*1024),1); \n return $size.\" MB\"; \n } \n else \n { \n $size=round($size/(1024*1024*1024),1); \n return $size.\" GB\"; \n } \n}",
"function format_size($file_size, $sizetype) {\n\t\tswitch(strtolower($sizetype)){\n\t\t\tcase \"kb\":\n\t\t\t\t$filesize = $file_size * .0009765625; // bytes to KB\n\t\t\tbreak;\n\t\t\tcase \"mb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625; // bytes to MB\n\t\t\tbreak;\n\t\t\tcase \"gb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625 * .0009765625; // bytes to GB\n\t\t\tbreak;\n\t\t}\n\t\tif($filesize <= 0){\n\t\t\t$filesize = 0;\n\t\t} else {\n\t\t\t$filesize = round($filesize, 2).' '.$sizetype;\n\t\t}\n\t\treturn $filesize;\n\t}",
"function size_format($bytes, $decimals = 0)\n {\n }",
"public function formatSizeDataProvider() {}",
"function testFormatSize() {\n\t\t$this->assertEquals(\"1000 bytes\", File::format_size(1000));\n\t\t$this->assertEquals(\"1023 bytes\", File::format_size(1023));\n\t\t$this->assertEquals(\"1 KB\", File::format_size(1025));\n\t\t$this->assertEquals(\"9.8 KB\", File::format_size(10000));\n\t\t$this->assertEquals(\"49 KB\", File::format_size(50000));\n\t\t$this->assertEquals(\"977 KB\", File::format_size(1000000));\n\t\t$this->assertEquals(\"1 MB\", File::format_size(1024*1024));\n\t\t$this->assertEquals(\"954 MB\", File::format_size(1000000000));\n\t\t$this->assertEquals(\"1 GB\", File::format_size(1024*1024*1024));\n\t\t$this->assertEquals(\"9.3 GB\", File::format_size(10000000000));\n\t\t// It use any denomination higher than GB. It also doesn't overflow with >32 bit integers\n\t\t$this->assertEquals(\"93132.3 GB\", File::format_size(100000000000000));\n\t}",
"function format_filesize($size)\r\n{\r\n\r\n // Measure & Number of decimals\r\n $measures = array (\r\n 0 => array ( \"B\", 0 ),\r\n 1 => array ( \"KB\", 0 ),\r\n 2 => array ( \"MB\", 0 ),\r\n 3 => array ( \"GB\", 2 ),\r\n 4 => array ( \"TB\", 3 )\r\n );\r\n\r\n $file_size = (double)$size;\r\n\r\n for ( $i = 0; $file_size >= 1024; $i++ )\r\n {\r\n $file_size = (double)$file_size / 1024;\r\n }\r\n\r\n $file_size = number_format ( $file_size, $measures[$i][1] );\r\n\r\n return $file_size.\" \".$measures[$i][0];\r\n}",
"function filesize_formatted($size)\n{\n\t$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t$power = $size > 0 ? floor(log($size, 1024)) : 0;\n\treturn number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];\n}",
"function formatSize($filename)\n\t{\n\n\t\tif (is_string($filename) && !is_numeric($filename)) $size = filesize($filename);\n\n\t\t$mod = 1024;\n\t\t$units = explode(' ', 'B KB MB GB TB PB');\n\n\t\tfor ($i = 0; $size > $mod; $i++)\n\t\t{\n\t\t\t$size /= $mod;\n\t\t}\n\n\t\treturn round($size, 2).' '.$units[$i];\n\n\t}",
"function twe_format_filesize($size) {\n\t$a = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\");\n\t\n\t$pos = 0;\n\twhile ($size >= 1024) {\n\t\t$size /= 1024;\n\t\t$pos++;\n\t}\n\treturn round($size,2).\" \".$a[$pos];\n}",
"function sloodle_convert_file_size_shorthand($size)\n {\n $size = trim($size);\n $num = (int)$size;\n $char = strtolower($size{strlen($size)-1});\n switch ($char)\n {\n case 'g': $num *= 1024;\n case 'm': $num *= 1024;\n case 'k': $num *= 1024;\n }\n\n return $num;\n }",
"public function getSizeFormatted($si = false);",
"public static function formatSize($size)\n {\n if ($size < DRUSH_KILOBYTE) {\n // format_plural() not always available.\n return dt('@count bytes', ['@count' => $size]);\n } else {\n $size /= DRUSH_KILOBYTE; // Convert bytes to kilobytes.\n $units = [\n dt('@size KB', []),\n dt('@size MB', []),\n dt('@size GB', []),\n dt('@size TB', []),\n dt('@size PB', []),\n dt('@size EB', []),\n dt('@size ZB', []),\n dt('@size YB', []),\n ];\n foreach ($units as $unit) {\n if (round($size, 2) >= DRUSH_KILOBYTE) {\n $size /= DRUSH_KILOBYTE;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }",
"function _files_formatFileSize($size) {\n\t$suffix = '';\n\t\n\t## check if we got a number\n\tif(!is_numeric($size) || $size < 0) {\n\t\treturn 0;\n\t}\n\t\n\t## now determine the 'level'\n\tfor($level = 0; $size >= 1024; $level++) {\n\t\t$size /= 1024;\n\t}\n\t\n\t## now add the suffix\n\tswitch($level) {\n\t\tcase 0: $suffix = 'Bytes'; break;\n\t\tcase 1: $suffix = 'KB'; break;\n\t\tcase 2: $suffix = 'MB'; break;\n\t\tcase 3: $suffix = 'GB'; break;\n\t\tdefault: $suffix = '';\n\t}\n\t\n\treturn round($size,2) . ' '.$suffix;\n}",
"public function getSize(): string\n {\n $B = 1;\n $KB = $B * 1024;\n $MB = $KB * 1024;\n $GB = $MB * 1024;\n\n $bytes = filesize($this->filePath);\n\n $units = match (true)\n {\n $bytes >= $GB => ['suffix' => 'GiB', 'base' => $GB, 'css' => 'text-dark'],\n $bytes >= $MB => ['suffix' => 'MiB', 'base' => $MB, 'css' => 'text-light'],\n $bytes >= $KB => ['suffix' => 'KiB', 'base' => $KB, 'css' => 'text-muted'],\n default => ['suffix' => 'B', 'base' => $B, 'css' => 'text-danger']\n };\n\n return sprintf('%.3f', $bytes / $units['base']) . $units['suffix'];\n }",
"protected function formatSizes()\n {\n /*\n allow for multiple formats\n 'lg' => 800\n or\n 'lg' => [800, 600]\n or\n 'lg' => ['width' => ..., 'height' => ...]\n */\n foreach (static::sizes() as $key => $size) {\n if (! is_array($size)) {\n $f[$key] = ['width' => $size, 'height' => $size];\n } elseif (! isset($size['width'])) {\n $f[$key] = ['width' => $size[0], 'height' => $size[1]];\n } else {\n $f[$key] = $size;\n }\n }\n\n return $f;\n }",
"function convert($size)\n {\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }",
"function format_toSizeInBytes_shortForm($size_in_bytes) {\n\t\t//\n\t\t// Data sizes are normally specified in KB - powers of 1024, so return KB rather than kB\n\n\t\tif ($size_in_bytes < (1024 * 1024)) {\n\t\t\t$unit = \"K\";\n\t\t\t$unitSize = $size_in_bytes / 1024;\n\t\t} else if ($size_in_bytes < (1024 * 1024 * 1024)) {\n\t\t\t$unit = \"M\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024);\n\t\t} else {\n\t\t\t$unit = \"G\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024 * 1024);\n\t\t}\n\n\t\t$showDecimalPlace = $unitSize < 10 && round($unitSize, 1) != round($unitSize);\n\n\t\treturn sprintf($showDecimalPlace ? \"%1.1f\" : \"%1.0f\", $unitSize) . $unit;\n\t}",
"function prettySize($size)\n{\n $limit = 10 * 1024;\n $mult = 1;\n\n if ($size < ($limit * $mult)) {\n $retSize = $size . \" bytes\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" KiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" MiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" GiB\";\n } else {\n $mult *= 1024;\n $size = round($size / $mult);\n $retSize = $size . \" TiB\";\n }\n }\n }\n }\n return $retSize;\n}",
"function formatBytes($size) {\n $units = array(' B', ' KB', ' MB', ' GB', ' TB');\n for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n return round($size, 2).$units[$i];\n}",
"function format_bytes ( $size ) {\n\t\tswitch ( $size ) {\n\t\t\tcase $size > 1000000:\n\t\t\t\treturn number_format(ceil($size / 1000000)) . \"mb\";\n\t\t\t\tbreak;\n\t\t\tcase $size > 1000:\n\t\t\t\treturn number_format(ceil($size / 1000)) . \"k\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn number_format($size) . \"b\";\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function getSize() ;",
"function sizeFormat($b = 0){\r\n\t\tif($b < 1024){\r\n\t\t\treturn $b . 'bytes';\r\n\t\t}elseif($b < 1048576){\r\n\t\t\treturn round($b / 1024 * 100 ) / 100 . 'KB';\r\n\t\t}elseif($b < 130023424){\r\n\t\t\treturn round($b / 1048576 * 100 ) / 100 . 'MB';\r\n\t\t}elseif($b < 133143986176){\r\n\t\t\treturn round($b / 130023424 * 100) / 100 . 'GB';\r\n\t\t}else{\r\n\t\t\treturn round($b / 133143986176 * 100) / 100 . 'TB';\r\n\t\t}\r\n\t}",
"function humanFileSize($size,$unit=\"\") \n {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n }",
"function file_size($size)\r\n\r\n{\r\n\r\n\t$units = array('b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb');\r\n\r\n\r\n\r\n\tfor ($i = 0; $size > 1024; $i++)\r\n\r\n\t\t$size /= 1024;\r\n\r\n\r\n\r\n\treturn round($size, 2).' '.$units[$i];\r\n\r\n}",
"public static function fsize($size){\n $unit = array('b','Kb','Mb','Gb','Tb','Pb');\n $prefix = $size < 0 ? '-' : ''; $size = abs($size);\n return $prefix.@round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }",
"function view_size($size) {\n\n\tif (!is_numeric($size))\n\t\treturn \"[Error]\";\n\telse {\n\t\tif ($size >= 1073741824)\n\t\t\t$size = round($size/1073741824*100)/100 .\" GB\";\n\t\telse\n\t\t\tif ($size >= 1048576)\n\t\t\t\t$size = round($size/1048576*100)/100 .\" MB\";\n\t\telse\n\t\t\tif ($size >= 1024)\n\t\t\t\t$size = round($size/1024*100)/100 .\" KB\";\n\t\telse \n\t\t\t$size = $size . \" B\";\n\t\t\t\n\t\treturn $size;\n\t}\n}",
"function round_up_bytes($size) {\n if($size < 1024) {\n return array('size'=>round($size,2),'label'=>'B');\n } elseif($size >= 1024 AND $size < 1048576) {\n return array('size'=>round(($size / 1024),2),'label'=>'KB');\n } elseif($size >= 1048576 AND $size < 1073741824) {\n return array('size'=>round(($size / 1048576),2),'label'=>'MB');\n } else {\n return array('size'=>round(($size / 1073741824),2),'label'=>'GB');\n }\n}",
"function ConvertFeettoInch($size, $sizetype) {\r\n $vSize = @explode(\"x\", $size);\r\n if ($sizetype == 'feet') {\r\n $h = $vSize[0] * 12;\r\n $w = $vSize[1] * 12;\r\n } else {\r\n $h = $vSize[0];\r\n $w = $vSize[1];\r\n }\r\n $reqsize = $h . \"x\" . $w;\r\n return $reqsize;\r\n}",
"function sloodle_get_size_description($size)\n {\n // Make sure we have a number of bytes\n $bytes = 0;\n if (is_int($size)) $bytes = $size;\n else $bytes = sloodle_convert_file_size_shorthand($size);\n $desc = '';\n\n // Keep the number small by going with the largest possible units\n if ($bytes >= 1073741824) $desc = ($bytes / 1073741824).\" GB\";\n else if ($bytes >= 1048576) $desc = ($bytes / 1048576). \" MB\";\n else if ($bytes >= 1024) $desc = ($bytes / 1024). \" KB\";\n else $desc = $bytes . \" bytes\";\n\n return $desc;\n }",
"function human_filesize($size,$unit=\"\") {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n}",
"public function getFormattedSize() {\r\n\t\r\n\t $bytes = $this->getSize();\r\n\t\r\n\t if ($bytes >= 1073741824)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1073741824, 2) . ' GB';\r\n\t }\r\n\t elseif ($bytes >= 1048576)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1048576, 2) . ' MB';\r\n\t }\r\n\t elseif ($bytes >= 1024)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1024, 2) . ' KB';\r\n\t }\r\n\t elseif ($bytes > 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' bytes';\r\n\t }\r\n\t elseif ($bytes == 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' byte';\r\n\t }\r\n\t else\r\n\t {\r\n\t\t$bytes = '0 bytes';\r\n\t }\r\n\r\n\t return $bytes;\r\n\t \r\n }",
"public function getSize()\n {\n return \"Small\";\n }",
"function size_readable ($size, $retstring = null) {\n // adapted from code at http://aidanlister.com/repos/v/function.size_readable.php\n $sizes = array('B ', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n if ($retstring === null) { $retstring = '%01.2f %s'; }\n $lastsizestring = end($sizes);\n foreach ($sizes as $sizestring) {\n if ($size < 1024) { break; }\n if ($sizestring != $lastsizestring) { $size /= 1024; }\n }\n if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional\n return sprintf($retstring, $size, $sizestring);\n }",
"function bytes_to_human_size($size, $decimals = 1)\n {\n $suffix = array('Bytes','KB','MB','GB','TB','PB','EB','ZB','YB','NB','DB');\n $i = 0;\n\n while ($size >= 1024 && ($i < count($suffix) - 1)) {\n $size /= 1024;\n $i++;\n }\n\n return round($size, $decimals) . ' ' . $suffix[$i];\n }",
"function formatSize($b)\n\t{\n\t\t//1024\t\tk\n\t\t//1048576\tm\n\t\t//1073741824\tg\n\n\t\tif ($b >= 1073741824)\n\t\t\t$thesize = round($b / 1073741824 * 100) / 100 . \"G\"; \n\t\telseif ($b >= 1048576)\n\t\t\t$thesize = round($b / 1048576 * 100) / 100 . \"MB\";\n\t\telseif ($b >= 1024)\n\t\t\t$thesize = round($b / 1024 * 100) / 100 . \"K\"; \n\t\telse\n\t\t\t$thesize = $b . \"b\";\n\n\t\treturn $thesize;\n\t}",
"function size_format($bytes=\"\")\n\t{\n\t\t$retval = \"\";\n\t\t\n\t\tif ($bytes >= 1048576)\n\t\t{\n\t\t\t$retval = round($bytes / 1048576 * 100 ) / 100 . $this->lang['sf_mb'];\n\t\t}\n\t\telse if ($bytes >= 1024)\n\t\t{\n\t\t\t$retval = round($bytes / 1024 * 100 ) / 100 . $this->lang['sf_k'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$retval = $bytes . $this->lang['sf_bytes'];\n\t\t}\n\t\t\n\t\treturn $retval;\n\t}",
"function byteSizeConvert($size){\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n}",
"function calc_size()\n\t{\n\t}",
"function human_filesize($size, $precision = 2) {\n $units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');\n $step = 1024;\n $i = 0;\n while (($size / $step) > 0.9) {\n $size = $size / $step;\n $i++;\n }\n return round($size, $precision).$units[$i];\n}",
"public function getSize(): string;",
"function fileOfSize($size, $precision = 2)\n{\n if ($size >= 1099511627776) return round(($size / 1099511627776 * 100) / 100, $precision) . ' To';\n if ($size >= 1073741824) return round(($size / 1073741824 * 100) / 100, $precision) . ' Go';\n if ($size >= 1048576) return round(($size / 1048576 * 100) / 100, $precision) . ' Mo';\n if ($size >= 1024) return round(($size / 1024 * 100) / 100, $precision) . ' Ko';\n if ($size > 0) return $size . ' o';\n return '-';\n}",
"function file_size_readable ($size, $retstring = null) {\n $sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n if ($retstring === null) { $retstring = '%01.2f %s'; }\n $lastsizestring = end($sizes);\n foreach ($sizes as $sizestring) {\n if ($size < 1024) { break; }\n if ($sizestring != $lastsizestring) { $size /= 1024; }\n }\n if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional\n return sprintf($retstring, $size, $sizestring);\n}",
"function bsize($size) {\n foreach (array('', 'K', 'M', 'G') as $k) {\n if ($size < 1024) {\n break;\n }\n $size /= 1024;\n }\n return sprintf(\"%5.1f %sBytes\", $size, $k);\n}",
"public function size()\n { \n $props = $this->uri->ruri_to_assoc();\n\n if (!isset($props['o'])) exit(0);\n $w = -1;\n $h = -1;\n $m = 0;\n if (isset($props['w'])) $w = $props['w'];\n if (isset($props['h'])) $h = $props['h'];\n if (isset($props['m'])) $m = $props['m'];\n\n $this->img->set_img($props['o']);\n $this->img->set_size($w, $h, $m);\n $this->img->set_square($m);\n $this->img->get_img();\n }",
"function _parseSize($size)\r\n\t{\r\n\t\tif ($size < 1024) {\r\n\t\t\treturn $size . ' bytes';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($size >= 1024 && $size < 1024 * 1024) {\r\n\t\t\t\treturn sprintf('%01.2f', $size / 1024.0) . ' Kb';\r\n\t\t\t} else {\r\n\t\t\t\treturn sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb';\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function filesize_format($filesize) {\r\n\r\n\tif ($filesize >= 1073741824) $string = round($filesize / 1073741824).\" GB\";\r\n\telseif ($filesize >= 1048576) $string = round($filesize / 1048576).\" MB\";\r\n\telseif ($filesize >= 1024) $string = round($filesize / 1024).\" KB\";\r\n\telse $string = \"$filesize bytes\";\r\n\treturn $string;\r\n\t\r\n}",
"public static function toDataSizeString($size, $scale = 1024, $unit = 'oct', $kilo = 'Ko', $mega = 'Mo', $giga = 'Go', $tera = 'To') {\r\n if ($size < $scale) {\r\n return $size . ' ' . $unit;\r\n } elseif ($size < ($scale * $scale)) {\r\n return sprintf('%01.2f ' . $kilo, $size / $scale);\r\n } elseif ($size < ($scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $mega, $size / ($scale * $scale));\r\n } elseif ($size < ($scale * $scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $giga, $size / ($scale * $scale * $scale));\r\n }\r\n return sprintf('%01.2f ' . $tera, $size / ($scale * $scale * $scale * $scale));\r\n }",
"private function getSizeFormattedSi(int $size): string\n {\n if ($size > 1000 * 1000) {\n return sprintf('%0.1f MB', ($size / 1000 / 1000));\n }\n if ($size > 1000) {\n return sprintf('%0.1f KB', ($size / 1000));\n }\n\n return $size . ' B';\n }",
"function virustotalscan_get_size($size)\r\n{\r\n $standard = floatval(1024);\r\n if (floatval($size) < $standard) {\r\n // atunci sunt biti\r\n return $size.\" bytes\";\r\n }\r\n else {\r\n // sunt mai mult de 1024 de biti\r\n if (floatval(floatval($size)/1024) > $standard) {\r\n // atunci este de ordinul MB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024/1024, 2). \" MB\";\r\n }\r\n else {\r\n // este de ordinul KB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024, 2). \" KB\";\r\n }\r\n // restul nu ne intereseaza pentru ca nu pot fi incarcate fisiere mai mari de 1 GB\r\n }\t\r\n}",
"public function getSizeForHuman()\n {\n return File::format_size($this->Size);\n }",
"function number_to_human_size($bytes){\n\t$border = 1024 * 1.5;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u Byte', $bytes);\n\t\n\t$bytes /= 1024;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u KiByte', $bytes);\n\t\n\t$bytes /= 1024;\n\treturn sprintf('%.1f MiByte', $bytes);\n}",
"function acf_format_filesize($size = 1)\n{\n}",
"function custom_sizes() {\n\n}",
"function ccac_2020_new_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}",
"function format_bytes($size, $precision = 0)\n {\n $sizes = array(\n 'YB',\n 'ZB',\n 'EB',\n 'PB',\n 'TB',\n 'GB',\n 'MB',\n 'KB',\n 'B'\n );\n $total = count($sizes);\n \n while ($total-- && $size > 1024)\n $size /= 1024;\n return sprintf('%.' . $precision . 'f', $size) . $sizes[$total];\n }",
"public static function formatSize($size, $decimals = 1) {\n\t\t\n\t\tif($size==0)\n\t\t\treturn \"0 bytes\";\n\t\t\n\t\tswitch ($size) {\n\t\t\tcase ($size >= 1073741824) :\n\t\t\t\t$size = self::localize($size / 1073741824, $decimals);\n\t\t\t\t$size .= \" G\";\n\t\t\t\tbreak;\n\n\t\t\tcase ($size >= 1048576) :\n\t\t\t\t$size = self::localize($size / 1048576, $decimals);\n\t\t\t\t$size .= \" M\";\n\t\t\t\tbreak;\n\n\t\t\tcase ($size >= 1024) :\n\t\t\t\t$size = self::localize($size / 1024, $decimals);\n\t\t\t\t$size .= \" K\";\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\t$size = self::localize($size, $decimals);\n\t\t\t\t$size .= \" bytes\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $size;\n\t}",
"function formatBytes($size, $precision = 2)\n {\n $base = log($size, 1024);\n $suffixes = array('', 'K', 'M', 'G', 'T'); \n\n return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];\n }",
"function format_size($row) {\n if (is_null($row['job_size'])) {\n return \"...\";\n }\n $size = sprintf(\"%.2f\", $row['job_size']/1024).\" kb\";\n if (identity_can('job-view-source', $row)) {\n return format_link(url_job_view_source($row['id']), $size);\n }\n return $size;\n }",
"function sizetobytes($size,$reverse=false) {\n\t\t//UNITS TO BYTES\n\t\tif(!$reverse) {\n\t\t\t$unit = strtolower($size);\n\t\t\t$unit = preg_replace('/[^a-z]/', '', $unit);\n\t\t\t$value = intval(preg_replace('/[^0-9]/', '', $size));\n\t\t\t$units = array('b'=>0, 'kb'=>1, 'mb'=>2, 'gb'=>3, 'tb'=>4);\n\t\t\t$exponent = isset($units[$unit]) ? $units[$unit] : 0;\n\t\t\treturn ($value * pow(1024, $exponent)); \n\t\t} \n\t\t//BYTES TO UNITS\n if ($size >= 1073741824) {\n $size = number_format($size / 1073741824, 2).' gb';\n } elseif ($size >= 1048576) {\n $size = number_format($size / 1048576, 2).' mb';\n } elseif ($size >= 1024) {\n $size = number_format($size / 1024, 2).' kb';\n } elseif ($size > 1) {\n $size = $size.' bytes';\n } elseif ($size == 1) {\n $size = $size.' byte';\n } else {\n $size = '0 bytes';\n }\n\n return $size;\n\t}",
"private function makeImageSize(): void\n {\n list($width, $height) = getimagesize($this->getUrl());\n $size = array('height' => $height, 'width' => $width );\n\n $this->width = $size['width'];\n $this->height = $size['height'];\n }",
"function parse_size($size) {\n $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.\n $size = preg_replace('/[^0-9\\.]/', '', $size); // Remove the non-numeric characters from the size.\n if ($unit) {\n // Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.\n return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));\n }\n else {\n return round($size);\n }\n }",
"function fm_readable_filesize($size) {\r\n\t$filesizename = array(\" Bytes\", \" KB\", \" MB\", \" GB\", \" TB\", \" PB\", \" EB\", \" ZB\", \" YB\");\r\n\tif ($size != 0) {\r\n\t\treturn round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $filesizename[$i];\r\n\t} else {\r\n\t\treturn \"0\".$filesizename[0];\r\n\t}\r\n}",
"public function getOriginalSize():string\n {\n }",
"private function buildSize() {\n return '&size=' . $this->mappingOptions->size;\n }",
"function convertPHPSizeToBytes($sSize) \n{ \n if ( is_numeric( $sSize) ) {\n return $sSize;\n }\n $sSuffix = substr($sSize, -1); \n $iValue = substr($sSize, 0, -1); \n switch(strtoupper($sSuffix)){ \n case 'P':\n $iValue *= 1024;\n case 'T':\n $iValue *= 1024;\n case 'G':\n $iValue *= 1024;\n case 'M':\n $iValue *= 1024;\n case 'K':\n $iValue *= 1024;\n break;\n } \n return $iValue;\n}",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"function formatBytes($size, $precision = 1)\n{\n $base = log($size, 1024);\n $suffixes = array('B', 'KB', 'MB', 'GB', 'TB');\n return round(pow(1024, $base - floor($base)), $precision) . ' ' . $suffixes[floor($base)];\n}",
"public static function formatSize($bytes, $round=1)\n\t{\n\t\t$suffix = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t\tfor ($i=0; $bytes > 1024 && isset($suffix[$i+1]); $i++) {$bytes /= 1024;}\n\t\treturn round($bytes,$round).\" \".$suffix[$i];\n\t}",
"public static function get_sizes()\n {\n }",
"function file_size_nice($size) {\n\t// Adapted from: http://www.php.net/manual/en/function.filesize.php\n\n\t$mod = 1024;\n\n\t$units = explode(' ', 'B KB MB GB TB PB');\n\tfor ($i = 0; $size > $mod; $i++) {\n\t\t$size /= $mod;\n\t}\n\n\treturn round($size, 2) . ' ' . $units[$i];\n}",
"function humanReadableToBytes (string $size): int {\n\t$unitIndex = 0;\n\n\t$chars = str_split($size);\n\t$charsLen = count($chars);\n\n\t$multipliers =\n\t\t[\n\t\t\t'B' => 1,\n\t\t\t'KB' => 1 << 10,\n\t\t\t'MB' => 1 << 20,\n\t\t\t'GB' => 1 << 30,\n\t\t\t'TB' => 1 << 40\n\t\t];\n\n\tfor ($i = 0; $i < $charsLen; $i++) {\n\t\tif (!is_numeric($size[$i]) and $size[$i] != '.') {\n\t\t\t$unitIndex = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t$sizeN = floatval(substr($size, 0, $unitIndex));\n\t$sizeU = substr($size, $unitIndex, $charsLen - $unitIndex);\n\n\treturn round($sizeN * $multipliers[$sizeU]);\n}",
"function FormatSizeDisplay($fileSizeInfo, $precision = 2)\n\t{\n\t\t\t// $this->fileSizeDisplay .= $fileSizeInfo.\" (bytes)\" ;\n\t\t// elseif ($fileSizeInfo >= 1024 && $fileSizeInfo < 1<<20)\n\t\t\t// $this->fileSizeDisplay = number_format($fileSizeInfo/1024,2,\".\",\"\").\" (Kb)\";\n\t\t// elseif ($fileSizeInfo >= 1<<20)\n\t\t\t// $this->fileSizeDisplay = number_format($fileSizeInfo/(1<<20),2,\".\",\"\").\" (Mb)\";\n\t\t\t\n\t\tif ($fileSizeInfo < 1000000)\n\t\t\t$fileSizeDisplay = number_format($fileSizeInfo/1000, $precision,\".\",\"\").\" Kb\";\n\t\telse\n\t\t\t$fileSizeDisplay = number_format($fileSizeInfo/1000000, $precision,\".\",\"\").\" Mb\";\n\t\t\t\n\t\treturn $fileSizeDisplay;\n\t}",
"public function testCSize() {\n\t\t$csize = new CSize();\n\t\t$csize->set(100,200,300);\n\t\t$this->assertTrue($csize->w===100);\n\t\t$this->assertTrue($csize->h===200);\n\t\t$this->assertTrue($csize->l===300);\n\t\t$csize->scale(0.5,2.0,1.5);\n\t\t$this->assertTrue($csize->w==50);\n\t\t$this->assertTrue($csize->h==400);\n\t\t$this->assertTrue($csize->l==450);\n\t}",
"public function getReadableSize()\n {\n $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n for ($i = 0; $this->size > 1024; $i++) {\n $this->size /= 1024;\n }\n\n return round($this->size, 2).' '.$units[$i];\n }",
"private function _calculateSize ($size)\n {\n if ($size < 1024) {\n $size = $size . \" Bytes\";\n } elseif ($size < 1048576) {\n $sizeInKB = $size / 1024;\n $size = round($sizeInKB, 1) . \" KB\";\n } else {\n $sizeInMB = $size / (1024 * 1024);\n $size = round($sizeInMB, 1) . \" Mb\";\n }\n return $size;\n }",
"function formatRawSize($bytes) {\n if(!empty($bytes)) {\n\n $s = array('bytes', 'kb', 'MB', 'GB', 'TB', 'PB');\n $e = floor(log($bytes)/log(1024));\n\n $output = sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));\n\n return $output;\n }\n}",
"function parseSize ($size) {\n\tif ($size[0]!=\"*\"){\n\t$paperSize = explode(\" x \", $size);\n\t$paperSize[0] -= EDGEMARGIN;\n\t$paperSize[1] -= GRIPMARGIN;\n\treturn $paperSize;\n\t}\n}",
"public function getSizeDetails();",
"function change_size($size, $save_mode)\n\t{\n\t//change the size of the actual object.\n\treturn NOT_SUPPORTED;\n\t}",
"public function setSize($size);",
"function dark_urban_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}",
"function get_aqua_size($size_name, $width_or_height = 'width'){\n \n $result = options::get_value( 'imagesizes' , $size_name.'_'.$width_or_height );\n \n if(is_numeric($result)){\n return $result; \n }else{\n /*if the omption is empty or not numeric for some reason, we return the default*/\n return options::$default['imagesizes'][$size_name.'_'.$width_or_height];\n }\n }",
"function tmpl_let_to_num( $size ) {\r\n\t\t$l = substr( $size, -1 );\r\n\t\t$ret = substr( $size, 0, -1 );\r\n\t\tswitch ( strtoupper( $l ) ) {\r\n\t\t\tcase 'P':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'T':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'G':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'M':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'K':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"public function get_size()\n\t\t{\n\t\t\treturn $this->width().'x'.$this->height();\n\t\t}",
"function formatBytes($size, $precision = 2)\n {\n if($size != 0){\n $base = log($size, 1024);\n $suffixes = array('kB', 'MB', 'GB', 'TB'); \n return round(pow(1024, $base - floor($base)), $precision) .''. $suffixes[floor($base)];\n }\n return 0;\n }",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}"
] | [
"0.7121262",
"0.70816237",
"0.70796096",
"0.703981",
"0.7020994",
"0.7018977",
"0.6930491",
"0.68126315",
"0.67599154",
"0.6747278",
"0.67432666",
"0.6733968",
"0.6709159",
"0.6695767",
"0.6690823",
"0.66784334",
"0.66070783",
"0.6592121",
"0.6577123",
"0.6540927",
"0.65170705",
"0.65084994",
"0.6507434",
"0.65018076",
"0.64777684",
"0.6460538",
"0.6457299",
"0.64263797",
"0.64225364",
"0.639996",
"0.639106",
"0.63588977",
"0.6356453",
"0.6343794",
"0.63214445",
"0.6310902",
"0.63010097",
"0.6300088",
"0.62972534",
"0.62880224",
"0.62839806",
"0.6263032",
"0.62208694",
"0.6214563",
"0.6202397",
"0.61987484",
"0.6192692",
"0.6156218",
"0.61446995",
"0.613984",
"0.61318916",
"0.61318266",
"0.61263865",
"0.6119299",
"0.6114679",
"0.61140436",
"0.6110947",
"0.6072108",
"0.60637414",
"0.6056753",
"0.6024913",
"0.6006064",
"0.6004669",
"0.60028356",
"0.60013604",
"0.6001192",
"0.5996443",
"0.5991331",
"0.5991331",
"0.5991331",
"0.5991331",
"0.5991331",
"0.5991331",
"0.5991331",
"0.5991331",
"0.5991331",
"0.59905636",
"0.59756297",
"0.59705263",
"0.5965886",
"0.59635943",
"0.59585226",
"0.5954899",
"0.59488016",
"0.59450257",
"0.5941154",
"0.59400713",
"0.59353477",
"0.59353197",
"0.59283775",
"0.5927449",
"0.5923584",
"0.59133625",
"0.5877275",
"0.5876702",
"0.58745354",
"0.5873966",
"0.5873966",
"0.5873966",
"0.5873966"
] | 0.63992476 | 30 |
replace given string to another in a string Used on restaurant detail page. | function FrontgetReqRep($str, $relpace) {
$reqstr = @explode($relpace, $str);
return $reqstr[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FrontgetReplace($str, $frlp, $trlp) {\r\n $reqstr = str_replace($frlp, $trlp, $str);\r\n return $reqstr;\r\n}",
"function tpl_modifier_replace($string, $search, $replace)\r\n{\r\n\treturn str_replace($search, $replace, $string);\r\n}",
"function smarty_modifier_myreplace($string, $search) {\n\tif (count($search) > 0) {\n\t\t$newstring = strtr($string, $search);\n\t\treturn $newstring;\n\t} else {\n\t\treturn $string;\n\t}\n}",
"function stri_replace($find,$replace,$string)\n{\n if(!is_array($find))\n $find = array($find);\n \n if(!is_array($replace))\n {\n if(!is_array($find))\n $replace = array($replace);\n else\n {\n // this will duplicate the string into an array the size of $find\n $c = count($find);\n $rString = $replace;\n unset($replace);\n for ($i = 0; $i < $c; $i++)\n {\n $replace[$i] = $rString;\n }\n }\n }\n foreach($find as $fKey => $fItem)\n {\n $between = explode(strtolower($fItem),strtolower($string));\n $pos = 0;\n foreach($between as $bKey => $bItem)\n {\n $between[$bKey] = substr($string,$pos,strlen($bItem));\n $pos += strlen($bItem) + strlen($fItem);\n }\n $string = implode($replace[$fKey],$between);\n }\n return($string);\n}",
"function replace($str){\n $newstring=str_replace(\"/\",\" \", $str);\n return $newstring;\n\n }",
"protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }",
"protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }",
"function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}",
"function acf_str_replace($string = '', $search_replace = array())\n{\n}",
"public function stringReplace(){\n\t\t\t\treturn str_replace(\"WEB APPLICATION\",\"WEBSITE\",$this->sentence);\n\t\t\t}",
"function replace( $search, $replace ) {\n\treturn partial( 'str_replace', $search, $replace );\n}",
"function str_placeholder($replace, $string)\n {\n return str_replace(\n array_keys($replace),\n array_values($replace),\n $string\n );\n }",
"public function replace($key,$value,$string){\n\t\treturn str_replace(\"::$key::\",$value,$string);\n\t}",
"public function strreplace( $orig, $old, $new ) {\n\t\treturn \"REPLACE({$orig}, {$old}, {$new})\";\n\t}",
"function replace($p, $str){\n $p2 = __t($p)->map(function($x) use($str){return $str;});\n return $p2();\n }",
"function r($search, $replace, $subject) {\n\t\treturn str_replace($search, $replace, $subject);\n\t}",
"private function _str_replace($p_str){\n\t\t// $to = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');\n\n\t\t// $str = explode(',',str_replace($from, $to, $p_str));\n\n\t\t// return str_replace('/\\s+/', ' ', word_limiter($str[0],7,''));\n\t\treturn preg_replace('/\\s+/', ' ',$p_str);\n\t}",
"function replace($search,$replace){\n\t\tsettype($search,\"string\");\n\n\t\t// prevod StringBuffer na string\n\t\tif(is_object($replace)){\n\t\t\t$replace = $replace->toString();\n\t\t}\n\n\t\tfor($i=0;$i<sizeof($this->_Items);$i++){\n\t\t\t$this->_Items[$i]->replace($search,$replace);\n\t\t}\n\t}",
"public function contentStrReplace() {}",
"function changeA($v1)\n{\n//WARNING! DO NOT USE FOR EMAILS ! Function removes the @ sign and the fullstop!\n\n//\t$Cust_Addr = strtr($Cust_Addr, array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES))); //this baby does the trick!!!\n//\t$Cust_Addr = preg_replace('/\\s/u', '_', $Cust_Addr);//this baby also does the trick!!!\n\n//$html_reg = '/<+\\s*\\/*\\s*([A-Z][A-Z0-9]*)\\b[^>]*\\/*\\s*>+/i';\n//$v1 = htmlentities( preg_replace( $html_reg, '', $v1 ) );\n//echo \"<br>after htmlent:\".$v1.\"<br><br><br>\";\n$v1 = preg_replace(\"/'/\",\"_\",$v1);\n$v1 = preg_replace(\"/‘/\",\"_\",$v1);\n$v1 = preg_replace(\"/’/\",\"_\",$v1);\n$v1 = preg_replace(\"/&/\",\"and\",$v1);\n$v1 = preg_replace(\"/,/\",\"+\",$v1);\n$v1 = preg_replace(\"/…/\",\".\",$v1);\n$v1 = preg_replace(\"/…/\", '_', $v1);\n$v1 = str_replace(' ', '_', $v1);\n\n$v1 = preg_replace(\"/ /\",\"_\",$v1);\n$v1 = preg_replace(\"/ /\",\"_\",$v1);\n\n//$v1 = strtr($v1, array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES))); //this baby does the trick!!!\n\n$v1 = str_replace(\" \",\"_\",$v1);\n$v1 = str_replace(\" \",\"_\",$v1);\n\n//echo \"<br>afterstreplacec:\".$v1.\"<br><br><br>\";\n\n/*\n$old_pattern = array(\"/[^a-zA-Z0-9]/\", \"/_+/\", \"/_$/\");\n$new_pattern = array(\"_\", \"_\", \"\");\n$v2 = preg_replace($old_pattern, $new_pattern , $v1);\n//All characters but a to z, A to z and 0 to 9 are replaced by an underscore. Multiple connected underscores are reduced to a single underscore and trailing underscores are removed.\n*/\n$v2 = $v1;\nreturn $v2;\n}",
"protected static function replace_slug_in_string($input, $slug)\n {\n }",
"function str_a_replace($array, $string) {\n foreach ($array as $from => $to)\n $string = str_replace($from, $to, $string);\n \n return $string;\n}",
"function str_replace_first($from, $to, $content) {\n $from = '/' . preg_quote($from, '/') . '/';\n return preg_replace($from, $to, $content, 1);\n }",
"function replace_specialChar($vTitle) {\r\n $rs_catname = $vTitle;\r\n $spstr = \"�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�\";\r\n $spArr = @explode(\"#\", $spstr);\r\n $i = 0;\r\n foreach ($spArr as $arr) {\r\n $rs_catname = str_replace($arr, \"-\", $rs_catname);\r\n $i++;\r\n }\r\n //print_r($rs_catname);exit;\r\n $rs_catname = str_replace(\"#\", \"-\", $rs_catname);\r\n $rs_catname = str_replace(\" \", \"-\", str_replace(\"&\", \"and\", $rs_catname));\r\n return $rs_catname;\r\n}",
"function qoute_replacment($phrase){\r\n\t$find = array(\"\\’\", \"’\", \"\\‘\", \"‘\", \"\\'\", \"'\", \"—\", '\\”', '”', '\\“', '“', '\\\"', '\"',\"\\n\",\"\\r\",\"…\");\r\n\t//defince what to replace the find array with\r\n\t$replace = array(\"'\", \"'\", \"'\", \"'\", \"'\", \"'\", \"-\", \""\", \""\", \""\", \""\", \""\", \""\",\" \",\" \",\"...\");\r\n\t//html entities code incase you want that\r\n\t#$replace = array(\"'\", \"'\", \"'\", \"'\", \"'\", \"'\",\"—\", \""\", \""\", \""\", \""\", \""\", \""\");\r\n\t//do the replacing\r\n\t$newphrase = str_replace($find, $replace, $phrase);\r\n \t//return the replacing for output\r\n\treturn $newphrase;\r\n}",
"protected static function __replace(string $substring, string $replacement, string $str): string {\n\t\treturn str_replace($substring, $replacement, $str);\n\t}",
"function removeString($originalString, $subString, $replaceWith)\n{\n $newVal = str_replace($subString, $replaceWith, $originalString);\n return $newVal ? $newVal : $originalString;\n}",
"function replace($template,$_DICTIONARY){\n\t\tforeach ($_DICTIONARY as $clave=>$valor) {\n\t\t\t$template = str_replace('#'.$clave.'#', $valor, $template);\n\t\t}\t\t\n\t\treturn $template;\n\t}",
"function replace_curl($string){\n $string = str_replace(\"~\", \"'\", $string);\n return $string;\n}",
"function lynt_antispam_replace($field)\n {\n $replaced = str_replace('=\"comment\"', '=\"lynt-comment\"', $field);\n return $replaced;\n }",
"public static function stringrpl($r,$str){\n\t$temp = substr($str,6);\n\t$out1 = substr_replace($str,\"$r\",6);\n\t$out1 .= $temp;\n\t\n\t$temp = substr($out1,4);\n\t$out = substr_replace($out1,\"$r\",4);\n\t$out .= $temp;\n\treturn $out;\n}",
"private function hello(){\n \techo str_replace(\"this\",\"that\",\"HELLO WORLD!!\");\n \t\t}",
"function find_replace($request) {\r\n\r\n $content = $request['content'];\r\n $keywords = $request['keywords'];\r\n\r\n foreach ($keywords as $keyword) {\r\n $content = str_replace($keyword['find'], $keyword['replace'], $content);\r\n }\r\n\r\n return $content;\r\n}",
"function str_replace_first($search, $replace, $subject)\n {\n return Str::replaceFirst($search, $replace, $subject);\n }",
"static function replace( $search, $replace, $str = null )\n {\n if ( is_array( $search ) && ! $str ) {\n return self::dictReplace( $search, $replace );\n } // end if is array and no str\n $str = str_replace($search, $replace, $str);\n return $str;\n }",
"function replace_en($string, $eventTitle=''){\n\t\t\t\treturn (empty($eventTitle))?\n\t\t\t\t\tstr_replace('[event-name]', \"<span class='eventName'>Event Name</span>\", $string):\n\t\t\t\t\tstr_replace('[event-name]', $eventTitle, $string);\n\t\t\t}",
"function replace($search,$replace = null){\n\t\tif(is_array($search)){\n\t\t\t$_replaces_keys = array();\n\t\t\t$_replaces_values = array();\n\t\t\tforeach(array_keys($search) as $key){\n\t\t\t\t$_replaces_keys[] = $key;\n\t\t\t\t$_replaces_values[] = $search[$key];\n\t\t\t} \n\t\t\tif(sizeof($_replaces_keys)==0){\n\t\t\t\treturn $this;\n\t\t\t} \n\t\t\t$this->_String4 = str_replace($_replaces_keys,$_replaces_values,$this->_String4);\n\t\t\treturn $this;\n\t\t}\n\t\t$this->_String4 = str_replace($search,$replace,$this->_String4);\n\t\treturn $this;\n\t}",
"public function replace($search,$replace,$field='*',$table,$where_sql=''){\n\t\t$field=($field!='*'?\"`\".$field.\"`\":'*');// An field den einai * tote 8a ginei `field`\n\t\t$sql=\"SELECT `\".$table.\"`.\".$field.\" FROM `\".$table.\"` \".$where_sql.\" ;\";\n\t\t$queryr1=$this->query($sql);\n\t\t$rows=$this->fetch_all(MYSQL_NUM);\n\t\t\n\t\tfor($i=0;$i<count($rows);$i++){\n\t\t\tfor($j=0;$j<$this->qresult->field_count;$j++){\n\t\t\t\tif(isset($rows[$i][$j])){\n\t\t\t\t\tif(strpos($rows[$i][$j],$search)!==false){\n\t\t\t\t\t\t//echo $rows[$i][$j];\n\t\t\t\t\t\t//echo preg_replace('/'.$search.'/',$replace,$rows[$i][$j]);\n\t\t\t\t\t\t$output[$i][$this->qresult->fields[$j]['name']]=str_replace($search,$replace,$rows[$i][$j]);\n\t\t\t\t\t\t//echo $output[$i][$this->qresult->fields[$j]['name']];\n\t\t\t\t\t\t$sql=\"UPDATE `\".$this->qresult->fields[$j]['table'].\"` SET \".$this->qresult->fields[$j]['name'].\"='\".$output[$i][$this->qresult->fields[$j]['name']].\"' WHERE \".$this->qresult->fields[$j]['name'].\"= '\".$rows[$i][$j].\"'\";\n\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t$this->query($sql);\n\t\t\t\t\t\t$this->qresult=$queryr1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($search,$replace,$field,$table,$where_sql,$sql,$queryr1,$this->qresult);\n\t\treturn @$output;\n\t}",
"public static function alm_filters_replace_string($string = ''){\n if($string){\n \t$string = str_replace('alm_filter_', '', $string);\n\t\t\t\treturn $string;\n }\n }",
"function trataApostrofe($str){\n\t\t$result_subst = str_replace(\"\\'\", \"'\", $str);\n\t\t$result_subst = str_replace(\"'\", \"\\'\", $result_subst);\n\t\treturn $result_subst;\n\t}",
"protected function _prepareString($str)\r\n {\r\n $url = Mage::getBaseUrl();\r\n $url = str_replace('/index.php', '', $url);\r\n\r\n $str = str_replace('/index.php', '', $str);\r\n\r\n return str_replace($url, 'http://example.com/', $str);\r\n }",
"function slug($string, $spaceRepl = \"-\") {\n\t $string = str_replace(\"&\", \"and\", $string);\n\t\n\t // Delete any chars but letters, numbers, spaces and _, -\n\t $string = preg_replace(\"/[^a-zA-Z0-9 _-]/\", \"\", $string);\n\t\n\t // Optional: Make the string lowercase\n\t $string = strtolower($string);\n\t\n\t // Optional: Delete double spaces\n\t $string = preg_replace(\"/[ ]+/\", \" \", $string);\n\t\n\t // Replace spaces with replacement\n\t $string = str_replace(\" \", $spaceRepl, $string);\n\t\n\t return $string;\n\t}",
"private function _substitute_variable($text, $variable, $object, $function)\n\t{\n\t\tif (strstr($text, $variable))\n\t\t{\n\t\t\t$value = call_user_func(array($object, $function));\n\t\t\t$text = str_replace($variable, $value, $text);\n\t\t}\n\t\treturn $text;\n\t}",
"public function slug($string, $replacement = '_');",
"function str_replace_from_offset($search, $replace, $subject, $count = -1, $offset = 0) {\r\n\t\t$substr = substr($subject, $offset);\r\n\t\t$substr = str_replace($search, $replace, $substr, $count);\r\n\t\t$subject = substr($subject, 0, $offset) . $substr;\r\n\t\treturn $subject;\r\n\t}",
"function our_str_replace($find, &$replacements, $subject)\n\n{\n\n $l = strlen($find);\n\n // allocate some memory\n\n $new_subject = str_repeat(' ', strlen($subject));\n\n $new_subject = '';\n\n foreach($replacements as $r)\n\n {\n\n if(($pos = strpos($subject, $find)) === false) break;\n\n $new_subject .= substr($subject, 0, $pos).$r;\n\n $subject = substr($subject, $pos+$l);\n\n // the above appears to be the fastest method\n\n //$subject = substr_replace($subject, $r, $pos, $l);\n\n //$subject = substr($subject, 0, $pos).$r.substr($subject, $pos+strlen($find));\n\n }\n\n $new_subject .= $subject;\n\n return $new_subject;\n\n}",
"public function replaceInline($string)\n\t{\n\t\t$string = $this->replaceInlineCode($string);\n\t\t$string = $this->replaceAnchors($string);\n\t\t$string = $this->replaceImages($string);\n\t\t$string = $this->replaceStrongEmphasis($string);\n\n\t\t// Take care of \"hard\" breaks\n\t\t$string = preg_replace('/ {2,}\\n/', \"<br />\\n\", $string);\n\n\t\t// Replace escaped characters\n\t\t$string = str_replace(array_keys($this->specialTable), $this->specialTable, $string);\n\n\t\treturn $string;\n\t}",
"function first_str_replace($haystack, $needle, $replace) {\n\t$pos = strpos($haystack, $needle);\n\tif ($pos !== false) return substr_replace($haystack, $replace, $pos, strlen($needle));\n\treturn $haystack;\n}",
"function replace_string_in_file($filename, $string_to_replace, $replace_with){\n \n $content=file_get_contents($filename);\n $content_chunks=explode($string_to_replace, $content);\n $content=implode($replace_with, $content_chunks);\n file_put_contents($filename, $content);\n \n }",
"function str_lreplace($search, $replace, $subject)\r\n{\r\n $pos = strrpos($subject, $search);\r\n if ($pos !== false) {\r\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\r\n }\r\n return $subject;\r\n}",
"public function testReplace1()\n {\n $this->assertEquals(Str::replace('foo', 'oo', 'yy'), 'fyy');\n }",
"function strReplaceFirst($from, $to, $subject) {\n\t\t$from = '/'.preg_quote($from, '/').'/';\n\t\treturn preg_replace($from, $to, $subject, 1);\n\t}",
"private function rep($var) {\r\n $search[] = chr(194);\r\n $replace[] = '';\r\n $search[] = chr(183);\r\n $replace[] = '·';\r\n $search[] = chr(180);\r\n $replace[] = '´';\r\n $search[] = chr(175);\r\n $replace[] = '¯';\r\n $search[] = '\\/';\r\n $replace[] = '/';\r\n $search[] = '\\s';\r\n $replace[] = ' ';\r\n $search[] = '\\p';\r\n $replace[] = '|';\r\n $search[] = '[URL]';\r\n $replace[] = '';\r\n $search[] = '[/URL]';\r\n $replace[] = '';\r\n $search[] = '[b]';\r\n $replace[] = '';\r\n $search[] = '[/b]';\r\n $replace[] = '';\r\n\r\n return str_replace($search, $replace, $var);\r\n }",
"public function testReplace2()\n {\n $this->assertEquals(Str::replace('foo', 'o', 'y'), 'fyy');\n }",
"function replace($x) {\n\t$k1=array(' - ','ß','ä','ö','ü','Ä','Ö','Ü',' ',':','&','?','!','\"',',','.',\"\\'\",\"/\");\n\t$k2=array('-','ss','ae','oe','ue','ae','oe','ue','-','-','und','','','','','',\"\",\"-\");\n\tfor ($i='0';$i<count($k1);$i++) {$x = str_replace($k1[$i],$k2[$i],$x);}\n\treturn $x;\n}",
"function cmfcString_replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}",
"function str_replace_first($search, $replace, $subject) {\n $pos = strpos($subject, $search);\n if ($pos !== false) {\n return substr_replace($subject, $replace, $pos, strlen($search));\n }\n return $subject;\n }",
"static function cityStateReplace($string, $geoip)\n {\n $string = str_replace('{city}', ucwords(strtolower($geoip->city_name)), $string);\n $string = str_replace('{state}', strtoupper($geoip->region_name), $string);\n $string = str_replace('{city_slug}', SoeHelper::getSlug($geoip->city_name), $string);\n $string = str_replace('{city_lower}', strtolower($geoip->city_name), $string);\n $string = str_replace('{state_lower}', strtolower($geoip->region_name), $string);\n\n return $string;\n }",
"protected function stringReplace($what, $with, $string)\r\n {\r\n return str_replace($what, $with, $string);\r\n }",
"private function _replaceVariable($str, $pos, $var, $repl)\n {\n $expr = substr($str, $pos, strpos($str, ')', $pos + 1) - $pos + 1);\n $eqsign = strpos($expr, '=');\n if (false !== $eqsign)\n {\n $name = substr($expr, $eqsign + 1, strlen($expr) - $eqsign - 2);\n }\n return substr_replace($str, \"(?P<$name>$repl)\", $pos, strlen($expr));\n }",
"public function replaceTag($tag, $string, &$output)\n {\n $output = str_replace($tag, $string, $output);\n }",
"public function replace( $old, $new );",
"function str_replace_first($search, $replace, $subject) {\n\t$pos = strpos($subject, $search);\n\tif ($pos !== false) {\n\t\treturn substr_replace($subject, $replace, $pos, strlen($search));\n\t}\n\t\n\treturn $subject;\n}",
"public function reemplazar($antiguo, $nuevo, $donde)\n\t\t{\n\t\t\treturn str_replace($antiguo, $nuevo, $donde);\n\t\t}",
"private static function dictReplace( $dictionary, $str )\n {\n foreach ($dictionary as $key => $value) {\n $str = str_replace($key, $value, $str);\n } // end foreach $dictionary\n return $str;\n }",
"function string_rewrite_value($value)\r\n\t{\r\n\t\t$value = $this->string_strip_accents($value);\r\n\t\t$value = strtolower($value);\r\n\t\t$value = str_replace('/', '-', $value);\r\n\t\t$value = preg_replace(\"#([^.a-zA-Z0-9-_\\40])#\", \"\", $value);\r\n\t\t$value = trim($value);\r\n\t\t$value = preg_replace(\"([\\40])\", \"-\", $value);\r\n\t\t$value = preg_replace(\"(-{2,})\", \"-\", $value);\r\n\r\n\t\treturn $value;\r\n\t}",
"private static function strReplaceFirst($needle, $replace, $haystack) {\n\t\t$pos = strpos($haystack, $needle);\n\t\t\n\t\tif ($pos !== false) {\n\t\t\treturn substr_replace($haystack, $replace, $pos, strlen($needle));\n\t\t}\n\t\t\n\t\treturn $haystack;\n\t}",
"function _ws_apply_replace_tokens($str, $student, $contact, $link = '') {\n switch ($student['gender_id']) {\n case 1:\n $hisher = 'her';\n $heshe = 'she';\n $himher = 'her';\n break;\n\n case 2:\n $hisher = 'his';\n $heshe = 'he';\n $himher = 'him';\n break;\n\n default:\n $hisher = 'their';\n $heshe = 'they';\n $himher = 'them';\n }\n\n $patterns = array(\n '{student.first_name}', '{student.last_name}',\n '{contact.first_name}', '{contact.last_name}',\n '{he/she}', '{she/he}', '{his/her}', '{her/his}', '{him/her}', '{her/him}',\n '{link}',\n );\n $replacements = array(\n $student['first_name'], $student['last_name'],\n $contact['first_name'], $contact['last_name'],\n $heshe, $heshe, $hisher, $hisher, $himher, $himher,\n $link,\n );\n return str_ireplace($patterns, $replacements, $str);\n}",
"public function replace_text($text) {\n\t\tif (strlen($text) == 0) {\n\t\t\treturn 'Onbekend';\n\t\t}\n\t\t$text = str_replace('no', 'nee', $text);\n\t\t$text = str_replace('yes', 'ja', $text);\n\t\t$text = str_replace('on', 'aan', $text);\n\t\t$text = str_replace('off', 'uit', $text);\t\t\n\t\treturn $text;\n\t}",
"function str_replace_first($search, $replace, $subject)\n {\n return Str::replaceFirst($search, $replace, $subject);\n }",
"function propertyStringReplace($htmlString, $array) {\n foreach($array as $property => $value) {\n $htmlString = str_replace('%'.$property.'%', $value, $htmlString);\n }\n return $htmlString;\n}",
"function str_lreplace($search, $replace, $subject) {\n\t$pos = strrpos($subject, $search);\n\n\tif($pos !== false) {\n\t\t$subject = substr_replace($subject, $replace, $pos, strlen($search));\n\t}\n\treturn $subject;\n}",
"function filter_paces_site_url( $string ) {\n $site_url = \"{site_url}\";\n $replaceData = site_url();\n $string = str_replace($site_url, $replaceData, $string);\n\n return $string;\n }",
"function str_replace_once($needle, $replace, $haystack) {\n\t// and replaces it with $replace.\n\t$pos = strpos($haystack, $needle);\n\tif ($pos === false) {\n\t\t// Nothing found\n\t\treturn $haystack;\n\t}\n\treturn substr_replace($haystack, $replace, $pos, strlen($needle));\n}",
"public function replacePlaceholders($string)\n {\n $placeholders = array(\n '%host%' => new Resque\\Host,\n '%worker%' => new Resque\\Worker,\n '%pid%' => getmypid(),\n '%date%' => date('Y-m-d'),\n '%time%' => date('H:i')\n );\n\n return strtr($string, $placeholders);\n }",
"function url($string) {\n global $links;\n $output = $string;\n if(isset($links) && count($links)) {\n foreach($links as $link) { //cari override\n if($link['url'] == $string)\n $output = $link['override'];\n }\n }\n \n return $output;\n }",
"function format_string_for_url($string) {\n\t\t$string = str_replace(\n\t\t\tarray('&', \"'\", ' ', '/'),\n\t\t\tarray('and', '', '_', '_'),\n\t\t\t$string\n\t\t);\n\t\t$string = strtolower(iconv(\"UTF-8\", \"ASCII//TRANSLIT\", $string));\n\t\treturn $string;\n\t}",
"function replace($text){\n\t\t\t\t\t\t\t\t\t\t$arrayText = array('TRUONG TIEU HOC','TRUONG THCS', 'TRUONG THPT');\n\t\t\t\t\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t\t\t\t\tfor ($i=0; $i < 3 ; $i++) { \n\t\t\t\t\t\t\t\t\t\t\tif (strpos($text, $arrayText[$i]) !== false) {\n\t\t\t\t\t\t\t\t\t\t\t\t$str = str_replace($arrayText[$i],\"\",$text);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn $str;\n\t\t\t\t\t\t\t\t\t}",
"private function replaceTag(&$text, $newContent, $competitionId) {\n $text = preg_replace('/{hapodi id=\"'.$competitionId .'\"}/s', $newContent, $text);\n }",
"public function transform(string $string): string\n {\n str_replace(' ', '-', $string);\n }",
"function userReplace($key, $text) {\r\n if (!$this->feed['params']['user_replace_on']) return $text;\r\n if (!is_array($this->feed['params']['replace'])) return $text;\r\n if (count($this->feed['params']['replace'][$key])) {\r\n foreach ($this->feed['params']['replace'][$key] as $v) {\r\n if ($v['limit'] == '') $v['limit'] = -1;\r\n $text = preg_replace($v['search'], $v['replace'], $text, $v['limit']);\r\n }\r\n }\r\n return $text;\r\n }",
"function str_complete_replace($find, $replace, $string)\n{\n\tif (is_array($find))\n\t{\n\t\t$noredo = array(); // array to store which keys don't need re-replacing (used to prevent stupidity with some repeating replacements)\n\t\t$perfect = 0; // the number of finds that need no replacing\n\t\twhile ($perfect < count($find))\n\t\t{\n\t\t\t$perfect = 0;\n\t\t\tfor ($i = 0; $i < count($find); $i++)\n\t\t\t{\n\t\t\t\t$findl = $find[$i];\n\t\t\t\tif ($findl == \"\") { $findl = \" \"; }\n\t\t\t\tif (is_array($replace))\n\t\t\t\t{\n\t\t\t\t\t$replacel = $replace[$i];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$replacel = $replace;\n\t\t\t\t}\n\t\t\t\tif (strpos($string,$findl) !== false)\n\t\t\t\t{\n\t\t\t\t\tif (strpos($replacel,$findl) === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$string = str_replace($findl,$replacel,$string);\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (strpos($string,$findl) !== false);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($noredo[$i] != true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$string = str_replace($findl,$replacel,$string);\n\t\t\t\t\t\t\t$noredo[$i] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$perfect++; // The amount of unreplaced finds must go up; otherwise it starts\n\t\t\t\t\t\t\t // an indefinitely loop with the search string\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// No replacing needed, increment the unreplaced finds\n\t\t\t\t\t$perfect++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tif ($find == \"\") { $find = \" \"; }\n\t\tif (strpos($replace,$find) === false)\n\t\t{\n\t\t\techo strpos($string,$findl);\n\t\t\twhile (strpos($string,$find) !== false)\n\t\t\t{\n\t\t\t\t$string = str_replace($find,$replace,$string);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// What it finds is in what it replaces things as; hence, it will create\n\t\t\t// an infinite loop under normal circumstances. Just replace it once to avoid\n\t\t\t// this.\n\t\t\t$string = str_replace($find,$replace,$string);\n\t\t}\n\t}\n\treturn $string;\n}",
"private function remove($str,$replace,$replaceWith=''){\n return str_replace($replace, $replaceWith, $str);\n }",
"function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}",
"public function replace($section, $str) {\n\t\t\treturn \\uri\\actions::modify($this->object, 'replace', $section, $str);\n\t\t}",
"public function replaceBetween(string $string, string $str, string $start, string $end): string\n {\n return preg_replace('/'.preg_quote($start).'[\\s\\S]+?'.preg_quote($end).'/', $str, $string);\n }",
"static function strReplace($search, array $replace, $subject) {\n foreach ($replace as $value) {\n $subject = preg_replace(\"/$search/\", $value, $subject, 1);\n }\n\n return $subject;\n }",
"function str_lreplace($search, $replace, $subject) {\n $pos = strrpos($subject, $search);\n if($pos !== false) {\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\n }\n return $subject;\n}",
"function str_lreplace($search, $replace, $subject) {\n $pos = strrpos($subject, $search);\n if($pos !== false) {\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\n }\n return $subject;\n}",
"private function resolveReplacement(Mailcode_Parser_Safeguard_Formatter_Location $location) : string\n {\n if($location->requiresAdjustment())\n {\n return $this->getReplaceString($location);\n }\n\n return $location->getPlaceholder()->getNormalizedText();\n }",
"public static function str_replace_once($needle , $replace , $haystack){\n // and replaces it with $replace.\n $pos = strpos($haystack, $needle);\n if ($pos === false) {\n // Nothing found\n return $haystack;\n }\n return substr_replace($haystack, $replace, $pos, strlen($needle));\n }",
"public static function stringReplace($str)\n {\n trim($str);\n\n /**replace the username with the given string */\n $inputStr = \"Hello <<UserName>>, How are you?\";\n $str1 = \"<<UserName>>\";\n $str2 = str_replace($str1, $str, $inputStr);\n echo $str2;\n }",
"public function replace( $string, $args, $omit = array() ) {\n\n\t\t$string = wp_strip_all_tags( $string );\n\n\t\t// Let's see if we can bail super early.\n\t\tif ( strpos( $string, '%%' ) === false ) {\n\t\t\treturn WPSEO_Utils::standardize_whitespace( $string );\n\t\t}\n\n\t\t$args = (array) $args;\n\t\tif ( isset( $args['post_content'] ) && ! empty( $args['post_content'] ) ) {\n\t\t\t$args['post_content'] = WPSEO_Utils::strip_shortcode( $args['post_content'] );\n\t\t}\n\t\tif ( isset( $args['post_excerpt'] ) && ! empty( $args['post_excerpt'] ) ) {\n\t\t\t$args['post_excerpt'] = WPSEO_Utils::strip_shortcode( $args['post_excerpt'] );\n\t\t}\n\t\t$this->args = (object) wp_parse_args( $args, $this->defaults );\n\n\t\t// Clean $omit array.\n\t\tif ( is_array( $omit ) && $omit !== array() ) {\n\t\t\t$omit = array_map( array( __CLASS__, 'remove_var_delimiter' ), $omit );\n\t\t}\n\n\t\t$replacements = array();\n\t\tif ( preg_match_all( '`%%([^%]+(%%single)?)%%?`iu', $string, $matches ) ) {\n\t\t\t$replacements = $this->set_up_replacements( $matches, $omit );\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_replacements' - Allow customization of the replacements before they are applied.\n\t\t *\n\t\t * @api array $replacements The replacements.\n\t\t *\n\t\t * @param array $args The object some of the replacement values might come from,\n\t\t * could be a post, taxonomy or term.\n\t\t */\n\t\t$replacements = apply_filters( 'wpseo_replacements', $replacements, $this->args );\n\n\t\t// Do the actual replacements.\n\t\tif ( is_array( $replacements ) && $replacements !== array() ) {\n\t\t\t$string = str_replace( array_keys( $replacements ), array_values( $replacements ), $string );\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_replacements_final' - Allow overruling of whether or not to remove placeholders\n\t\t * which didn't yield a replacement.\n\t\t *\n\t\t * @example <code>add_filter( 'wpseo_replacements_final', '__return_false' );</code>\n\t\t *\n\t\t * @api bool $final\n\t\t */\n\t\tif ( apply_filters( 'wpseo_replacements_final', true ) === true && ( isset( $matches[1] ) && is_array( $matches[1] ) ) ) {\n\t\t\t// Remove non-replaced variables.\n\t\t\t$remove = array_diff( $matches[1], $omit ); // Make sure the $omit variables do not get removed.\n\t\t\t$remove = array_map( array( __CLASS__, 'add_var_delimiter' ), $remove );\n\t\t\t$string = str_replace( $remove, '', $string );\n\t\t}\n\n\t\t// Undouble separators which have nothing between them, i.e. where a non-replaced variable was removed.\n\t\tif ( isset( $replacements['%%sep%%'] ) && ( is_string( $replacements['%%sep%%'] ) && $replacements['%%sep%%'] !== '' ) ) {\n\t\t\t$q_sep = preg_quote( $replacements['%%sep%%'], '`' );\n\t\t\t$string = preg_replace( '`' . $q_sep . '(?:\\s*' . $q_sep . ')*`u', $replacements['%%sep%%'], $string );\n\t\t}\n\n\t\t// Remove superfluous whitespace.\n\t\t$string = WPSEO_Utils::standardize_whitespace( $string );\n\n\t\treturn $string;\n\t}",
"function replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}",
"private static function str_replace($search, $replace, $str)\n {\n if (is_array($str))\n {\n foreach ($str as $key => $value)\n {\n if (is_scalar($value))\n {\n $str[$key] = str_replace($search, $replace, $value);\n }\n }\n }\n else\n {\n $str = str_replace($search, $replace, $str);\n }\n\n return $str;\n }",
"function _zt($text, $replace = [])\r\n{\r\n\treturn strtr($text, $replace);\r\n}",
"public function replaceVars($str, array $vars){\n foreach($vars as $key => $value){\n $str = str_replace(\"{\" . $key . \"}\", $value, $str);\n }\n return $str;\n }",
"static function replaceF($S)\n {\n $template = \"Hello <<UserName>>, How are you?\";\n //str_replace to replace <<UserName>> from template\n echo str_replace(\"<<UserName>>\", $S , $template).\"\\n\";\n }",
"protected function replace_vars( $string ) {\n\t\treturn $this->replace_vars->replace( $string, $this->presentation->source );\n\t}",
"function replaceShortCode( $text, $array){\n\t$shortCodes = array( '%fname%', '%lname%', '%address%', '%address2%', '%city%', '%state%', '%zip%', '%pnumber%', \n\t\t\t\t\t\t '%pnumbertype%', '%snumber%', '%snumberType%', '%email%', '%job%', '%cover%', '%resume%', '%siteName%' );\n\t$variables = array( $array->fname, $array->lname, $array->address, $array->address2, $array->city, $array->state, $array->zip, $array->pnumber, \n\t\t\t\t\t\t $array->pnumbertype, $array->snumber, $array->snumberType, $array->email, $array->job, $array->cover, $array->resume, get_option( 'blogname' ) );\n\t\n\t$newText = str_replace( $shortCodes, $variables, $text );\n\t\n\treturn $newText;\n}",
"function lb_replace_tags($text, $product) {\n $search = array(\n '[product_name]', \n '[product_price]', \n '[product_merchant]',\n '[product_brand]',\n );\n \n $replace = array(\n $product['name'], \n round((float)$product['finalprice']/100, 0),\n $product['merchant'],\n $product['brand'],\n );\n \n $return_text = str_replace($search, $replace, $text);\n \n error_log('lb_replace_tags - $return_text: ' . $return_text . ', product: ' . print_r($product, true));\n\n return $return_text;\n}"
] | [
"0.6555733",
"0.6402055",
"0.6398407",
"0.63118523",
"0.6263725",
"0.6255635",
"0.6255635",
"0.62413645",
"0.6228513",
"0.6145391",
"0.609663",
"0.60454404",
"0.598438",
"0.59583044",
"0.5951317",
"0.59274614",
"0.58377564",
"0.58201134",
"0.5805351",
"0.57760084",
"0.5755291",
"0.57337767",
"0.57327926",
"0.5725744",
"0.5717295",
"0.5716746",
"0.5690717",
"0.56432766",
"0.56331664",
"0.563109",
"0.5629372",
"0.56288326",
"0.5616592",
"0.5614445",
"0.561402",
"0.56139755",
"0.5608306",
"0.56059825",
"0.5603346",
"0.559311",
"0.55899787",
"0.55779433",
"0.5565753",
"0.55634886",
"0.55618125",
"0.5549666",
"0.5546148",
"0.55406016",
"0.5534248",
"0.552327",
"0.5519556",
"0.55174106",
"0.5514264",
"0.55129075",
"0.55123276",
"0.55006486",
"0.54998016",
"0.5497717",
"0.548292",
"0.5481481",
"0.54762506",
"0.54650354",
"0.5464388",
"0.54578906",
"0.5456243",
"0.54493356",
"0.54483604",
"0.5447371",
"0.54473007",
"0.5443576",
"0.5440498",
"0.5428344",
"0.5427252",
"0.54267627",
"0.54267263",
"0.54250634",
"0.5424712",
"0.5419758",
"0.54131275",
"0.54122245",
"0.5411276",
"0.5410509",
"0.5408178",
"0.5407223",
"0.5405485",
"0.5402326",
"0.53963554",
"0.53946584",
"0.53946584",
"0.5369356",
"0.5365291",
"0.5348056",
"0.53422105",
"0.53338397",
"0.5330816",
"0.53278273",
"0.53181916",
"0.53083694",
"0.5303947",
"0.5301922",
"0.5295829"
] | 0.0 | -1 |
Convert Size on Feet to Inch | function ConvertFeettoInch($size, $sizetype) {
$vSize = @explode("x", $size);
if ($sizetype == 'feet') {
$h = $vSize[0] * 12;
$w = $vSize[1] * 12;
} else {
$h = $vSize[0];
$w = $vSize[1];
}
$reqsize = $h . "x" . $w;
return $reqsize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function convert_mm_to_inches($mmsize)\n{\n if (strpos($mmsize, \"x\")!==false)\n {\n // separated by x\n $sizes = explode(\"x\", $mmsize);\n $sep = 'x';\n }\n elseif (strpos($mmsize, \"&\")!==false)\n {\n // separated by &\n $sizes = explode(\"&\", $mmsize);\n $sep = '&';\n }\n elseif (strpos($mmsize, \"-\")!==false)\n {\n // separated by -\n $sizes = explode(\"-\", $mmsize);\n $sep = '-';\n }\n elseif (strpos($mmsize, \"or\")!==false)\n {\n // separated by or\n $sizes = explode(\"or\", $mmsize);\n $sep = 'or';\n }\n else\n {\n $sizes[] = $mmsize;\n $sep = \"\";\n }\n\n\n foreach ($sizes as $size)\n {\n if (intval($size)<4)\n {\n return $mmsize . \"mm\";\n }\n\n $decimal = (($size/10)/2.54);\n $decimal = round($decimal / 0.125) * 0.125;\n $newsize[] = \" \" . decimal_to_fraction($decimal) . \" inch \";\n $newmm[] = \" \".trim($size).\"mm \";\n }\n\n return implode($sep, $newsize) . \" (\" . trim(implode($sep, $newmm)) . \") \";\n}",
"protected function _convertDimension($size) \n {\n if($this->commerceDimensionUnit === 'mm')\n {\n return $size/10;\n }\n\n if($this->commerceDimensionUnit === 'm')\n {\n return $size*100;\n } \n \n if($this->commerceDimensionUnit === 'ft')\n {\n return $size*30.48;\n }\n\n if($this->commerceDimensionUnit === 'in')\n {\n return $size*2.54;\n }\n\n // centimeters\n return $size;\n }",
"function convert($size)\n {\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }",
"function to_feetinches($mm,$denom) {\n #\n # Arguments:\n # mm - length in millimeters\n # denom - accuracy in fractions of an inch, e.g. 1/8, 1/6, etc\n #\n $in_frac = round($mm/25.4*$denom,0,PHP_ROUND_HALF_UP);\n $inches = floor($in_frac/$denom);\n $num = $in_frac % $denom;\n $gcd = gcd($num,$denom);\n $num = $num/$gcd;\n $denom = $denom/$gcd;\n $feet = floor($inches/12);\n $inches = $inches % 12;\n $retval = \"\";\n if ($num == 0) {\n $retval = $feet . \"'-\" . $inches . \"\\\"\";\n }\n else {\n $retval = $feet . \"'-\" . $inches . \" \" . $num . \"/\" . $denom . \"\\\"\";\n }\n return $retval;\n}",
"function to_inches($mm,$denom) {\n #\n # Arguments:\n # mm - length in millimeters\n # denom - accuracy in fractions of an inch, e.g. 1/8, 1/16, etc.\n #\n $in_frac = round($mm/25.4*$denom,0,PHP_ROUND_HALF_UP);\n $inches = floor($in_frac/$denom);\n $num = $in_frac % $denom;\n $gcd = gcd($num,$denom);\n $num = $num/$gcd;\n $denom = $denom/$gcd;\n $retval = \"\";\n if ($num == 0) {\n $retval = $inches . \"\\\"\";\n } \n else {\n $retval = $inches . \" \" . $num . \"/\" . $denom . \"\\\"\";\n }\n return $retval;\n}",
"function byteSizeConvert($size){\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n}",
"public function getUnitsPerEm() {}",
"public function getReadableSize()\n {\n $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n for ($i = 0; $this->size > 1024; $i++) {\n $this->size /= 1024;\n }\n\n return round($this->size, 2).' '.$units[$i];\n }",
"protected function _getUnitsPerEm() {}",
"public static function parseIniSize($size): int\n {\n $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.\n $size = preg_replace('/[^0-9\\.]/', '', $size); // Remove the non-numeric characters from the size.\n if ($unit && isset($unit[0])) {\n // Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.\n return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));\n } else {\n return round($size);\n }\n }",
"function round_up_bytes($size) {\n if($size < 1024) {\n return array('size'=>round($size,2),'label'=>'B');\n } elseif($size >= 1024 AND $size < 1048576) {\n return array('size'=>round(($size / 1024),2),'label'=>'KB');\n } elseif($size >= 1048576 AND $size < 1073741824) {\n return array('size'=>round(($size / 1048576),2),'label'=>'MB');\n } else {\n return array('size'=>round(($size / 1073741824),2),'label'=>'GB');\n }\n}",
"function format_size($file_size, $sizetype) {\n\t\tswitch(strtolower($sizetype)){\n\t\t\tcase \"kb\":\n\t\t\t\t$filesize = $file_size * .0009765625; // bytes to KB\n\t\t\tbreak;\n\t\t\tcase \"mb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625; // bytes to MB\n\t\t\tbreak;\n\t\t\tcase \"gb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625 * .0009765625; // bytes to GB\n\t\t\tbreak;\n\t\t}\n\t\tif($filesize <= 0){\n\t\t\t$filesize = 0;\n\t\t} else {\n\t\t\t$filesize = round($filesize, 2).' '.$sizetype;\n\t\t}\n\t\treturn $filesize;\n\t}",
"function sloodle_convert_file_size_shorthand($size)\n {\n $size = trim($size);\n $num = (int)$size;\n $char = strtolower($size{strlen($size)-1});\n switch ($char)\n {\n case 'g': $num *= 1024;\n case 'm': $num *= 1024;\n case 'k': $num *= 1024;\n }\n\n return $num;\n }",
"function bin2hr($size){\n //eg: $size = 15392074\n //result: 14.68M\n $sizes = array(1024=>\"K\",1048576=>\"M\",1073741824=>\"G\");\n krsort($sizes);\n foreach($sizes as $lvl=>$lvlName){\n if($size>=$lvl){\n return round($size / $lvl,2).$lvlName;\n }\n }\n return $size;\n}",
"function carton_let_to_num( $size ) {\n $l \t\t= substr( $size, -1 );\n $ret \t= substr( $size, 0, -1 );\n switch( strtoupper( $l ) ) {\n\t case 'P':\n\t $ret *= 1024;\n\t case 'T':\n\t $ret *= 1024;\n\t case 'G':\n\t $ret *= 1024;\n\t case 'M':\n\t $ret *= 1024;\n\t case 'K':\n\t $ret *= 1024;\n }\n return $ret;\n}",
"function parse_size($size) {\n $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.\n $size = preg_replace('/[^0-9\\.]/', '', $size); // Remove the non-numeric characters from the size.\n if ($unit) {\n // Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.\n return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));\n }\n else {\n return round($size);\n }\n }",
"public function getStrikeoutSize() {}",
"function virustotalscan_get_size($size)\r\n{\r\n $standard = floatval(1024);\r\n if (floatval($size) < $standard) {\r\n // atunci sunt biti\r\n return $size.\" bytes\";\r\n }\r\n else {\r\n // sunt mai mult de 1024 de biti\r\n if (floatval(floatval($size)/1024) > $standard) {\r\n // atunci este de ordinul MB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024/1024, 2). \" MB\";\r\n }\r\n else {\r\n // este de ordinul KB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024, 2). \" KB\";\r\n }\r\n // restul nu ne intereseaza pentru ca nu pot fi incarcate fisiere mai mari de 1 GB\r\n }\t\r\n}",
"function MakeSize($str, $type) {\r\n $rStr = @explode(\"x\", $str);\r\n if ($type == 'inch') {\r\n $reqSize = $rStr[0] . '\"' . \"x\" . $rStr[1] . '\"';\r\n } elseif ($type == 'feet') {\r\n $reqSize = $rStr[0] . \"'\" . 'x' . $rStr[1] . \"'\";\r\n }\r\n return $reqSize;\r\n}",
"public function getFormatSize() {}",
"private function _calculateSize ($size)\n {\n if ($size < 1024) {\n $size = $size . \" Bytes\";\n } elseif ($size < 1048576) {\n $sizeInKB = $size / 1024;\n $size = round($sizeInKB, 1) . \" KB\";\n } else {\n $sizeInMB = $size / (1024 * 1024);\n $size = round($sizeInMB, 1) . \" Mb\";\n }\n return $size;\n }",
"function erp_let_to_num( $size ) {\n $l = substr( $size, -1 );\n $ret = substr( $size, 0, -1 );\n switch ( strtoupper( $l ) ) {\n case 'P':\n $ret *= 1024;\n case 'T':\n $ret *= 1024;\n case 'G':\n $ret *= 1024;\n case 'M':\n $ret *= 1024;\n case 'K':\n $ret *= 1024;\n }\n\n return $ret;\n}",
"function format_toSizeInBytes_shortForm($size_in_bytes) {\n\t\t//\n\t\t// Data sizes are normally specified in KB - powers of 1024, so return KB rather than kB\n\n\t\tif ($size_in_bytes < (1024 * 1024)) {\n\t\t\t$unit = \"K\";\n\t\t\t$unitSize = $size_in_bytes / 1024;\n\t\t} else if ($size_in_bytes < (1024 * 1024 * 1024)) {\n\t\t\t$unit = \"M\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024);\n\t\t} else {\n\t\t\t$unit = \"G\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024 * 1024);\n\t\t}\n\n\t\t$showDecimalPlace = $unitSize < 10 && round($unitSize, 1) != round($unitSize);\n\n\t\treturn sprintf($showDecimalPlace ? \"%1.1f\" : \"%1.0f\", $unitSize) . $unit;\n\t}",
"public function let_to_num( $size ) {\n\t\t$l = substr( $size, - 1 );\n\t\t$ret = substr( $size, 0, - 1 );\n\t\tswitch ( strtoupper( $l ) ) {\n\t\t\tcase 'P':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'T':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'G':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'M':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'K':\n\t\t\t\t$ret *= 1024;\n\t\t}\n\n\t\treturn $ret;\n\t}",
"private function nearestUnitSize($size) {\n\t\t$units = Array('b', 'kb', 'mb', 'gb', 'tb', 'pb');\n\t\t$unit_index = 0;\n\t\twhile ($size > 100 && isset($units[$unit_index])) {\n\t\t\t$size /= 1024;\n\t\t\t$unit_index ++;\n\t\t}\n\t\treturn round($size, 2).$units[$unit_index];\n\t}",
"function convert_cm_to_feet($cm_value)\n{\n\t//TODO: Convert cm to feet eg. 5'7\n\treturn $cm_value;\n}",
"function format_filesize($size)\r\n{\r\n\r\n // Measure & Number of decimals\r\n $measures = array (\r\n 0 => array ( \"B\", 0 ),\r\n 1 => array ( \"KB\", 0 ),\r\n 2 => array ( \"MB\", 0 ),\r\n 3 => array ( \"GB\", 2 ),\r\n 4 => array ( \"TB\", 3 )\r\n );\r\n\r\n $file_size = (double)$size;\r\n\r\n for ( $i = 0; $file_size >= 1024; $i++ )\r\n {\r\n $file_size = (double)$file_size / 1024;\r\n }\r\n\r\n $file_size = number_format ( $file_size, $measures[$i][1] );\r\n\r\n return $file_size.\" \".$measures[$i][0];\r\n}",
"function number_to_human_size($bytes){\n\t$border = 1024 * 1.5;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u Byte', $bytes);\n\t\n\t$bytes /= 1024;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u KiByte', $bytes);\n\t\n\t$bytes /= 1024;\n\treturn sprintf('%.1f MiByte', $bytes);\n}",
"public function getSizeFormatted($si = false);",
"public function convertToReadableSize($size)\n\t{\n\t\t$base = log($size) / log(1024);\n\t\t$suffix = ['', 'KB', 'MB', 'GB', 'TB'];\n\t\t$f_base = floor($base);\n\t\treturn round(pow(1024, $base - floor($base)), 1) . $suffix[$f_base];\n\t}",
"function sizetobytes($size,$reverse=false) {\n\t\t//UNITS TO BYTES\n\t\tif(!$reverse) {\n\t\t\t$unit = strtolower($size);\n\t\t\t$unit = preg_replace('/[^a-z]/', '', $unit);\n\t\t\t$value = intval(preg_replace('/[^0-9]/', '', $size));\n\t\t\t$units = array('b'=>0, 'kb'=>1, 'mb'=>2, 'gb'=>3, 'tb'=>4);\n\t\t\t$exponent = isset($units[$unit]) ? $units[$unit] : 0;\n\t\t\treturn ($value * pow(1024, $exponent)); \n\t\t} \n\t\t//BYTES TO UNITS\n if ($size >= 1073741824) {\n $size = number_format($size / 1073741824, 2).' gb';\n } elseif ($size >= 1048576) {\n $size = number_format($size / 1048576, 2).' mb';\n } elseif ($size >= 1024) {\n $size = number_format($size / 1024, 2).' kb';\n } elseif ($size > 1) {\n $size = $size.' bytes';\n } elseif ($size == 1) {\n $size = $size.' byte';\n } else {\n $size = '0 bytes';\n }\n\n return $size;\n\t}",
"function humanReadableToBytes (string $size): int {\n\t$unitIndex = 0;\n\n\t$chars = str_split($size);\n\t$charsLen = count($chars);\n\n\t$multipliers =\n\t\t[\n\t\t\t'B' => 1,\n\t\t\t'KB' => 1 << 10,\n\t\t\t'MB' => 1 << 20,\n\t\t\t'GB' => 1 << 30,\n\t\t\t'TB' => 1 << 40\n\t\t];\n\n\tfor ($i = 0; $i < $charsLen; $i++) {\n\t\tif (!is_numeric($size[$i]) and $size[$i] != '.') {\n\t\t\t$unitIndex = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t$sizeN = floatval(substr($size, 0, $unitIndex));\n\t$sizeU = substr($size, $unitIndex, $charsLen - $unitIndex);\n\n\treturn round($sizeN * $multipliers[$sizeU]);\n}",
"function view_size($size) {\n\n\tif (!is_numeric($size))\n\t\treturn \"[Error]\";\n\telse {\n\t\tif ($size >= 1073741824)\n\t\t\t$size = round($size/1073741824*100)/100 .\" GB\";\n\t\telse\n\t\t\tif ($size >= 1048576)\n\t\t\t\t$size = round($size/1048576*100)/100 .\" MB\";\n\t\telse\n\t\t\tif ($size >= 1024)\n\t\t\t\t$size = round($size/1024*100)/100 .\" KB\";\n\t\telse \n\t\t\t$size = $size . \" B\";\n\t\t\t\n\t\treturn $size;\n\t}\n}",
"function getSize() ;",
"function transByte($size){\n\t$arr = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"EB\");\n\t$i = 0;\n\twhile($size>1024){\n\t\t$size/=1024;\n\t\t$i++;\n\t}\n\treturn round($size,2).$arr[$i];\n}",
"function sizeFormat($size) { \n if($size<1024) \n { \n return $size.\" bytes\"; \n } \n else if($size<(1024*1024)) \n { \n $size=round($size/1024,1); \n return $size.\" KB\"; \n } \n else if($size<(1024*1024*1024)) \n { \n $size=round($size/(1024*1024),1); \n return $size.\" MB\"; \n } \n else \n { \n $size=round($size/(1024*1024*1024),1); \n return $size.\" GB\"; \n } \n}",
"private function getSizeFormattedSi(int $size): string\n {\n if ($size > 1000 * 1000) {\n return sprintf('%0.1f MB', ($size / 1000 / 1000));\n }\n if ($size > 1000) {\n return sprintf('%0.1f KB', ($size / 1000));\n }\n\n return $size . ' B';\n }",
"function _parse_size($new_size, $old_size)\r\n {\r\n if ('%' == $new_size) {\r\n $new_size = str_replace('%','',$new_size);\r\n $new_size = $new_size / 100;\r\n }\r\n if ($new_size > 1) {\r\n return (int) $new_size;\r\n } elseif ($new_size == 0) {\r\n return (int) $old_size;\r\n } else {\r\n return (int) round($new_size * $old_size, 0);\r\n }\r\n }",
"public function getSizeForHuman()\n {\n return File::format_size($this->Size);\n }",
"abstract public function getBoxSize();",
"public function get_size()\n\t\t{\n\t\t\treturn $this->width().'x'.$this->height();\n\t\t}",
"public function getSize(): string\n {\n $B = 1;\n $KB = $B * 1024;\n $MB = $KB * 1024;\n $GB = $MB * 1024;\n\n $bytes = filesize($this->filePath);\n\n $units = match (true)\n {\n $bytes >= $GB => ['suffix' => 'GiB', 'base' => $GB, 'css' => 'text-dark'],\n $bytes >= $MB => ['suffix' => 'MiB', 'base' => $MB, 'css' => 'text-light'],\n $bytes >= $KB => ['suffix' => 'KiB', 'base' => $KB, 'css' => 'text-muted'],\n default => ['suffix' => 'B', 'base' => $B, 'css' => 'text-danger']\n };\n\n return sprintf('%.3f', $bytes / $units['base']) . $units['suffix'];\n }",
"function bytes_to_human_size($size, $decimals = 1)\n {\n $suffix = array('Bytes','KB','MB','GB','TB','PB','EB','ZB','YB','NB','DB');\n $i = 0;\n\n while ($size >= 1024 && ($i < count($suffix) - 1)) {\n $size /= 1024;\n $i++;\n }\n\n return round($size, $decimals) . ' ' . $suffix[$i];\n }",
"public function getSize()\n {\n // after the decimal dot (instead of rounding up), which might cause\n // incorrect size to be returned . So, we copied the code from the\n // Selenium client and instead of using \"rawPoint.get(...).intValue()\"\n // we return the double value, and use \"ceil\".\n $elementId = $this->getId();\n $response = $this->execute(DriverCommand::GET_ELEMENT_SIZE,\n array(\":id\" => $elementId));//ImmutableMap::of(\"id\", elementId));\n //$rawSize = $response->getValue();\n $width = floor($response[\"width\"]);\n $height = floor($response[\"height\"]);\n return new WebDriverDimension($width, $height);\n\n // TODO: Use the command delegation instead. (once the bug is fixed).\n// return webElement.getSize();\n }",
"function human_filesize($size, $precision = 2) {\n $units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');\n $step = 1024;\n $i = 0;\n while (($size / $step) > 0.9) {\n $size = $size / $step;\n $i++;\n }\n return round($size, $precision).$units[$i];\n}",
"function return_ini_bytes($size){\n\tswitch(strtolower(substr ($size, -1))) {\n\t\tcase 'k': return (int)$size * 1024;\n\t\tcase 'm': return (int)$size * 1048576;\n\t\tcase 'g': return (int)$size * 1073741824;\n\t\tdefault: return $size;\n\t}\n}",
"function tmpl_let_to_num( $size ) {\r\n\t\t$l = substr( $size, -1 );\r\n\t\t$ret = substr( $size, 0, -1 );\r\n\t\tswitch ( strtoupper( $l ) ) {\r\n\t\t\tcase 'P':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'T':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'G':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'M':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'K':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"public function getFormattedSize() {\r\n\t\r\n\t $bytes = $this->getSize();\r\n\t\r\n\t if ($bytes >= 1073741824)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1073741824, 2) . ' GB';\r\n\t }\r\n\t elseif ($bytes >= 1048576)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1048576, 2) . ' MB';\r\n\t }\r\n\t elseif ($bytes >= 1024)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1024, 2) . ' KB';\r\n\t }\r\n\t elseif ($bytes > 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' bytes';\r\n\t }\r\n\t elseif ($bytes == 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' byte';\r\n\t }\r\n\t else\r\n\t {\r\n\t\t$bytes = '0 bytes';\r\n\t }\r\n\r\n\t return $bytes;\r\n\t \r\n }",
"function cre_resize_bytes($size) {\n $count = 0;\n $format = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\");\n while(($size/1024)>1 && $count<8) {\n $size=$size/1024;\n $count++;\n }\n $return = number_format($size,0,'','.').\" \".$format[$count];\n return $return;\n }",
"function calc_size()\n\t{\n\t}",
"function _parseSize($size)\r\n\t{\r\n\t\tif ($size < 1024) {\r\n\t\t\treturn $size . ' bytes';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($size >= 1024 && $size < 1024 * 1024) {\r\n\t\t\t\treturn sprintf('%01.2f', $size / 1024.0) . ' Kb';\r\n\t\t\t} else {\r\n\t\t\t\treturn sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb';\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function calc_size()\n\t{\n\t\t\t$size = getimagesize(ROOT_PATH . $this->file);\n\t\t\t$this->width = $size[0];\n\t\t\t$this->height = $size[1];\n\t}",
"public function getFontSize() {}",
"public function getFontSize() {}",
"function getFileSizeUnit($file_size){\nswitch (true) {\n case ($file_size/1024 < 1) :\n return intval($file_size ) .\" Bytes\" ;\n break;\n case ($file_size/1024 >= 1 && $file_size/(1024*1024) < 1) :\n return round(($file_size/1024) , 2) .\" KB\" ;\n break;\n default:\n return round($file_size/(1024*1024) , 2) .\" MB\" ;\n}\n}",
"public static function toDataSizeString($size, $scale = 1024, $unit = 'oct', $kilo = 'Ko', $mega = 'Mo', $giga = 'Go', $tera = 'To') {\r\n if ($size < $scale) {\r\n return $size . ' ' . $unit;\r\n } elseif ($size < ($scale * $scale)) {\r\n return sprintf('%01.2f ' . $kilo, $size / $scale);\r\n } elseif ($size < ($scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $mega, $size / ($scale * $scale));\r\n } elseif ($size < ($scale * $scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $giga, $size / ($scale * $scale * $scale));\r\n }\r\n return sprintf('%01.2f ' . $tera, $size / ($scale * $scale * $scale * $scale));\r\n }",
"function size_format($bytes, $decimals = 0)\n {\n }",
"function parseSize ($size) {\n\tif ($size[0]!=\"*\"){\n\t$paperSize = explode(\" x \", $size);\n\t$paperSize[0] -= EDGEMARGIN;\n\t$paperSize[1] -= GRIPMARGIN;\n\treturn $paperSize;\n\t}\n}",
"public static function toFileSize($size)\r\n\t{\r\n\t\t$size2 = $size/1024;\r\n\t\tif ($size2 > 500)\r\n\t\t\treturn (intval($size2/102.4)/10).\" Mo\";\r\n\t\telseif ($size)\r\n\t\t\treturn (intval($size2)).\" Ko\";\r\n\t\telse\r\n\t\t\treturn NULL;\r\n\t}",
"function humanFileSize($size,$unit=\"\") \n {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n }",
"function formatSize($b)\n\t{\n\t\t//1024\t\tk\n\t\t//1048576\tm\n\t\t//1073741824\tg\n\n\t\tif ($b >= 1073741824)\n\t\t\t$thesize = round($b / 1073741824 * 100) / 100 . \"G\"; \n\t\telseif ($b >= 1048576)\n\t\t\t$thesize = round($b / 1048576 * 100) / 100 . \"MB\";\n\t\telseif ($b >= 1024)\n\t\t\t$thesize = round($b / 1024 * 100) / 100 . \"K\"; \n\t\telse\n\t\t\t$thesize = $b . \"b\";\n\n\t\treturn $thesize;\n\t}",
"public static function let_to_num( $size ) {\n\t\t$char = substr( $size, -1 );\n\t\t$ret = substr( $size, 0, -1 );\n\n\t\t// @codingStandardsIgnoreStart\n\t\tswitch ( strtoupper( $char ) ) {\n\t\t\tcase 'P':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'T':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'G':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'M':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'K':\n\t\t\t\t$ret *= 1024;\n\t\t}\n\t\t// @codingStandardsIgnoreEnd\n\n\t\treturn $ret;\n\t}",
"function formatBytes($size) {\n $units = array(' B', ' KB', ' MB', ' GB', ' TB');\n for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n return round($size, 2).$units[$i];\n}",
"public static function fsize($size){\n $unit = array('b','Kb','Mb','Gb','Tb','Pb');\n $prefix = $size < 0 ? '-' : ''; $size = abs($size);\n return $prefix.@round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }",
"function filesize_formatted($size)\n{\n\t$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t$power = $size > 0 ? floor(log($size, 1024)) : 0;\n\treturn number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];\n}",
"public function size($size)\n {\n $kb = 1024;\n $mb = 1048576;\n $gb = 1073741824;\n $tb = 1099511627776;\n if (!$size) {\n return '0 B';\n } elseif ($size < $kb) {\n return $size.' B';\n } elseif ($size < $mb) {\n return round($size / $kb, 2).' KB';\n } elseif ($size < $gb) {\n return round($size / $mb, 2).' MB';\n } elseif ($size < $tb) {\n return round($size / $gb, 2).' GB';\n } else {\n return round($size / $tb, 2).' TB';\n }\n }",
"function fileSizeConvert($bytes)\n{\n $bytes = floatval($bytes);\n $arBytes = array(\n 0 => array(\n \"UNIT\" => \"tb\",\n \"VALUE\" => pow(1024, 4)\n ),\n 1 => array(\n \"UNIT\" => \"gb\",\n \"VALUE\" => pow(1024, 3)\n ),\n 2 => array(\n \"UNIT\" => \"mb\",\n \"VALUE\" => pow(1024, 2)\n ),\n 3 => array(\n \"UNIT\" => \"kb\",\n \"VALUE\" => 1024\n ),\n 4 => array(\n \"UNIT\" => \"b\",\n \"VALUE\" => 1\n ),\n );\n\n foreach ($arBytes as $arItem) {\n if ($bytes >= $arItem[\"VALUE\"]) {\n $result = $bytes / $arItem[\"VALUE\"];\n $result = str_replace(\n \".\", \n \".\", \n strval(round($result, 0))\n ).$arItem[\"UNIT\"];\n break;\n }\n }\n return $result;\n}",
"public function getSizeAttribute()\n {\n return self::SIZES[$this->attributes['size']];\n }",
"function mmtopx($d){\n $fc=96/25.4;\n $n=$d*$fc;\n return $n.\"px\";\n}",
"function human_filesize($size,$unit=\"\") {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n}",
"function byteConvert($size, $round = 0) {\n \t/* La size deve essere espressa in Bytes */\n \t$sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n \tfor ($i=0; $size > 1024 && $i < count($sizes) - 1; $i++) $size /= 1024;\n \t\n \treturn round($size,$round).\" \".$sizes[$i];\n\t}",
"function file_size($size)\r\n\r\n{\r\n\r\n\t$units = array('b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb');\r\n\r\n\r\n\r\n\tfor ($i = 0; $size > 1024; $i++)\r\n\r\n\t\t$size /= 1024;\r\n\r\n\r\n\r\n\treturn round($size, 2).' '.$units[$i];\r\n\r\n}",
"public static function formatSize($size)\n {\n if ($size < DRUSH_KILOBYTE) {\n // format_plural() not always available.\n return dt('@count bytes', ['@count' => $size]);\n } else {\n $size /= DRUSH_KILOBYTE; // Convert bytes to kilobytes.\n $units = [\n dt('@size KB', []),\n dt('@size MB', []),\n dt('@size GB', []),\n dt('@size TB', []),\n dt('@size PB', []),\n dt('@size EB', []),\n dt('@size ZB', []),\n dt('@size YB', []),\n ];\n foreach ($units as $unit) {\n if (round($size, 2) >= DRUSH_KILOBYTE) {\n $size /= DRUSH_KILOBYTE;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }",
"function mmtopx($d) {\r\n $fc = 96 / 25.4;\r\n $n = $d * $fc;\r\n return $n . \"px\";\r\n}",
"function convert_file_size($bytes)\n {\n $result = 0;\n\n $bytes = floatval($bytes);\n $arBytes = array(\n 0 => array(\n \"UNIT\" => \"TB\",\n \"VALUE\" => pow(1024, 4)\n ),\n 1 => array(\n \"UNIT\" => \"GB\",\n \"VALUE\" => pow(1024, 3)\n ),\n 2 => array(\n \"UNIT\" => \"MB\",\n \"VALUE\" => pow(1024, 2)\n ),\n 3 => array(\n \"UNIT\" => \"KB\",\n \"VALUE\" => 1024\n ),\n 4 => array(\n \"UNIT\" => \"B\",\n \"VALUE\" => 1\n ),\n );\n\n foreach($arBytes as $arItem)\n {\n if($bytes >= $arItem[\"VALUE\"])\n {\n $result = $bytes / $arItem[\"VALUE\"];\n $result = str_replace(\".\", \",\" , strval(round($result, 2))).\" \".$arItem[\"UNIT\"];\n break;\n }\n }\n return $result;\n }",
"function twe_format_filesize($size) {\n\t$a = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\");\n\t\n\t$pos = 0;\n\twhile ($size >= 1024) {\n\t\t$size /= 1024;\n\t\t$pos++;\n\t}\n\treturn round($size,2).\" \".$a[$pos];\n}",
"function bytesToHumanReadable (int $size, int $decimals = 2): string {\n\tif ($size >= 1 << 40)\n\t\treturn number_format($size / (1 << 40), $decimals).\"TB\";\n\tif ($size >= 1 << 30)\n\t\treturn number_format($size / (1 << 30), $decimals).\"GB\";\n\tif ($size >= 1 << 20)\n\t\treturn number_format($size / (1 << 20), $decimals).\"MB\";\n\tif ($size >= 1 << 10)\n\t\treturn number_format($size / (1 << 10), $decimals).\"KB\";\n\treturn number_format($size, $decimals).\"B\";\n}",
"public function getFormattedSize($kilobytes) {\n // load translated abbreviations\n global $html_kb, $html_mb, $html_gb;\n\n if ($kilobytes >= 1048576) { //If gigabytes...\n $size = round($kilobytes / 1024 / 1024);\n return $size . ' ' . $html_gb;\n }\n elseif (($kilobytes < 1048576) && ($kilobytes >= 1024)) { //If megabytes...\n $size = round($kilobytes / 1024);\n return $size . ' ' . $html_mb;\n }\n else { //If kilobytes...\n return $kilobytes . ' ' . $html_kb;\n }\n }",
"function serendipity_ini_bytesize($val) {\n if ( $val == '' )\n return 0;\n\n switch(substr($val, -1)) {\n case 'k':\n case 'K':\n return (int) $val * 1024;\n break;\n case 'm':\n case 'M':\n return (int) $val * 1048576;\n break;\n default:\n return $val;\n }\n}",
"function sizeFormat($b = 0){\r\n\t\tif($b < 1024){\r\n\t\t\treturn $b . 'bytes';\r\n\t\t}elseif($b < 1048576){\r\n\t\t\treturn round($b / 1024 * 100 ) / 100 . 'KB';\r\n\t\t}elseif($b < 130023424){\r\n\t\t\treturn round($b / 1048576 * 100 ) / 100 . 'MB';\r\n\t\t}elseif($b < 133143986176){\r\n\t\t\treturn round($b / 130023424 * 100) / 100 . 'GB';\r\n\t\t}else{\r\n\t\t\treturn round($b / 133143986176 * 100) / 100 . 'TB';\r\n\t\t}\r\n\t}",
"public function getShopSize()\n {\n $size = $this->ask('What is the size of the shop? [width:int height:int]');\n\n if (preg_match('/^[0-9]+ [0-9]+$/', $size)) {\n return $size;\n } else {\n $this->throwErrors('you have to enter the shop size in the format :int :int!');\n return $this->getGridSize();\n }\n }",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize();",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}",
"public function getSize() {}",
"public function formatSizeDataProvider() {}",
"public function getSize()\n {\n return \"Small\";\n }",
"function formatSize($filename)\n\t{\n\n\t\tif (is_string($filename) && !is_numeric($filename)) $size = filesize($filename);\n\n\t\t$mod = 1024;\n\t\t$units = explode(' ', 'B KB MB GB TB PB');\n\n\t\tfor ($i = 0; $size > $mod; $i++)\n\t\t{\n\t\t\t$size /= $mod;\n\t\t}\n\n\t\treturn round($size, 2).' '.$units[$i];\n\n\t}",
"function convertFileSize ($filesize){\n $count = 0;\n $newFileSize = '';\n $array = ['byte', 'kb', 'mb', 'gb', 'tb', 'pb'];\n while($filesize > 1024){\n $filesize /= 1024;\n $count++;\n }\n\n $newFileSize .= round($filesize, 2) . $array[$count]; \n\n \n return $newFileSize;\n }"
] | [
"0.7218597",
"0.707158",
"0.66565835",
"0.66483855",
"0.6492572",
"0.63490313",
"0.63467",
"0.63165903",
"0.6254541",
"0.624985",
"0.6219829",
"0.6118946",
"0.6107312",
"0.61064196",
"0.6064713",
"0.60634553",
"0.598942",
"0.5984127",
"0.5977499",
"0.5967978",
"0.59661895",
"0.59637725",
"0.59509003",
"0.5891467",
"0.58858293",
"0.58837754",
"0.5860568",
"0.5846952",
"0.5843454",
"0.5841265",
"0.58398944",
"0.5831294",
"0.5829251",
"0.5811992",
"0.5802288",
"0.5801474",
"0.58011365",
"0.57956713",
"0.579271",
"0.57720363",
"0.57600194",
"0.5758815",
"0.5747636",
"0.5745716",
"0.5728378",
"0.5718519",
"0.5717606",
"0.5700105",
"0.56800646",
"0.567073",
"0.56560344",
"0.56538606",
"0.5641595",
"0.5641595",
"0.5637318",
"0.5628868",
"0.5622998",
"0.5621068",
"0.5578404",
"0.5577404",
"0.55694294",
"0.5556456",
"0.5553836",
"0.55477065",
"0.55448097",
"0.5529073",
"0.5522154",
"0.55177075",
"0.5505765",
"0.55021644",
"0.5494647",
"0.5493104",
"0.5489314",
"0.5483322",
"0.5450358",
"0.5447473",
"0.54253817",
"0.5425186",
"0.5424246",
"0.54240584",
"0.5412604",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54109794",
"0.54076064",
"0.5406185",
"0.5406185",
"0.5406185",
"0.5406185",
"0.5405912",
"0.5404318",
"0.5398051",
"0.5389693",
"0.53848827"
] | 0.83945704 | 0 |
Display a listing of the resource. | public function index()
{
return View('trader.index', compact('traders'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
/** Agregar metodo por empresa de usuario
* Si no es Owner, dependera de la empresa de trabajo
* para administrador en adelante
**/
$establecimiento = Establecimiento::lista()->lists('name', 'id');
/** OJO **/
$secciones = Seccion::Lists('name', 'id');
$estado = Userstatus::lists('name', 'id');
return View('trader.create', compact('establecimiento', 'secciones', 'cargo', 'estado'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(TradersFormRequest $request)
{
$trader = Trader::create($request->all());
$name = $trader->name;
$seccion = $trader->establecimiento->name;
Session::flash('flash_message', 'El nuevo registro de "'. $name .'" en "'. $seccion .'"" a sido creado');
if($request->input('main_form') != 1){
return redirect()->back();
}
return redirect()->route('personal.index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$trader = Trader::findOrFail($id);
if(Auth::user()->hasRole(['centro-acopio', 'currier', 'cliente'])){
if($trader->estado->id != 1){
return redirect()->back()->with('flash_message', 'ATENCIÓN!!! Este perfil a sido desactivado o suspendido, habla con tu supervisor o administrador para
obtener mas información!!!!');
}
}
$sender = Shipment::where('sender_id', '=', $id)->test()->get();
$reciber = Shipment::where('reciber_id', '=', $id)->test()->get();
$users = $trader->user;
return View('trader.show', compact('trader', 'sender', 'reciber', 'users'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$trader = Trader::findOrFail($id);
/** Agregar metodo por empresa de usuario
* Si no es Owner, dependera de la empresa de trabajo
* para administrador en adelante
**/
$establecimiento = Establecimiento::lista()->lists('name', 'id');
/** OJO **/
$secciones = Seccion::lists('name', 'id');
$estado = Userstatus::lists('name', 'id');
return View('trader.edit', compact('trader', 'establecimiento', 'secciones', 'cargo', 'estado'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(TradersFormRequest $request, $id)
{
$trader = Trader::findOrFail($id);
$trader->update($request->all());
Session::flash('flash_message', 'El nuevo a sido editado');
return redirect()->route('personal.show', $trader->id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Check if user is admin | public function userIsAdmin($userName)
{
$this->db->execute("SELECT role FROM users WHERE name='$userName'");
$res = $this->db->fetchOne();
if ($res->role != 1) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function isAdminUser() {}",
"function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }",
"function is_user_admin()\n {\n }",
"private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"protected function isCurrentUserAdmin() {}",
"protected function isCurrentUserAdmin() {}",
"public function isAdmin()\n {\n return ($this->username === \"admin\");\n }",
"function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }",
"function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function checkIsAdmin()\n {\n return $this->user_admin;\n }",
"public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }",
"function isAdmin() {\n return ($this->userType == 'admin');\n }",
"public function isAdmin();",
"function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"public function isAdmin() {}",
"public function isUserOnAdminArea()\n\t{\n\t\treturn is_admin();\n\t}",
"public function isAdmin(){\n if($this->role==\"admin\"){\n return true;\n }\n return false;\n }",
"public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}",
"protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }",
"public static function isAdmin() {\r\n\r\n return Session::get('admin') == 1;\r\n\r\n }",
"function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"public function is_admin() {\n if($this->is_logged_in() && $this->user_level == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }",
"public function isAdmin() {\n return $this->admin; // cerca la colonna admin nella tabella users\n }",
"public function isAdmin()\n {\n return ($this->type === User::ADMIN_USER);\n }",
"public function isAdmin()\n {\n return ((string) strtoupper($this->data->user_role) === \"ADMIN\") ? true : false;\n }",
"public function isAdmin()\n {\n return $this->hasCredential('admin');\n }",
"private function isAdmin() : bool\n {\n return $this->user->hasRole('admin');\n }",
"function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}",
"public static function isAdmin(): bool {\n if ($user = self::user() && self::user()->isAdmin) {\n return true;\n }\n return false;\n }",
"public function isAdmin()\n {\n return (\\Auth::user()->role == 'admin');\n }",
"public function isAdmin()\n {\n return $this->role == 1;\n }",
"function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}",
"private function isAdmin() : bool\n {\n return $this->role('admin');\n }",
"public function getIsAdmin();",
"public function getIsAdmin();",
"public function isAdmin()\n {\n return $this->role == 'admin';\n }",
"public function isAdmin(){\n $role = $this->role->type;\n\n return $role === 'admin';\n }",
"public static function isAdmin()\n {\n if (Yii::$app->user->isGuest) {\n return false;\n }\n $model = User::findOne(['username' => Yii::$app->user->identity->username]);\n if ($model == null) {\n return false;\n } elseif ($model->id_user_role == 1) {\n return true;\n }\n return false;\n }",
"public function isAdmin(){\n return $this->role=='admin';\n }",
"public function isAdmin()\n {\n return $this->isSuperUser() || $this->isMemberOf('admin');\n }",
"public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }",
"function isAdmin() {\n if (\\Illuminate\\Support\\Facades\\Auth::user()->rol_id == 1) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAdmin(){\n if($this->role->name = 'Administrator'){\n return true;\n }\n return false;\n }",
"public function isAdmin(): bool\n {\n return $this->is_admin === true;\n }",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"function is_admin()\n\t{\n\t\treturn strtolower($this->ci->session->userdata('DX_role_name')) == 'admin';\n\t}",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function isAdmin()\n {\n }",
"function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}",
"public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"protected function isAdmin()\n\t{\n\t\treturn is_admin();\n\t}",
"public static function isAdmin()\n\t{\n\t\treturn in_array( Auth::user()->username, Config::get( 'admin.usernames' ) );\n\t}",
"public function isAdmin()\n {\n return ($this->role == 1) ? true : false;\n }",
"public function isAdmin() {\n return $this->hasPermission('is_admin');\n }",
"function isAdmin() {\n\tif (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public static function isAdmin()\n {\n \t$user = Session::get('loginuser');\n \tif ($user == env('ADMINEMAIL')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public function checkAdmin();",
"public function isAdmin()\n {\n return $this->getAttribute('type') === User::ADMIN_TYPE;\n }",
"public function isAdmin()\n {\n return $this->user_role === User::ROLE_ADMIN;\n }",
"function is_admin(){\r\n if (isset($_SESSION['admin']) && $_SESSION['admin']){\r\n return true;\r\n }\r\n return false;\r\n }",
"public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }",
"public function check_admin()\n {\n return current_user_can('administrator');\n }",
"public function isAdmin()\n {\n return $this->role == 'Administrator' ? true : false;\n }",
"public function isAdmin() {\n return ($this->userlevel == ADMIN_LEVEL ||\n $this->username == ADMIN_NAME);\n }",
"public static function isAdmin()\n {\n return auth()->check() && auth()->user()->panichd_admin;\n }",
"public function is_user_admin($user) {\n return $user['user_admin'] == 1;\n }",
"public static function isAdmin(): bool\n {\n $user = self::getUser();\n\n // $user->admin (check if user is admin in database - set to 1)\n if (!$user || !$user->admin) {\n return false;\n }\n\n return true;\n }",
"function _isUserAdmin(){\n\n $output = 0;\n $userId = $this->session->userdata('userId');\n $user = $this->User_model->getUserByUserId($userId);\n $userRoleId = $user->user_roles_id;\n $userRole = $this->Roles_model->getUserRoleById($userRoleId);\n if($userRole->role === 'admin'){\n $output = 1;\n }\n return $output;\n }",
"function user_AuthIsAdmin() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['admin']) && ($AUTH['admin'] === 1);\n}",
"public static function isAdmin(){\n if(self::exists('auth_type')&& self::get('auth_type')=='admin'){\n return true;\n }else\n return false;\n\n }",
"public function isAdmin()\n\t{\n\t\t$this->reply(true);\n\t}",
"static public function isAdmin(){\n if ( isset($_SESSION['admin']) && ($_SESSION['admin'] == 1)){\n return true;\n } else {\n return false;\n }\n }",
"public function memberIsAdmin()\n {\n return $_SESSION['__COMMENTIA__']['member_role'] === 'admin';\n }",
"static function getIsAdmin() {\n\t\t$user = ctrl_users::GetUserDetail();\n\t\tif($user['usergroupid'] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}",
"public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }",
"function iAmAdmin(){\n $adminIDs = Array( 1, 2 );\n \n return in_array( $_SESSION['userid'], $adminIDs );\n }",
"public function isAdminLoggedIn() {\n\t\t$user = $this->getLoggedInUser();\n\t\treturn $user && $user->isAdmin();\n\t}",
"private function isAdmin() {\n\t\t$user = $this->userSession->getUser();\n\t\tif ($user !== null) {\n\t\t\treturn $this->groupManager->isAdmin($user->getUID());\n\t\t}\n\t\treturn false;\n\t}",
"public function isAdmin()\n {\n if (strtolower($this->name) == 'administrator')\n {\n return true;\n }\n\n return false;\n }",
"public function isAdmin(): bool\n {\n return $this->type() === self::ADMIN;\n }",
"function is_admin() {\n\tif(\n\t\tisset($_SESSION['admin']->iduser) \n\t\t&& !empty($_SESSION['admin']->iduser) \n\t\t&& $_SESSION['admin']->type = 'admin'\n\t\t&& $_SESSION['active']->type = 1\n\t\t&& $_SESSION['confirmed']->type = 1\n\t) return TRUE;\n\t\t\t\n\treturn FALSE;\n}",
"function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}",
"public function isAdmin(){\n return $this->hasRoles([\"admin\"]);\n }",
"public function IsAdmin ();",
"public function getIsAdministrator() {}",
"function checkAdminLogin() \n{\n\tif(checkNotLogin())\n\t{\n\t\treturn false;\n\t}\n\t\n\t$user = $_SESSION['current_user'];\n\t\n\tif($user->isAdmin())\n\t{\n\t\treturn true;\n\t}\n\telse \n\t{\n\t\treturn false;\n\t}\n}",
"public function isAdmin()\n {\n return $this->type == self::TYPE_ADMIN ;\n }",
"public function hasadmin()\n {\n return $this->hasuser() && $this->user()->isadmin();\n }",
"protected function isAdmin()\n {\n if (session()->get('role') == 'admin') {\n return true;\n }\n return false;\n }",
"public function isAdmin(){\n if($this->role->name == 'Administrator' && $this->is_active == 1){\n return true;\n }\n return false;\n }",
"public function isAdmin()\n {\n // Look for value only if not already set\n if(!isset($this->isAdmin)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $this->isAdmin = $us->isAdmin($this->username);\n }\n return $this->isAdmin;\n }",
"public static function isAdmin()\n {\n if (self::isConsole()) {\n return true;\n }\n \n return \\Craft\\craft()->getUser()->isAdmin();\n }",
"function _lean_is_admin() {\n global $user;\n if (in_array('administrator', array_values($user->roles))) {\n return true;\n } else {\n return false;\n }\n}",
"public function isAdmin() {\n\t\t\n\t\treturn $this->is_admin;\n\t\t\n\t}",
"public function checkIsAdmin() {\n\t\treturn Mage::getSingleton('admin/session')->isLoggedIn();\n\t}",
"public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }",
"public function isAdmin(): bool\n {\n return $this->is_admin;\n }",
"function isAdmin()\n {\n if($this->role != ROLE_ADMIN) { return true; }\n else {return false; }\n }",
"public function adminUserConditionMatchesAdminUser() {}"
] | [
"0.9027777",
"0.8695937",
"0.8691268",
"0.86369",
"0.8591458",
"0.85899",
"0.8571316",
"0.8515396",
"0.8502602",
"0.84922993",
"0.84898376",
"0.8481368",
"0.8479492",
"0.8438324",
"0.8438324",
"0.8427587",
"0.8396876",
"0.83731365",
"0.8363124",
"0.8329772",
"0.8312123",
"0.83050424",
"0.8287533",
"0.8275923",
"0.82739633",
"0.8267702",
"0.82629085",
"0.82605404",
"0.825662",
"0.8252265",
"0.82303953",
"0.82293254",
"0.82211465",
"0.8217324",
"0.8214836",
"0.8214836",
"0.82117724",
"0.8208928",
"0.81986934",
"0.81965965",
"0.81920993",
"0.8183631",
"0.81834716",
"0.8175712",
"0.81738067",
"0.8166895",
"0.8159274",
"0.8159234",
"0.81542236",
"0.81501806",
"0.8149007",
"0.8147914",
"0.8146436",
"0.8139356",
"0.81346834",
"0.813308",
"0.8130423",
"0.81296194",
"0.81281793",
"0.81214434",
"0.81143147",
"0.8102595",
"0.8101212",
"0.8094317",
"0.8090416",
"0.808554",
"0.8081862",
"0.80798006",
"0.8065683",
"0.8053177",
"0.8052439",
"0.8051452",
"0.8048363",
"0.80475265",
"0.80436325",
"0.8034845",
"0.80317664",
"0.8026199",
"0.8017343",
"0.800745",
"0.80041313",
"0.80013525",
"0.79975075",
"0.799662",
"0.79926753",
"0.7992364",
"0.79859143",
"0.79855925",
"0.7973222",
"0.79649603",
"0.7961542",
"0.7960052",
"0.7955916",
"0.79533964",
"0.795014",
"0.79455894",
"0.7943761",
"0.79426736",
"0.7939785",
"0.7928982",
"0.7926361"
] | 0.0 | -1 |
Function to create links for sorting. | public function orderby($column, $route)
{
return <<<EOD
<span class='orderby'>
<a href="{$route}orderby={$column}&order=asc">↓</a>
<a href="{$route}orderby={$column}&order=desc">↑</a>
</span>
EOD;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generate_sort_links($user_search, $sort) {\n $sort_links = '';\n\n switch ($sort) {\n // Sorted by ascending job title\n case 1:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=2\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=3\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=5\">Date Posted</a></td>';\n break;\n // Sorted by ascending state\n case 3:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=1\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=4\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=5\">Date Posted</a></td>';\n break;\n // Sorted by ascending date posted\n case 5:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=1\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=3\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=6\">Date Posted</a></td>';\n break;\n // Default sorting or some descending sorting selected\n default:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=1\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=3\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=5\">Date Posted</a></td>';\n break;\n }\n\n return $sort_links;\n }",
"function generate_sort_links($user_search, $sort) {\n $sort_links = '';\n\n switch ($sort) {\n case 1:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 2.5:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.6\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 3:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=4\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 5:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=6\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n default:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n }\n\n return $sort_links;\n }",
"function browse_sort_links($links, $wrapperTags = array())\n{\n $sortParam = Omeka_Db_Table::SORT_PARAM;\n $sortDirParam = Omeka_Db_Table::SORT_DIR_PARAM;\n $req = Zend_Controller_Front::getInstance()->getRequest();\n $currentSort = trim($req->getParam($sortParam));\n $currentDir = trim($req->getParam($sortDirParam));\n\n $defaults = array(\n 'link_tag' => 'li',\n 'list_tag' => 'ul',\n 'link_attr' => array(),\n 'list_attr' => array( 'id' => 'sort-links-list' )\n );\n\n $sortlistWrappers = array_merge($defaults, $wrapperTags);\n\n $linkAttrArray = array();\n foreach ($sortlistWrappers['link_attr'] as $key => $attribute) {\n $linkAttrArray[$key] = $key . '=\"' . html_escape($attribute) . '\"';\n }\n $linkAttr = join(' ', $linkAttrArray);\n\n $listAttrArray = array();\n foreach ($sortlistWrappers['list_attr'] as $key => $attribute) {\n $listAttrArray[$key] = $key . '=\"' . html_escape($attribute) . '\"';\n }\n $listAttr = join(' ', $listAttrArray);\n\n $sortlist = '';\n if (!empty($sortlistWrappers['list_tag'])) {\n $sortlist .= \"<{$sortlistWrappers['list_tag']} $listAttr>\";\n }\n\n foreach ($links as $label => $column) {\n if ($column) {\n $urlParams = $_GET;\n $urlParams[$sortParam] = $column;\n $class = '';\n if ($currentSort && $currentSort == $column) {\n if ($currentDir && $currentDir == 'd') {\n $class = 'class=\"sorting desc\"';\n $urlParams[$sortDirParam] = 'a';\n } else {\n $class = 'class=\"sorting asc\"';\n $urlParams[$sortDirParam] = 'd';\n }\n }\n $url = html_escape(url(array(), null, $urlParams));\n if ($sortlistWrappers['link_tag'] !== '') {\n $sortlist .= \"<{$sortlistWrappers['link_tag']} $class $linkAttr><a href=\\\"$url\\\">$label</a></{$sortlistWrappers['link_tag']}>\";\n } else {\n $sortlist .= \"<a href=\\\"$url\\\" $class $linkAttr>$label</a>\";\n }\n } else {\n $sortlist .= \"<{$sortlistWrappers['link_tag']}>$label</{$sortlistWrappers['link_tag']}>\";\n }\n }\n if (!empty($sortlistWrappers['list_tag'])) {\n $sortlist .= \"</{$sortlistWrappers['list_tag']}>\";\n }\n return $sortlist;\n}",
"function create_sort_url($sortby) {\n\tglobal $gfe_url, $nice_url, $directories_before_current_path, $current_directory_name, $sort_order;\n\t$temp_url = '';\n\t$temp_url_nice = '';\n\t$sortorder = '';\n\t$directories_before_current_path = urldecode($directories_before_current_path);\n\t$directories_before_current_path = urlencode($directories_before_current_path);\n\t$directories_before_current_path = str_replace('%2F', '/', $directories_before_current_path);\n\t$current_directory_name = urldecode($current_directory_name);\n\t$current_directory_name = urlencode($current_directory_name);\n\t$current_directory_name = str_replace('%2F', '/', $current_directory_name);\n\tif($sort_order == SORT_DESC) {\n\t\t$sortorder = 'asc';\n\t} else {\n\t\t$sortorder = 'desc';\n\t}\n\tif(empty($current_directory_name)) {\n\t\t$temp_url = \"?by=$sortby&order=$sortorder\";\n\t\t$temp_url_nice = \"$gfe_url/sortby/$sortby/sortorder/$sortorder/\";\n\t} else {\n\t\t$temp_url = \"?dir=$directories_before_current_path$current_directory_name&by=$sortby&order=$sortorder\";\n\t\t$temp_url_nice = \"$gfe_url/browse/$directories_before_current_path$current_directory_name/sortby/$sortby/sortorder/$sortorder/\";\n\t}\n\tif($nice_url) {\n\t\treturn $temp_url_nice;\n\t} else {\n\t\treturn $temp_url;\n\t}\n}",
"protected function renderSortLinks()\n {\n $this->sorterIcons += GridView::getDefaultSorterIcons(false);\n $attributes = empty($this->attributes) ? array_keys($this->sort->attributes) : $this->attributes;\n $links = [];\n $sort = $this->sort;\n foreach ($attributes as $name) {\n $icon = '';\n if (($direction = $sort->getAttributeOrder($name)) !== null) {\n $icon = Html::tag('span', $this->sorterIcons[$direction], ['class' => 'kv-sort-icon']);\n }\n $options = $this->linkOptions;\n if (isset($sort->attributes[$name]['label'])) {\n $label = $sort->attributes[$name]['label'];\n } else {\n $label = Inflector::camel2words($name);\n }\n Html::addCssClass($options, 'kv-sort-link');\n $options['label'] = $label.$icon;\n $links[] = $sort->link($name, $options);\n }\n\n return Html::ul($links, array_merge($this->options, ['encode' => false]));\n }",
"function get_links_list($order = 'name')\n {\n }",
"private function generateLinks()\n\t{\n\t\t// Additional pages are the total minus the current page\n\t\t$iAdditional\t= $this->iToShow - 1;\n\n\t\t// Figure out how many additional pages to show\n\t\t$iToShow\t\t= ($this->iTotal <= $iAdditional) ? ($this->iTotal - 1) : $iAdditional;\n\n\t\t// Get the pre and post lengths\n\t\tif($iToShow % 2 == 0) {\n\t\t\t$iPre\t= $iToShow / 2;\n\t\t\t$iPost\t= $iPre;\n\t\t} else {\n\t\t\t$iPre\t= floor($iToShow / 2);\n\t\t\t$iPost\t= $iPre + 1;\n\t\t}\n\n\t\t// If the current page is less than the pre pages\n\t\tif($this->iPage <= $iPre)\n\t\t{\n\t\t\t$iPre\t= $this->iPage - 1;\n\t\t\t$iPost\t= $iToShow - $iPre;\n\t\t}\n\t\t// Else if the total pages minus the current page is less than the\n\t\t//\tpost pages\n\t\tif($this->iTotal - $this->iPage <= $iPost)\n\t\t{\n\t\t\t$iPost\t= $this->iTotal - $this->iPage;\n\t\t\t$iPre\t= $iToShow - $iPost;\n\t\t}\n\n\t\t// Init the links array\n\t\t$this->aLinks\t= array(\n\t\t\t'previous'\t\t=> false,\n\t\t\t'first'\t\t\t=> false,\n\t\t\t'pre'\t\t\t=> array(),\n\t\t\t'current'\t\t=> '',\n\t\t\t'post'\t\t\t=> array(),\n\t\t\t'last'\t\t\t=> false,\n\t\t\t'next'\t\t\t=> false\n\t\t);\n\n\t\t// If the page isn't 1\n\t\tif($this->iPage > 1)\n\t\t{\n\t\t\t// Add the previous button\n\t\t\t$this->aLinks['previous'] = array(\n\t\t\t\t'text'\t=> $this->iPage - 1,\n\t\t\t\t'url'\t=> (($this->iPage - 1 == 1) ? $this->aOptions['primary_url'] : $this->sURL . ($this->iPage - 1) . '/') . $this->sQuery,\n\t\t\t\t'index' => (($this->iPage - 1) > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the page is greater than the pre length\n\t\tif($this->iPage - 1 > $iPre)\n\t\t{\n\t\t\t// Add the first page\n\t\t\t$this->aLinks['first'] = array(\n\t\t\t\t'text'\t=> 1,\n\t\t\t\t'url'\t=> $this->aOptions['primary_url'] . $this->sQuery,\n\t\t\t\t'index' => (1 > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// Add the previous pages\n\t\tfor($i = $this->iPage - $iPre; $i < $this->iPage; ++$i)\n\t\t{\n\t\t\t$this->aLinks['pre'][]\t= array(\n\t\t\t\t'text'\t=> $i,\n\t\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t\t'index' => ($i > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// Add the current page\n\t\t$this->aLinks['current'] = array(\n\t\t\t'text'\t=> $this->iPage,\n\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t'index' => ($this->iPage > $this->aOptions['index_limit']) ? false : true\n\t\t);\n\n\t\t// Add the next pages\n\t\t$iForCond\t= $this->iPage + $iPost + 1;\n\t\tfor($i = $this->iPage + 1; $i < $iForCond; ++$i)\n\t\t{\n\t\t\t$this->aLinks['post'][] = array(\n\t\t\t\t'text'\t=> $i,\n\t\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t\t'index' => ($i > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the last page isn't visible\n\t\tif($this->iTotal > $this->iPage + $iPost)\n\t\t{\n\t\t\t// And the last page\n\t\t\t$this->aLinks['last']\t= array(\n\t\t\t\t'text'\t=> $this->iTotal,\n\t\t\t\t'url'\t=> $this->sURL . $this->iTotal . '/' . $this->sQuery,\n\t\t\t\t'index' => ($this->iTotal > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the current page isn't the last page\n\t\tif($this->iTotal != $this->iPage)\n\t\t{\n\t\t\t// Show the next page\n\t\t\t$this->aLinks['next']\t= array(\n\t\t\t\t'text'\t=> $this->iPage + 1,\n\t\t\t\t'url'\t=> $this->sURL . ($this->iPage + 1) . '/' . $this->sQuery,\n\t\t\t\t'index' => (($this->iPage + 1) > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\t}",
"public function create_links()\n {\n $totalPages = floor($this->total_records / $this->size);\n $totalPages += ($this->total_records % $this->size != 0) ? 1 : 0;\n if($totalPages < 1 || $totalPages == 1)\n return null;\n $output = null;\n $loopStart = 1;\n $loopEnd = $totalPages;\n if($totalPages > 5){\n if($this->page <= 3){\n $loopStart = 1;\n $loopEnd = 5;\n } else if($this->page >= $totalPages - 2){\n $loopStart = $totalPages - 4;\n $loopEnd = $totalPages;\n } else{\n $loopStart = $this->page - 2;\n $loopEnd = $this->page + 2;\n }\n }\n if($loopStart != 1){\n $output .= sprintf('<a id=\"back\" href=\"' . $this->link . '\">«</a>', '1');\n }\n if($this->page > 1){\n $output .= sprintf('<a id=\"prev\" href=\"' . $this->link . '\">' . __('Previous') . '</a>', $this->page - 1);\n }\n for($i = $loopStart; $i <= $loopEnd; $i++){\n if($i == $this->page){\n $output .= '<a class=\"on\">' . $i . '</a>';\n } else{\n $output .= sprintf('<a href=\"' . $this->link . '\">', $i) . $i . '</a>';\n }\n }\n if($this->page < $totalPages){\n $output .= sprintf('<a id=\"next\" href=\"' . $this->link . '\">' . __('Next') . '</a>', $this->page + 1);\n }\n if($loopEnd != $totalPages){\n $output .= sprintf('<a id=\"forward\" href=\"' . $this->link . '\">»</a>', $totalPages);\n }\n return '<div id=\"pagination\"><ul><li>' . $output . '</li></ul></div>';\n }",
"function sort_link($text, $order=false){\n global $db, $order_by, $order_dir;\n\n if(!$order)\n $order = $text;\n\n $link = '<a href=\"?order=' . $order;\n if($order_by==$order && $order_dir=='ASC')\n $link .= '&inverse=true';\n $link .= '\"';\n if($order_by==$order && $order_dir=='ASC')\n $link .= ' class=\"order_asc\"';\n elseif($order_by==$order && $order_dir=='DESC')\n $link .= ' class=\"order_desc\"';\n $link .= '>' . $text . '</a>';\n\n return $link;\n}",
"protected function generateLinks()\n {\n if ( ! is_null($this->links) ) {\n foreach ( $this->links as $link ) {\n $this->addLine('<url>');\n $this->addLine('<loc>');\n $this->addLine($this->helpers->url(\n $link->link,\n $this->protocol,\n $this->host\n ));\n $this->addLine('</loc>');\n $this->addLine('<lastmod>' . date_format($link->updated_at, 'Y-m-d') . '</lastmod>');\n $this->addLine('</url>');\n }\n }\n }",
"private function get_link_order() {\n $ordertext = '<i class=\"fa fa-sort-desc\"></i> ';\n\n $url = $this->page->url;\n\n if (isset($this->viewoptions['filter'])) {\n $url->param('filter', $this->viewoptions['filter']);\n }\n\n $url->param('order', 'desc');\n\n if (isset($this->viewoptions['order']) && $this->viewoptions['order'] == 'desc') {\n $url->param('order', 'asc');\n }\n\n if (isset($this->viewoptions['order']) && $this->viewoptions['order'] == 'desc') {\n $this->page->url->order = 'asc';\n $ordertext = '<i class=\"fa fa-sort-asc\"></i> ';\n $ordertext .= get_string('orderasc', 'format_timeline');\n\n return html_writer::link($url, $ordertext, ['class' => 'btn btn-outline-primary']);\n }\n\n $ordertext .= get_string('orderdesc', 'format_timeline');\n\n return html_writer::link($url, $ordertext, ['class' => 'btn btn-outline-primary']);\n }",
"function create_links()\n\t{\n\t\t$totalItems = $this->total_records;\n\t\t$perPage = $this->size;\n\t\t$currentPage = $this->page;\n\t\t$link = $this->link;\n\t\t$totalPages = floor($totalItems / $perPage);\n\t\t$totalPages += ($totalItems % $perPage != 0) ? 1 : 0;\n\n\t\tif ($totalPages < 1 || $totalPages == 1){\n\t\t\treturn null;\n\t\t}\n\n\t\t$output = null;\t\t\t\t\n\t\t$loopStart = 1; \n\t\t$loopEnd = $totalPages;\n\n\t\tif ($totalPages > 5)\n\t\t{\n\t\t\tif ($currentPage <= 3)\n\t\t\t{\n\t\t\t\t$loopStart = 1;\n\t\t\t\t$loopEnd = 5;\n\t\t\t}\n\t\t\telse if ($currentPage >= $totalPages - 2)\n\t\t\t{\n\t\t\t\t$loopStart = $totalPages - 4;\n\t\t\t\t$loopEnd = $totalPages;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$loopStart = $currentPage - 2;\n\t\t\t\t$loopEnd = $currentPage + 2;\n\t\t\t}\n\t\t}\n\n\t\tif ($loopStart != 1){\n\t\t\t$output .= sprintf('<li class=\"disabledpage\"> <a href=\"' . $link . '\">«</a> </li>', '1');\n\t\t}\n\t\t\n\t\tif ($currentPage > 1){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._previous_.'</a> </li>', $currentPage - 1);\n\t\t}\n\t\t\n\t\tfor ($i = $loopStart; $i <= $loopEnd; $i++)\n\t\t{\n\t\t\tif ($i == $currentPage){\n\t\t\t\t$output .= '<li class=\"currentpage\">' . $i . '</li> ';\n\t\t\t} else {\n\t\t\t\t$output .= sprintf('<li><a href=\"' . $link . '\">', $i) . $i . '</a> </li> ';\n\t\t\t}\n\t\t}\n\n\t\tif ($currentPage < $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._next_.'</a> </li>', $currentPage + 1);\n\t\t}\n\t\t\n\t\tif ($loopEnd != $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">»</a> </li>', $totalPages);\n\t\t}\n\n\t\treturn '<div class=\"pagination\"><ul>' . $output . '</ul></div>';\n\t}",
"function generate_page_links($user_search, $sort, $cur_page, $num_pages) {\n $page_links = '<p>';\n\n // Generate \"previous page\" link if page is not the first page\n if ($cur_page > 1) {\n // Generate back arrow as an HTML link\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . ($cur_page - 1) . '\"><-</a> ';\n } else {\n // Generate back arrow as a non-HTML link\n $page_links .= '<- ';\n }\n\n // Generate page links for each individual page\n for ($index = 1; $index <= $num_pages; $index++) {\n // Generate clickable link if page is not current page\n if ($index == $cur_page) {\n $page_links .= ' ' . $index;\n } else {\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . $index . '\"> ' . $index . '</a> ';\n }\n }\n\n // Generate clickable link if current page is not the last page\n if ($cur_page < $num_pages) {\n // Generate back arrow as an HTML link\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . ($cur_page + 1) . '\"> -></a> ';\n } else {\n // Generate back arrow as a non-HTML link\n $page_links .= ' ->';\n }\n\n $page_links .= '</p>';\n\n return $page_links;\n }",
"function generate_page_links($user_search, $sort, $cur_page, $num_pages) {\n $page_links = '';\n\n // If this page is not the first page, generate the \"previous\" link\n if ($cur_page > 1) {\n $page_links .= '<a class=\"pagelinks\" href=\"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=' . $sort . '&page=' . ($cur_page - 1) . '\"><-Previous</a> ';\n }\n else {\n $page_links .= '<- ';\n }\n\n // Loop through the pages generating the page number links\n for ($i = 1; $i <= $num_pages; $i++) {\n if ($cur_page == $i) {\n $page_links .= ' ' . $i;\n }\n else {\n $page_links .= ' <a class=\"pagelinks\" href=\"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=' . $sort . '&page=' . $i . '\"> ' . $i . '</a>';\n }\n }\n\n // If this page is not the last page, generate the \"next\" link\n if ($cur_page < $num_pages) {\n $page_links .= ' <a class=\"pagelinks\"href=\"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=' . $sort . '&page=' . ($cur_page + 1) . '\">Next-></a>';\n }\n else {\n $page_links .= ' ->';\n }\n\n return $page_links;\n }",
"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 . '&year=' . $this->newYear . '\"> « </a> ';\n\t$this->nextLink = ' <a href=\"?month=' . $nextMonth . '&year=' . $this->newYear . '\"> » </a> ';\n\n\n\t}",
"function create_links() {\n $total_rows = $this->total_rows;\n if ($total_rows == 0) {\n return '';\n }\n\n // Calculate the total number of pages\n $CI = & get_instance();\n $_quantity = $CI->_quantity;\n $per_page = $this->per_page;\n $num_pages = ceil($total_rows / $per_page);\n\n // Is there only one page? Hm... nothing more to do here then.\n if ($num_pages == 1) {\n return '';\n }\n\n // Determine the current page number.\n $_offset = $CI->_offset;\n $cur_page = $_quantity == -1 ? -1 : floor($CI->_offset / $per_page) + 1;\n\n // And here we go...\n $output = '';\n\n // Render the \"First\" link\n if ($cur_page != 1) {\n $i = 0;\n $output .= $this->first_tag_open . $i . $this->first_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Render the \"previous\" link\n if ($cur_page != 1 && $_quantity != -1) {\n $i = $_offset - $per_page;\n $output .= $this->prev_tag_open . $i . $this->prev_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Write the digit links\n $output .= \"<select tabindex='-1'>\";\n $start = 1;\n $end = $per_page;\n if ($_quantity == -1)\n $output .= '<option selected=\"selected\" > - </option>';\n for ($loop = 1; $loop <= $num_pages; $loop++) {\n if ($end > $total_rows)\n $end = $total_rows;\n $output .= '<option value=\"' . (($loop - 1) * $per_page) . '\" ' . ($loop == $cur_page ? \"selected='selected'\" : \"\") . ' >Trang ' . $loop . '/' . $num_pages . ' ' . $start . \"-\" . $end . '/' . $total_rows . '</option>';\n $start+=$per_page;\n $end+=$per_page;\n }\n $output .= \"</select>\";\n\n // Render the \"next\" link\n if ($cur_page != $num_pages && $_quantity != -1) {\n $i = $_offset + $per_page;\n $output .= $this->next_tag_open . $i . $this->next_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Render the \"Last\" link\n if ($cur_page != $num_pages) {\n $i = ($num_pages - 1) * $per_page;\n $output .= $this->last_tag_open . $i . $this->last_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Add the wrapper HTML if exists\n $output = $this->full_tag_open . $output . str_replace(array(\"{class}\", \"{style}\"), array(($_quantity == -1 ? \"ui-state-hover\" : \"icon\"), ($_quantity == -1 ? \"cursor:default\" : \"\")), $this->full_tag_close);\n\n return $output;\n }",
"function get_linksbyname($cat_name = \"noname\", $before = '', $after = '<br />', $between = \" \", $show_images = \\true, $orderby = 'id', $show_description = \\true, $show_rating = \\false, $limit = -1, $show_updated = 0)\n {\n }",
"public function create_links()\n {\n \t$txt = '<ul>';\n \t$last = end($this->breadcrumb);\n \tforeach($this->breadcrumb AS $breadcrumb)\n \t{\n \t\t$url = '';\n \t\t$class = FALSE;\n \t\tif($breadcrumb['active'] == '1')\n \t\t{\n \t\t\t$class = 'active';\n \t\t}\n \t\t$txt .= '<li><a href=\"'.$breadcrumb['url'].'\" class=\"'.$class.'\" title=\"'.$breadcrumb['txt'].'\">'.$breadcrumb['txt'].'</a></li>';\n \t\t$class = '';\n \t}\n \t\n \t$txt .= '</ul>';\n \treturn $txt;\n }",
"function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = \\true, $orderby = 'name', $show_description = \\true, $show_rating = \\false, $limit = -1, $show_updated = 1, $display = \\true)\n {\n }",
"function product_sorting_link( $views ) {\n\t\tglobal $post_type, $wp_query;\n\t\t\n\t\t $settings = array(\n\t\t\t'featured_enable' => 'true'\n\t\t);\n\t\t\t\n\t\t$settings = woo_get_dynamic_values( $settings );\n\t\t\n\t\tif ( ! current_user_can('edit_others_pages') ) return $views;\n\t\t$class = ( isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) ? 'current' : '';\n\t\t$query_string = remove_query_arg(array( 'orderby', 'order' ));\n\t\t$query_string = add_query_arg( 'orderby', urlencode('menu_order title'), $query_string );\n\t\t$query_string = add_query_arg( 'order', urlencode('ASC'), $query_string );\n\t\t$query_string = add_query_arg( 'featured', urlencode('true'), $query_string );\n\t\t$views['byorder'] = '<a href=\"'. $query_string . '\" class=\"' . $class . '\">' . __( 'Sort Products', 'woocommerce' ) . '</a>';\n\n\t\treturn $views;\n\t}",
"private static function sort()\n\t{\n\t\t//Setup order of importantance\n\t\t$changefreqs = array(\n\t\t\t'hourly' => 5,\n\t\t\t'daily' => 4,\n\t\t\t'weekly' => 3,\n\t\t\t'monthly' => 2,\n\t\t\t'yearly' => 1,\n\t\t\t'never' => 0\n\t\t);\n\n\t\t//Setup invidual arrays to sort by\n\t\tforeach(static::$links as $index => $link)\n\t\t{\n\t\t\t$priority[$index] = $link->priority ? $link->priority : 0;\n\t\t\t$changefreq[$index] = $link->changefreq ? $changefreqs[$link->changefreq] : 0;\n\t\t\t$loc[$index] = $link->loc;\n\t\t}\n\n\t\tarray_multisort($priority, SORT_DESC, $changefreq, SORT_DESC, $loc, SORT_ASC, static::$links);\n\t}",
"function create_links()\n\t{\n\t\t$output = '';\n\t\t\n\t\t/*if($this->block > 1){\n\t\t\t$this->prev = $this->first-1; \n\t\t\t$output .= '<a href=\"'.$this->url.'/page/1\" class=\"pBtn prev2\">처음</a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"class=\"pBtn prev2\">처음</a>'.chr(10);\n }*/\n\n\t\tif($this->page>1){\n\t\t\t$this->go_page=$this->page-1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->go_page.$this->querystring.'\"><img src=\"'.$this->theme.'/images/prev1.gif\" alt=\"Prev\" /></a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"><img src=\"'.$this->theme.'/images/prev1.gif\" alt=\"Prev\" /></a>'.chr(10);\n\t\t}\n\t\t\n\t\t$pgNum = '';\n\t\tfor($this->pagelnk=$this->first+1; $this->pagelnk <= $this->last; $this->pagelnk++)\n\t\t{\n\t\t\tif($this->first+1 < $this->pagelnk) $pgNum .= \"\t\"; \n\t\t\tif($this->pagelnk==$this->page){\n\t\t\t\t$pgNum .='<strong>'.$this->pagelnk.'</strong>'.chr(10);\n\t\t\t}else{\n\t\t\t\t$pgNum .='<a href=\"'.$this->url.'/page/'.$this->pagelnk.$this->querystring.'\">'.$this->pagelnk.'</a>'.chr(10);\n\t\t\t}\n \n if($this->paglnk!=$this->first+1 && $this->paglnk!=$this->last){\n $pgNum .= '';\n }\n\t\t}\n\t\t\n\t\t//$output .= $pgNum;\n $output .= '<span class=\"num\">'.$pgNum.'</span>';\n\n\t\tif($this->total_page>$this->page){\n\t\t\t$this->go_page=$this->page+1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->go_page.$this->querystring.'\"><img src=\"'.$this->theme.'/images/next1.gif\" alt=\"Next\" /></a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"><img src=\"'.$this->theme.'/images/next1.gif\" alt=\"Next\" /></a>'.chr(10);\n\t\t}\n\n\t\t/*if($this->block < $this->total_block){\n\t\t\t$this->next=$this->last+1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->total_page.'\" class=\"pBtn next2\">마지막</a>';\n\t\t}else{\n $output .= '<a href=\"javascript:void(0);\" class=\"pBtn next2\">마지막</a>';\n }*/\n\t\t\n\t\tif($this->total_page <= 1) $output =null;\n\n\t\treturn $output;\n\t}",
"function headlink($label, $this_sort) {\n global $sort, $reverse, $course_code, $themeimg, $langUp, $langDown;\n $base_url = $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code;\n\n if ($sort == $this_sort) {\n $this_reverse = !$reverse;\n $indicator = \" <img src='$themeimg/arrow_\" .\n ($reverse ? 'up' : 'down') . \".png' alt='\" .\n ($reverse ? $langUp : $langDown) . \"'>\";\n } else {\n $this_reverse = $reverse;\n $indicator = '';\n }\n return '<a class=\"text-white\" href=\"' . $base_url .\n '&sort=' . $this_sort . ($this_reverse ? '&rev=1' : '') .\n '\">' . $label . $indicator . '</a>';\n}",
"function header_link($SortKey, $DefaultWay = 'DESC')\n{\n global $Order, $Way;\n if ($SortKey == $Order) {\n if ($Way == 'DESC') {\n $NewWay = 'ASC';\n } else {\n $NewWay = 'DESC';\n }\n } else {\n $NewWay = $DefaultWay;\n }\n\n return \"torrents.php?way=$NewWay&order=$SortKey&\" . Format::get_url(['way','order']);\n}",
"function generateTagsLinks( ){\n global $config;\n \n $oSql = Sql::getInstance( );\n $oQuery = $oSql->getQuery( 'SELECT sUrl, iTag, sLang FROM tags ORDER BY iPosition ASC' );\n while( $aData = $oQuery->fetch( PDO::FETCH_ASSOC ) ){\n $sUrl = $config['tags_url_prefix'].change2Url( $aData['sUrl'] );\n $aLinksIds[$aData['iTag']] = $sUrl.'.html';\n $aLinks[$sUrl] = Array( $aData['iTag'], $aData['sLang'] );\n } // end while\n\n file_put_contents( $config['dir_database'].'cache/tags_links', ( isset( $aLinks ) ? serialize( $aLinks ) : null ) );\n file_put_contents( $config['dir_database'].'cache/tags_links_ids', ( isset( $aLinksIds ) ? serialize( $aLinksIds ) : null ) );\n}",
"public static function links()\n\t{\n\t\t$all_pages = ceil(self::$total / self::$limit);\n\t\t$current_page = ceil(self::$offset / self::$limit);\n\n\t\t$string = '<nav class=\"paginator\"><ul>';\n\n\t\tif($current_page > 1)\n\t\t{\n\t\t\t$string .= '<li>' . self::link(\"Précédente\", ($current_page - 1) * self::$limit) . '</li>';\n\t\t}\n\n\t\t$from_page = max($current_page - 3, 0);\n\t\t$to_page = min($current_page + 3, $all_pages-1);\n\n\t\tfor($i = $from_page; $i < $to_page; $i++)\n\t\t{\n\t\t\t$string .= '<li ' . ($current_page == $i ? 'class=\"current\"' : '') . '>' . self::link($i + 1, $i * self::$limit) . '</li>';\n\t\t}\n\t\t\n\n\t\tif(($current_page + 1) !== $all_pages)\n\t\t{\n\t\t\t$string .=\"<li>...</li>\";\n\t\t\t$string .= '<li>' . self::link(round(self::$total/self::$limit)+1, round(self::$total/self::$limit)*self::$limit ) . '</li>';\n\t\t\t$string .= '<li>' . self::link(\"Suivante\", ($current_page + 1) * self::$limit) . '</li>';\n\t\t}\t\t\n\n\t\t//self::$url=preg_replace(\"/\\&offset=[0-9]*/\",\"\",self::$url);\n\t\t//$string .='<li><a href=\"' . self::$url . '?offset=' . round(self::$total/self::$limit)*self::$limit . '\"> Dernière </a>';\n\t\t$string .= '</ul></nav>';\n\t\t//$string .= self::$total . \" \" .self::$offset . \" \" . self::$url . \" \" . self::$limit;\n\n\t\treturn $string;\n\t}",
"public function getSorting();",
"function links() {\n return array(\n\n );\n }",
"private function get_filters_links() {\n $links = $this->get_fiters_links();\n $links['orderlink'] = $this->get_link_order();\n\n return $links;\n }",
"function show_abook_sort_button($abook_sort_order, $alt_tag,\n $Down, $Up, $uri_extra=array() ) {\n\n global $form_url, $icon_theme_path;\n\n /* Figure out which image we want to use. */\n if ($abook_sort_order != $Up && $abook_sort_order != $Down) {\n $img = 'sort_none.png';\n $text_icon = '◻'; // U+25FB WHITE MEDIUM SQUARE\n $which = $Up;\n } elseif ($abook_sort_order == $Up) {\n $img = 'up_pointer.png';\n $text_icon = '⇧'; // U+21E7 UPWARDS WHITE ARROW\n $which = $Down;\n } else {\n $img = 'down_pointer.png';\n $text_icon = '⇩'; // U+21E9 DOWNWARDS WHITE ARROW\n $which = 8;\n }\n\n $uri_extra['abook_sort_order'] = $which;\n $uri = set_uri_vars($form_url, $uri_extra, FALSE);\n\n /* Now that we have everything figured out, show the actual button. */\n return create_hyperlink($uri,\n getIcon($icon_theme_path, $img, $text_icon, $alt_tag),\n '', '', '', '', '',\n array('style' => 'text-decoration:none',\n 'title' => $alt_tag),\n FALSE);\n}",
"public function getlinks()\n {\n $links = array();\n if (SecurityUtil::checkPermission('Dizkus::', '::', ACCESS_ADMIN))\n {\n $links[] = array(\n 'url' => ModUtil::url('Dizkus', 'admin', 'reordertree'),\n 'text' => $this->__('Edit forum tree'),\n 'title' => $this->__('Create, delete, edit and re-order categories and forums'),\n 'links' => array(\n array(\n 'url' => ModUtil::url('Dizkus', 'admin', 'reordertree'),\n 'text' => $this->__('Edit forum tree'),\n 'title' => $this->__('Create, delete, edit and re-order categories and forums')),\n array(\n 'url' => ModUtil::url('Dizkus', 'admin', 'subforums'),\n 'text' => $this->__('Sub forums')),\n array(\n 'url' => ModUtil::url('Dizkus', 'admin', 'syncforums'),\n 'text' => $this->__('Synchronize forum/topic index'),\n 'title' => $this->__('Synchronize forum and topic indexes to fix any discrepancies that might exist')\n )),\n 'class' => 'z-icon-es-options',\n );\n $links[] = array('url' => ModUtil::url('Dizkus', 'admin', 'ranks', array('ranktype' => 0)),\n 'text' => $this->__('Edit user ranks'),\n 'class' => 'z-icon-es-group',\n 'title' => $this->__('Create, edit and delete user rankings acquired through the number of a user\\'s posts'),\n 'links' => array(\n array('url' => ModUtil::url('Dizkus', 'admin', 'ranks', array('ranktype' => 0)),\n 'text' => $this->__('Edit user ranks'),\n 'title' => $this->__('Create, edit and delete user rankings acquired through the number of a user\\'s posts')),\n array('url' => ModUtil::url('Dizkus', 'admin', 'ranks', array('ranktype' => 1)),\n 'text' => $this->__('Edit honorary ranks'),\n 'title' => $this->__('Create, delete and edit special ranks for particular users')),\n array('url' => ModUtil::url('Dizkus', 'admin', 'assignranks'),\n 'text' => $this->__('Assign honorary rank'),\n 'title' => $this->__('Assign honorary user ranks to users'))\n ));\n $links[] = array('url' => ModUtil::url('Dizkus', 'admin', 'managesubscriptions'),\n 'text' => $this->__('Manage subscriptions'),\n 'title' => $this->__('Remove a user\\'s topic and forum subscriptions'),\n 'class' => 'z-icon-es-mail');\n $links[] = array(\n 'url' => ModUtil::url('Dizkus', 'admin', 'preferences'),\n 'text' => $this->__('Settings'),\n 'title' => $this->__('Edit general forum-wide settings'),\n 'class' => 'z-icon-es-config',\n );\n }\n \n return $links;\n }",
"protected function createPageLinks()\n {\n $pageLinks = array();\n\n if ($this->totalPages > 10) {\n $startRange = $this->page - floor($this->range/2);\n $endRange = $this->page + floor($this->range/2);\n\n //Start range\n if ($startRange <= 0) {\n $startRange = 1;\n $endRange += abs($startRange) + 1;\n }\n\n // End range\n if ($endRange > $this->totalPages) {\n $startRange -= $endRange - $this->totalPages;\n $endRange = $this->totalPages;\n }\n\n // Range\n $range = range($startRange, $endRange);\n\n // Add first page\n $this->pageLinks[] = array(\n 'page' => 1,\n 'uri' => $this->createUri(1)\n );\n\n foreach ($range as $page) {\n // Skip for first and last page\n if ($page == 1 or $page == $this->totalPages) {\n continue;\n }\n\n $this->pageLinks[] = array(\n 'page' => $page,\n 'uri' => $this->createUri($page)\n );\n }\n\n // Add last page\n $this->pageLinks[] = array(\n 'page' => $this->totalPages,\n 'uri' => $this->createUri($this->totalPages)\n );\n } else {\n for ($i = 1; $i <= $this->totalPages; $i++) {\n $this->pageLinks[] = array(\n 'page' => $i,\n 'uri' => $this->createUri($i)\n );\n }\n }\n }",
"public function provideTestCategoryLinks() {\n\t\t$extraPages = [\n\t\t\t'Category:Elephant Category' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:Elephant Category]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Category'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:elephant Category]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Category'\n\t\t];\n\n\t\t// link to category page with display title\n\t\t$extraPages = [\n\t\t\t'Category:Dingo Category' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:Dingo Category]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:dingo Category]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\t}",
"function build_url_title($field, $oldField, $order, $title, $style) { \n \n if ($field == $oldField) {\n $order = ($order=='ASC' || $order=='' ) ? 'DESC' : 'ASC';\n $img = \"<img src='\" . _FAQ_FW_ICONS_16 . '/' . $order . \".png\" . \"' title='' alt=''>\";\n }else{\n $order = '';\n $img = \"\"; \n }\n $url = _FAQ_URL . '/admin/category.php';\n $tpl = \"<th style='%4\\$s'><a href='{$url}?sort=%1\\$s&order=%2\\$s'>%3\\$s%5\\$s</a>\";\n $link = sprintf($tpl, $field, $order, $title, $style, $img); \n return $link;\n }",
"public function generate_links($attr)\n\t{\n\t\t$source = \"http://www.marketingvillas.com/links_rev.php\";\n\t\t$source .= '?exc='.str_replace('uat.','www.',$_SERVER['SERVER_NAME']);\n\t\t\n\t\tif($attr['heading'] != '')\n\t\t\t$source .= '&heading='.$attr['heading'];\n\t\t\n\t\tif($attr['uriheading'] != '')\n\t\t\t$source .= '&url_heading='.$attr['uriheading'];\n\t\telse\n\t\t\t$source .= '&url_heading=h2';\n\t\t\n\t\tif($attr['what'] != '')\n\t\t\t$source .= '&what='.urlencode($attr['what']);\n\t\t\n\t\t$meme = $this->ret(ltrim($attr['sublocation']));\n\t\t$source .= '&location='.$meme['location'];\n\t\t$source .= '&area='.$meme['area'];\n\t\t//echo $source;\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $source);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\treturn $output;\n\t}",
"Function make_link($str_keyword, \r\n $str_prodbrand, \r\n $str_prodcategory, \r\n $resultsearch, \r\n $str_fieldname, \r\n $str_orderby)\r\n{\r\n $str_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?keyword=\".$str_keyword.\"&prodbrand=\".$str_prodbrand.\"&prodcategory=\".$str_prodcategory.\"&sortfield=\".$str_fieldname.\"&orderby=\".$str_orderby.\"\\\" ALT=\\\"Sorteren op: \".$str_fieldname.\"\\\">\";\r\n return $str_link;\r\n}",
"public function links()\n\t{\n\t\tif ($this->last <= 1) return '';\n\n\t\t// Each pagination element is created by an element method. This allows\n\t\t// us to keep this class clean and simple, because pagination code can\n\t\t// become a mess. We would rather keep it simple and beautiful.\n\t\tforeach ($this->elements as $element)\n\t\t{\n\t\t\t$elements[] = $this->$element(Lang::line(\"pagination.{$element}\")->get());\n\t\t}\n\n\t\treturn '<div class=\"pagination\">'.implode(' ', $elements).'</div>'.PHP_EOL;\n\t}",
"public function sort_link ( $orderby, $current_orderby, $current_order ) {\n // If already sorted by the same field then changes asc to desc or desc to asc.\n if ( $orderby == $current_orderby ) {\n $order = $current_order == 'asc' ? 'desc' : 'asc';\n } else {\n $order = 'asc';\n }\n\n // Prepares query arguments with new values.\n $query_string = add_query_arg( 'orderby', $orderby, $_SERVER['QUERY_STRING'] );\n $query_string = add_query_arg( 'order', $order, $query_string );\n $query_string = remove_query_arg( 'paged', $query_string );\n\n return admin_url( 'admin.php' ).'?'.$query_string;\n }",
"protected function addLinks()\n {\n }",
"public function addSortLink($code, $field, $table)\n {\n\n // Certain circumstances just return string right away (no links):\n if ($field == '_CONTROL_' || $field == '_LOCALIZATION_' || $field == '_CLIPBOARD_' || $field == '_REF_' || $this->disableSingleTableView) {\n return $code;\n }\n\n // If \"_PATH_\" (showing record path) is selected, force sorting by pid field (will at least group the records!)\n if ($field == '_PATH_') {\n $field = 'pid';\n }\n\n //\t Create the sort link:\n $sortUrl = $this->listURL('', false,\n 'sortField,sortRev') . '&sortField=' . $field . '&sortRev=' . ($this->sortRev || ($this->sortField != $field) ? 0 : 1);\n $sortArrow = ($this->sortField == $field ? '<img' . IconFactory::skinImg('red' . ($this->sortRev ? 'up' : 'down') . '.gif', 'width=\"7\" height=\"4\"') . ' alt=\"\" />' : '');\n\n // Return linked field:\n return '<a href=\"' . htmlspecialchars($sortUrl) . '\">' . $code .\n $sortArrow .\n '</a>';\n }",
"public abstract function prepare_item_links($id);",
"public function testClickLinksSort()\n { \n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/categories')\n ->click(\"#category-sort-name a\")\n ->assertQueryStringHas('sort', 'name')\n ->assertQueryStringHas('order', 'asc')\n ->click(\"#category-sort-name a\")\n ->assertQueryStringHas('sort', 'name')\n ->assertQueryStringHas('order', 'desc');\n });\n }",
"public function links()\n {\n return $this->paginator->render(new BootstrapThreePresenter($this->paginator));\n }",
"function sortGroups(&$smartyGroups) \n\t{\n\t\t//\t\tassign sort links\n\t\tforeach($this->groups as $i=>$g)\n\t\t{\n\t\t\tif($this->sortByGroup==$g[0] && $this->sortOrder==\"a\")\n\t\t\t{\n\t\t\t\t$smartyGroups[$i][\"groupheaderlink_attrs\"]=\"href=\\\"\".$this->tName.\"_list.php?orderby=d\".$g[0].\"\\\"\";\n\t\t\t\tif($this->is508)\n\t\t\t\t\t$smartyGroups[$i][\"groupheader_img\"] = \"<img src=\\\"images/up.gif\\\" alt=\\\" \\\" border=0>\";\n\t\t\t\telse\n\t\t\t\t\t$smartyGroups[$i][\"groupheader_img\"] = \"<img src=\\\"images/up.gif\\\" border=0>\";\n\t\t\t}\n\t\t\telseif($this->sortByGroup==$g[0] && $this->sortOrder==\"d\")\n\t\t\t{\t\t\t\t\n\t\t\t\tif($this->is508)\n\t\t\t\t\t$smartyGroups[$i][\"groupheader_img\"] = \"<img src=\\\"images/down.gif\\\" alt=\\\" \\\" border=0>\";\n\t\t\t\telse\n\t\t\t\t\t$smartyGroups[$i][\"groupheader_img\"] = \"<img src=\\\"images/down.gif\\\" border=0>\";\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}",
"public function create_link_array()\n\t{\n\t\t$this->prefix = '';\t\t\n\t\treturn parent::create_link_array();\n\t}",
"function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }",
"function printSortOptions ($url) {\n print \"<p align='center'><b>Sort by:</b> \";\n foreach ($this->sort_opts as $s) {\n if ($s != $this->sort_opts[0]) {\n\t// print a separator between terms\n\tprint \" | \";\n }\n if ($s == $this->sort) {\n\tprint \" \" . $this->pretty_sort_opts[$s] . \" \";\n } else {\n\tprint \" <a href='$url?sort=$s'>\" . \n\t $this->pretty_sort_opts[$s] . \"</a> \";\n }\n }\n print \"</p>\";\n }",
"function linkCollection ($argArray) {\n $this->tamino = new taminoConnection($argArray);\n $this->subject = new subjectList($argArray);\n\n $this->sort_opts = array(\"title\", \"date\",\"contrib\");\n $this->pretty_sort_opts['date'] = \"Date Submitted\";\n $this->pretty_sort_opts['title'] = \"Title\";\n $this->pretty_sort_opts['contrib'] = \"Contributor\";\n\n $this->sortfield[\"date\"] = \"dc:date\";\n $this->sortfield[\"title\"] = \"dc:title\";\n $this->sortfield[\"contrib\"] = \"dc:contributor\";\n $this->sort = $argArray['sort'];\n $this->limit_subject = $argArray['limit_subject'];\n\n if ($this->sort == '') { $this->sort = \"title\"; } // default\n\n // Dublin Core namespace\n $this->dcns = \"dc='http://purl.org/dc/elements/1.1/'\";\n // xquery to retrieve all linkRecord identifiers from tamino\n $this->xquery = \"declare namespace $this->dcns\" . \n 'for $b in input()/linkCollection/linkRecord/@id';\n if (isset($this->limit_subject) && ($this->limit_subject != '') \n\t&& ($this->limit_subject != 'all')) {\n $this->xquery .= \" where \\$b/../dc:subject = '$this->limit_subject' \";\n }\n $this->xquery .= ' return $b ';\n $this->xquery .= \" sort by (../\" . $this->sortfield[$this->sort] . \")\"; \n // return \\$b sort by (../\" . $this->sortfield[$this->sort] . \")\"; \n\n // initialize id list from Tamino \n $this->taminoGetIds(); \n // for each id, create and initialize a linkRecord object\n foreach ($this->ids as $i) {\n $linkargs = $argArray;\n $linkargs[\"id\"] = $i;\n $this->link[$i] = new linkRecord($linkargs);\n $this->link[$i]->taminoGetRecord();\n }\n }",
"public function generate_sortbyURL($column) {\n\t\t\t$url = new Url($this->pageurl->getUrl());\n\t\t\t$url->query->set(\"orderby\", \"$column-\".$this->tablesorter->generate_columnsortingrule($column));\n\t\t\treturn $url->getUrl();\n\t\t}",
"abstract public function prepareSort();",
"public function sort();",
"function show_page_links($base_url, $num_items, $per_page, $page)\n{\n //$base_url contains the address of the page and the order it is called with\n //e.g., 'asc' or 'desc' - the page handles this so we have to worry about it.\n\n $total_pages = ceil($num_items/$per_page);\n\n if ($total_pages == 1)\n {\n return '';\n }\n\n //initialize our $page_string variable wich will hold the links\n $page_string = '<p><span class=\"page_numbers\">';\n\n //SHOW UP TO 4 LINKS ON EITHER SIDE OF THE CURRENT PAGE\n\n //get the number of page links are available after the current page\n $num_succeeding_links = $total_pages - $page;\n\n //get the number of preceding links available before the current page\n $num_preceding_links = $page -1;\n\n //calculate our start and end values\n $start = $page - 4;\n if ( $start < 1)\n {\n $start = 1;\n }\n //if we have less than 10 total_page, use the number we have ($total_pages)\n $end = $total_pages;\n //but if end is more than 9 higher than $start, make $end 9 higher than $start\n //we only want to show 10 records per page (e.g., 1..10)\n if ( ($end - $start) > 9 )\n {\n $end= $start + 9;\n }\n\n //if the total number of succeeding links exceeds 4 show 4 and a >> at the end\n //the >> at the end is just the 5th succeeding link\n //do the same for preceding links if they are more than 4\n if ($total_pages > 10 && $page > 1) //don't show first page link except when we're not the first page\n {\n //create a << which points to the first page\n $page_string .= '<a title=\"first page\" href=\"'.$base_url.'&page=1\"><<</a> ';\n //create a < which points to the current page -1 (shifts us left one)\n $val = $page-1;\n $page_string .= '<a title=\"previous page\" href=\"'.$base_url.'&page='.$val.'\"><</a> ';\n }\n for ($i=$start; $i<=$end; $i++)\n {\n if ($i == $page)\n {\n $page_string .= \" <b>[$i]</b> \";\n }\n else\n {\n $page_string .= ' <a title=\"page ' . $i . '\" href=\"'.$base_url.'&page='.$i.'\">'.$i.'</a> ';\n }\n }\n if ($total_pages > 10 && $page < $total_pages) //don't show last page link except when we're not on the last page\n {\n //create a > which points to the current page +1 (shifts us right one)\n $val = $page + 1;\n $page_string .= ' <a title=\"next page\" href=\"'.$base_url.'&page='.$val.'\">></a>';\n\n //create a >> which point to the last page\n $page_string .= ' <a title=\"last page\" href=\"'.$base_url.'&page='.$total_pages.'\">>></a> ';\n }\n\n $page_string .= '</span></p>';\n\n return $page_string;\n\n}",
"function create_links()\n\t{\n\t\t// If our item count or per-page total is zero there is no need to continue.\n\t\tif ($this->total_rows == 0 OR $this->per_page == 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Calculate the total number of pages\n\t\t$num_pages = ceil($this->total_rows / $this->per_page);\n\n\t\t// Is there only one page? Hm... nothing more to do here then.\n\t\tif ($num_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Set the base page index for starting page number\n\t\tif ($this->use_page_numbers)\n\t\t{\n\t\t\t$base_page = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$base_page = 0;\n\t\t}\n\n\t\t// Determine the current page number.\n\t\t$CI =& get_instance();\n\n\t\tif ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)\n\t\t{\n\t\t\tif ($CI->input->get($this->query_string_segment) != $base_page)\n\t\t\t{\n\t\t\t\t$this->cur_page = $CI->input->get($this->query_string_segment);\n\n\t\t\t\t// Prep the current page - no funny business!\n\t\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($CI->uri->segment($this->uri_segment) != $base_page)\n\t\t\t{\n\t\t\t\t$this->cur_page = $CI->uri->segment($this->uri_segment);\n\n\t\t\t\t// Prep the current page - no funny business!\n\t\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set current page to 1 if using page numbers instead of offset\n\t\tif ($this->use_page_numbers AND $this->cur_page == 0)\n\t\t{\n\t\t\t$this->cur_page = $base_page;\n\t\t}\n\n\t\t$this->num_links = (int)$this->num_links;\n\n\t\tif ($this->num_links < 1)\n\t\t{\n\t\t\tshow_error('Your number of links must be a positive number.');\n\t\t}\n\n\t\tif ( ! is_numeric($this->cur_page))\n\t\t{\n\t\t\t$this->cur_page = $base_page;\n\t\t}\n\n\t\t// Is the page number beyond the result range?\n\t\t// If so we show the last page\n\t\tif ($this->use_page_numbers)\n\t\t{\n\t\t\tif ($this->cur_page > $num_pages)\n\t\t\t{\n\t\t\t\t$this->cur_page = $num_pages;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->cur_page > $this->total_rows)\n\t\t\t{\n\t\t\t\t$this->cur_page = ($num_pages - 1) * $this->per_page;\n\t\t\t}\n\t\t}\n\n\t\t$uri_page_number = $this->cur_page;\n\t\t\n\t\tif ( ! $this->use_page_numbers)\n\t\t{\n\t\t\t$this->cur_page = floor(($this->cur_page/$this->per_page) + 1);\n\t\t}\n\n\t\t// Calculate the start and end numbers. These determine\n\t\t// which number to start and end the digit links with\n\t\t$start = (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;\n\t\t$end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;\n\n\t\t// Is pagination being used over GET or POST? If get, add a per_page query\n\t\t// string. If post, add a trailing slash to the base URL if needed\n\t\tif ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)\n\t\t{\n\t\t\t$this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->base_url = rtrim($this->base_url, '/') .'/';\n\t\t}\n\n\t\t// And here we go...\n\t\t$output = '';\n\n\t\t// Render the \"First\" link\n\t\tif ($this->first_link !== FALSE AND $this->cur_page > ($this->num_links + 1))\n\t\t{\n\t\t\t$first_url = ($this->first_url == '') ? $this->base_url : $this->first_url;\n\t\t\t$output .= $this->first_tag_open.'<a '.$this->anchor_class.'href=\"'.$first_url.'\">'.$this->first_link.'</a>'.$this->first_tag_close;\n\t\t}\n\n\t\t// Render the \"previous\" link\n\t\tif ($this->prev_link !== FALSE AND $this->cur_page != 1)\n\t\t{\n\t\t\tif ($this->use_page_numbers)\n\t\t\t{\n\t\t\t\t$i = $uri_page_number - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = $uri_page_number - $this->per_page;\n\t\t\t}\n\n\t\t\tif ($i == 0 && $this->first_url != '')\n\t\t\t{\n\t\t\t\t$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->first_url.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = ($i == 0) ? '' : $this->prefix.$i.$this->suffix;\n\t\t\t\t$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$i.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\n\t\t}\n\n\t\t// Render the pages\n\t\tif ($this->display_pages !== FALSE)\n\t\t{\n\t\t\t// Write the digit links\n\t\t\tfor ($loop = $start -1; $loop <= $end; $loop++)\n\t\t\t{\n\t\t\t\tif ($this->use_page_numbers)\n\t\t\t\t{\n\t\t\t\t\t$i = $loop;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$i = ($loop * $this->per_page) - $this->per_page;\n\t\t\t\t}\n\n\t\t\t\tif ($i >= $base_page)\n\t\t\t\t{\n\t\t\t\t\tif ($this->cur_page == $loop)\n\t\t\t\t\t{\n\t\t\t\t\t\t$output .= $this->cur_tag_open.$loop.$this->cur_tag_close; // Current page\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$n = ($i == $base_page) ? '' : $i;\n\n\t\t\t\t\t\tif ($n == '' && $this->first_url != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->first_url.'\">'.$loop.'</a>'.$this->num_tag_close;\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 = ($n == '') ? '' : $this->prefix.$n.$this->suffix;\n\n\t\t\t\t\t\t\t$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$n.'\">'.$loop.'</a>'.$this->num_tag_close;\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// Render the \"next\" link\n\t\tif ($this->next_link !== FALSE AND $this->cur_page < $num_pages)\n\t\t{\n\t\t\tif ($this->use_page_numbers)\n\t\t\t{\n\t\t\t\t$i = $this->cur_page + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = ($this->cur_page * $this->per_page);\n\t\t\t}\n\n\t\t\t$output .= $this->next_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$this->prefix.$i.$this->suffix.'\">'.$this->next_link.'</a>'.$this->next_tag_close;\n\t\t}\n\n\t\t// Render the \"Last\" link\n\t\tif ($this->last_link !== FALSE AND ($this->cur_page + $this->num_links) < $num_pages)\n\t\t{\n\t\t\tif ($this->use_page_numbers)\n\t\t\t{\n\t\t\t\t$i = $num_pages;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = (($num_pages * $this->per_page) - $this->per_page);\n\t\t\t}\n\t\t\t$output .= $this->last_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$this->prefix.$i.$this->suffix.'\">'.$this->last_link.'</a>'.$this->last_tag_close;\n\t\t}\n\n\t\t// Kill double slashes. Note: Sometimes we can end up with a double slash\n\t\t// in the penultimate link so we'll kill all double slashes.\n\t\t$output = preg_replace(\"#([^:])//+#\", \"\\\\1/\", $output);\n\n\t\t// Add the wrapper HTML if exists\n\t\t$output = $this->full_tag_open.$output.$this->full_tag_close;\n\n\t\treturn $output;\n\t}",
"public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}",
"public function provideTestLinks() {\n\t\t$extraPages = [\n\t\t\t'Elephant Page' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant_Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to redirect to content page without display title\n\t\t$extraPages = [\n\t\t\t'Elephant Page' => 'Content',\n\t\t\t'Redirect To Elephant Page' => '#REDIRECT [[Elephant Page]]'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Redirect_To_Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to user page without display title\n\t\t$extraPages = [\n\t\t\t'User:Elephant Page' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant_Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to content page with display title\n\t\t$extraPages = [\n\t\t\t'Dingo Page' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to redirect to content page with display title\n\t\t$extraPages = [\n\t\t\t'Dingo Page' => '{{DISPLAYTITLE:Zebra}}',\n\t\t\t'Redirect To Dingo Page' => '#REDIRECT [[Dingo Page]]'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Redirect_To_Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to user page with display title\n\t\t$extraPages = [\n\t\t\t'User:Dingo Page' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\t}",
"function build_link($text, $page){\n\t$format = '<a href=\"%2$s\">%1$s</a>';\n\n\tprintf($format, $text, link_to($page, false));\n}",
"public function getLinks()\n {\n $controller = \\Yii::app()->getController();\n if (($pagination = $this->getPagination()) !== false) {\n $totalPages = $pagination->getPageCount();\n $currentPage = $pagination->getCurrentPage();\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $pagination->createPageUrl($controller, 0),\n ),\n 'page' => array(\n 'title' => \\Yii::t('resource', 'Page'),\n 'href' => str_replace('999', '{page}', $pagination->createPageUrl($controller, 998)),\n 'templated' => true,\n ),\n\n );\n if ($currentPage > 0) {\n $links['firstPage'] = array(\n 'title' => \\Yii::t('resource', 'First Page'),\n 'href' => $pagination->createPageUrl($controller, 0),\n );\n }\n if ($currentPage > 0) {\n $links['prevPage'] = array(\n 'title' => \\Yii::t('resource', 'Previous Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage - 1),\n );\n }\n if ($totalPages > $currentPage + 1) {\n $links['nextPage'] = array(\n 'title' => \\Yii::t('resource', 'Next Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage + 1),\n );\n }\n if ($totalPages > 1) {\n $links['lastPage'] = array(\n 'title' => \\Yii::t('resource', 'Last Page'),\n 'href' => $pagination->createPageUrl($controller, $totalPages - 1),\n );\n }\n }\n else {\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $controller->createUrl($controller->getRoute(), $this->getParams()),\n ),\n );\n }\n return $links;\n }",
"public function generateLink($params)\n {\n }",
"function _build_link_list($link_count, $link, $display)\n {\n if ( substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' ||\n substr($link, 0, 7) == 'mailto:' ) {\n $this->_link_list .= \"[$link_count] $link\\n\";\n } else {\n $this->_link_list .= \"[$link_count] \" . $this->url;\n if ( substr($link, 0, 1) != '/' ) {\n $this->_link_list .= '/';\n }\n $this->_link_list .= \"$link\\n\";\n }\n\n return $display . ' [' . $link_count . ']';\n }",
"function makeLinks($fooArray)\n{\n $myReturn = '';\n foreach($fooArray as $url => $text)\n {\n \tif(THIS_PAGE==$url) {\n \t\t$myReturn .= '<li class=\"current\"><a href=\"' . $url . '\">' . $text . '</a></li>';\n \t}\n\t\telse {\n\t\t\t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>';\n\t\t}\n \n } \n return $myReturn; \n}",
"public function getlinks()\n {\n $links = array();\n\n if (Content_Util::contentHasPageCreateAccess()) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'newPage'),\n 'text' => $this->__('Add new page'),\n 'class' => 'z-icon-es-new');\n }\n if (SecurityUtil::checkPermission('Content::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'main'),\n 'text' => $this->__('Page list'),\n 'class' => 'z-icon-es-edit',\n 'links' => array(\n array('url' => ModUtil::url('Content', 'user', 'sitemap'),\n 'text' => $this->__('Sitemap')),\n array('url' => ModUtil::url('Content', 'user', 'extlist'),\n 'text' => $this->__('Extended')),\n array('url' => ModUtil::url('Content', 'user', 'pagelist'),\n 'text' => $this->__('Complete')),\n array('url' => ModUtil::url('Content', 'user', 'categories'),\n 'text' => $this->__('Category list')),\n ));\n }\n\n return $links;\n }",
"function generateLangLinks() {\n\t\tglobal $_SERVER;\n\t\tforeach( $this->mLanguages as $cur_lang ) {\n\t\t\tif( $cur_lang != $this->mLang ) {\n\t\t\t\n\t\t\t\t$url = \"//tools.wmflabs.org\".$_SERVER['REQUEST_URI'];\n\t\t\t\t\n\t\t\t\tif( in_string( 'uselang', $url ) ) $url = preg_replace( '/uselang=(.*?)&?/', '', $url );\n\t\t\t\tif( in_string( '?', $url ) ) {\n\t\t\t\t\t$url = $url . \"&uselang=\".$cur_lang;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$url = $url . \"?uselang=\".$cur_lang;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->mLanglinks.=\"<a href=\\\"\". $url.\"\\\">\".$cur_lang.\"</a> \";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->mLanglinks;\n\t}",
"public function getlinks()\r\n {\r\n $links = array();\r\n\r\n if (SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'main'),\r\n 'text' => $this->__('View comments'),\r\n 'class' => 'z-icon-es-view');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'stats'),\r\n 'text' => $this->__('Comment statistics'),\r\n 'class' => 'z-icon-es-cubes');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings'),\r\n 'class' => 'z-icon-es-config',\r\n 'links' => array(\r\n array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'cleanup'),\r\n 'text' => $this->__('Delete orphaned comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'migrate'),\r\n 'text' => $this->__('Migrate comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'purge'),\r\n 'text' => $this->__('Purge comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'applyrules'),\r\n 'text' => $this->__('Re-apply moderation rules'))\r\n ));\r\n }\r\n return $links;\r\n }",
"function get_linksbyname_withrating($cat_name = \"noname\", $before = '', $after = '<br />', $between = \" \", $show_images = \\true, $orderby = 'id', $show_description = \\true, $limit = -1, $show_updated = 0)\n {\n }",
"protected function prepare_links($taxonomy)\n {\n }",
"public function getLinks()\n {\n $links = array();\n \n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_READ)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaysysinfo'),\n 'text' => $this->__('Server'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaybrowserinfo'),\n 'text' => $this->__('Client'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'backupdb'),\n 'text' => $this->__('Backup'),\n 'class' => 'z-icon-es-export');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'scripts'),\n 'text' => $this->__('Scripts'),\n 'class' => 'z-icon-es-gears');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url('Zfiler', 'admin', 'filer'),\n 'text' => $this->__('Filer'),\n 'class' => 'z-icon-es-folder');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => 'https://github.com/nmpetkov/Ztools/wiki',\n 'text' => $this->__('Wiki'),\n 'class' => 'z-icon-es-help');\n }\n\n return $links;\n }",
"public function create_links($flag = true, $q = null)\n\t{\n\t\t$total = $this->get_total();\n\t\t$pages = $this->get_total_pages();\n\t\t$cur_page = $this->get_cur_page();\n\t\t\n\t\t$page_range = ($this->config['num_links'] - 1) / 2;\n\t\t\n\t\t$page_start = $cur_page - ceil($page_range);\n\t\t$page_end = $cur_page + floor($page_range);\n\t\t\n\t\tif($q)\n\t\t\t$this->q = $q;\n\n\t\tif ($page_start < 1) {\n\t\t\t$page_end += 1 - $page_start;\n\t\t\t$page_start = 1;\n\t\t}\n\t\t\n\t\tif ($page_end > $pages) {\n\t\t\t$page_start = max(1, $page_start - ($page_end - $pages));\n\t\t\t$page_end = $pages;\n\t\t}\n\t\t\n\t\t$links = '';\n\t\t\n\t\t$links .= $this->config['full_tag_open'];\n\t\t\n\t\tif ($this->has_prev()) {\n\t\t\tif ($this->config['first_link']) $links .= $this->make_wrap(1, 'first');\n\t\t\tif ($this->config['prev_link']) $links .= $this->make_wrap($cur_page - 1, 'prev');\n\t\t} else {\n\t\t\tif ($this->config['first_inactive_link']) $links .= $this->make_wrap_wl(1, 'first_inactive');\n\t\t\tif ($this->config['prev_inactive_link']) $links .= $this->make_wrap_wl($cur_page - 1, 'prev_inactive');\n\t\t}\n\t\t\n\t\tif($flag)\n\t\tfor ($i = $page_start; $i <= $page_end; $i++) {\n\t\t\tif ($i != $cur_page) {\n\t\t\t\t$links .= $this->make_wrap($i, 'num', $i);\n\t\t\t} else {\n\t\t\t\t$links .= $this->make_wrap_wl($i, 'cur', $i);\n\t\t\t}\n\n\t\t\t$links .= $i < $page_end ? $this->config['num_separator'] : '';\n\t\t}\n\t\t\n\t\tif ($this->has_next()) {\n\t\t\tif ($this->config['next_link']) $links .= $this->make_wrap($cur_page + 1, 'next');\n\t\t\tif ($this->config['last_link']) $links .= $this->make_wrap($pages, 'last');\n\t\t} else {\n\t\t\tif ($this->config['next_inactive_link']) $links .= $this->make_wrap_wl($cur_page + 1, 'next_inactive');\n\t\t\tif ($this->config['last_inactive_link']) $links .= $this->make_wrap_wl($pages, 'last_inactive');\n\t\t}\n\t\t\n\t\t$links .= $this->config['full_tag_close'];\n\t\t\n\t\treturn $links;\n\t}",
"public function getUrl()\n\t{\n\t\tif ($this->isVisible()) {\n\t\t\t$sort = $this->isSortAsc() ? Sorter::DESC : Sorter::ASC;\n\t\t} else {\n\t\t\t$sort = $this->ascByDefault ? Sorter::ASC : Sorter::DESC;\n\t\t}\n\n\t\treturn $this->dataGrid->getControl()->link('this', ['orderBy' => $this->sortableColumn, 'sort' => $sort]);\n\t}",
"protected function prepare_links($term)\n {\n }",
"protected function prepare_links($term)\n {\n }",
"function getPagesLinks()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$lang =& JFactory::getLanguage();\n\n\t\t// Build the page navigation list\n\t\t$data = $this->_buildDataObject();\n\n\t\t$list = array();\n\n\t\t$itemOverride = false;\n\t\t$listOverride = false;\n\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\n\t\tif (file_exists($chromePath))\n\t\t{\n\t\t\trequire_once ($chromePath);\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\n\t\t\t\t$itemOverride = true;\n\t\t\t}\n\t\t\tif (function_exists('pagination_list_render')) {\n\t\t\t\t$listOverride = true;\n\t\t\t}\n\t\t}\n\n\t\t// Build the select list\n\t\tif ($data->all->base !== null) {\n\t\t\t$list['all']['active'] = true;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\n\t\t} else {\n\t\t\t$list['all']['active'] = false;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\n\t\t}\n\n\t\tif ($data->start->base !== null) {\n\t\t\t$list['start']['active'] = true;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\n\t\t} else {\n\t\t\t$list['start']['active'] = false;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\n\t\t}\n\t\tif ($data->previous->base !== null) {\n\t\t\t$list['previous']['active'] = true;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\n\t\t} else {\n\t\t\t$list['previous']['active'] = false;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\n\t\t}\n\n\t\t$list['pages'] = array(); //make sure it exists\n\t\tforeach ($data->pages as $i => $page)\n\t\t{\n\t\t\tif ($page->base !== null) {\n\t\t\t\t$list['pages'][$i]['active'] = true;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\n\t\t\t} else {\n\t\t\t\t$list['pages'][$i]['active'] = false;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\n\t\t\t}\n\t\t}\n\n\t\tif ($data->next->base !== null) {\n\t\t\t$list['next']['active'] = true;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\n\t\t} else {\n\t\t\t$list['next']['active'] = false;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\n\t\t}\n\t\tif ($data->end->base !== null) {\n\t\t\t$list['end']['active'] = true;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\n\t\t} else {\n\t\t\t$list['end']['active'] = false;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\n\t\t}\n\n\t\tif($this->total > $this->limit){\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\n\t\t}\n\t\telse{\n\t\t\treturn '';\n\t\t}\n\t}",
"private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}",
"function makeListTags(){\n //add prefix for production\n $rootPrefix = \"\";\n $addPrefix = \"\";\n if ($_SERVER['SERVER_NAME'] == \"localhost\"){\n $rootPrefix = \"/portfolio\";\n } else {\n $addPrefix = \"3/public_html/sethjkalkstein.com\";\n }\n\n $listOfLinks = [\"About\" => $rootPrefix.\"/index.php\", \"Projects\" => $rootPrefix.\"/projects/index.php\", \"Resume\" => $rootPrefix.\"/resume.pdf\", \"Contact\" => $rootPrefix.\"/contact.php\"];\n\n foreach($listOfLinks as $lTitle => $lLink){\n $idText = \"\";\n if (getCurrentFile() == $addPrefix.$lLink){\n $idText = 'id=\"currentPage\"';\n }\n echo '<li><a '.$idText.' href=\"'.$lLink.'\">'.$lTitle.'</a></li>';\n }\n}",
"public function links_list() {\n\t\t$str = \"\";\n\n\t\tforeach ($this->def_json[\"links\"] as $link) {\n\t\t\t$str .= Builder::root(\"li\", NULL,\n\t\t\t\tBuilder::child(\"a\", array(\"href\" => $link[\"url\"]), $link[\"title\"])\n\t\t\t)->saveHTML();\n\t\t}\n\n\t\treturn $str;\n\t}",
"function getFieldHeader_sortLink($fN) {\n\t\treturn $this->pi_linkTP_keepPIvars($this->getFieldHeader($fN),array(\"sort\"=>$fN.\":\".($this->internal[\"descFlag\"]?0:1)));\n\t}",
"function sortAbcRelNew($a, $b)\n{\n\tif($a['title'] == $b['title']) \n\t{ \n\t\tif($a['relevance'] == $b['relevance']) \n\t\t{ \n\t\t\tif($a['reviewnumber'] == $b['reviewnumber']) { return 0; }\n\t\t\treturn ($a['reviewnumber'] < $b['reviewnumber']) ? 1 : -1;\n\t\t}\n\t\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n\t}\n\treturn ($a['title'] > $b['title']) ? 1 : -1;\n}",
"function _sf_get_list_sort_url($option) {\n\t\t\n\t\t//// RETURNS THE URL\n\t\t$url = add_query_arg(array('sort' => $option));\n\t\treturn $url;\n\t\t\n\t}",
"public function get_links()\n {\n }",
"function bab_pm_list_column_head($value, $sort = '', $current_event = '', $islink = '', $dir = '')\n{\n $o = '<th class=\"small\"><strong>';\n\n if ($islink) {\n $o.= '<a href=\"index.php';\n $o.= ($sort) ? \"?sort=$sort\":'';\n $o.= ($dir) ? a.\"dir=$dir\":'';\n $o.= ($current_event) ? a.\"event=$current_event\":'';\n $o.= a.'step=lists\">';\n }\n\n $o .= gTxt($value);\n if ($islink) {\n $o .= \"</a>\";\n }\n $o .= '</strong></th>';\n return $o;\n}",
"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 {//selected page - add class reference\r\n $myReturn .= '<a class=\"selected\" href=\"' . $url . '\">' . $text . '</a>' . PHP_EOL;\r\n }else{\r\n $myReturn .= '<a href=\"' . $url . '\">' . $text . '</a>' . PHP_EOL;\r\n } \r\n }\r\n \r\n return $myReturn;\r\n }",
"protected function prepare_links($sidebar)\n {\n }",
"public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }",
"public function link();",
"public function linksProvider()\n {\n return [[[new \\Urbania\\AppleNews\\Format\\LinkedArticle()]]];\n }",
"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 {//selected page - add class reference\r\n\t \t$myReturn .= '<li><a class=\"selected\" 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}",
"public function getPagesLinks()\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t// Yjsg instance\r\n\t\t$yjsg = Yjsg::getInstance(); \r\n\t\t\r\n\t\t// Build the page navigation list.\r\n\t\t$data = $this->_buildDataObject();\r\n\r\n\t\t$list = array();\r\n\t\t$list['prefix'] = $this->prefix;\r\n\r\n\t\t$itemOverride = false;\r\n\t\t$listOverride = false;\r\n\r\n\t\t$chromePath \t= JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php';\r\n\t\t//yjsg start\r\n\t\tif (!file_exists($chromePath)){\r\n\t\t\tif($yjsg->preplugin()){\r\n\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'legacy' . YJDS . 'html' . YJDS . 'pagination.php';\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'includes' . YJDS . 'html' . YJDS . 'pagination.php';\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//yjsg end\r\n\t\tif (file_exists($chromePath))\r\n\t\t{\r\n\t\t\tinclude_once $chromePath;\r\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive'))\r\n\t\t\t{\r\n\t\t\t\t$itemOverride = true;\r\n\t\t\t}\r\n\t\t\tif (function_exists('pagination_list_render'))\r\n\t\t\t{\r\n\t\t\t\t$listOverride = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Build the select list\r\n\t\tif ($data->all->base !== null)\r\n\t\t{\r\n\t\t\t$list['all']['active'] = true;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['all']['active'] = false;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\r\n\t\t}\r\n\r\n\t\tif ($data->start->base !== null)\r\n\t\t{\r\n\t\t\t$list['start']['active'] = true;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['start']['active'] = false;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\r\n\t\t}\r\n\t\tif ($data->previous->base !== null)\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = true;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = false;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\r\n\t\t}\r\n\r\n\t\t$list['pages'] = array(); //make sure it exists\r\n\t\tforeach ($data->pages as $i => $page)\r\n\t\t{\r\n\t\t\tif ($page->base !== null)\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = true;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = false;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($data->next->base !== null)\r\n\t\t{\r\n\t\t\t$list['next']['active'] = true;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['next']['active'] = false;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\r\n\t\t}\r\n\r\n\t\tif ($data->end->base !== null)\r\n\t\t{\r\n\t\t\t$list['end']['active'] = true;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['end']['active'] = false;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\r\n\t\t}\r\n\r\n\t\tif ($this->total > $this->limit)\r\n\t\t{\r\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}",
"function link_a($dir,$cont){\r\n return \"<a href=\\\"$dir\\\">$cont</a>\";\r\n }",
"function getSort(){ return 301; }",
"protected function prepare_links( $object ) {\n\t\t$links = array(\n\t\t\t'order' => array(\n\t\t\t\t'href' => rest_url( sprintf( '/%s/orders/%d', $this->namespace, $object['order_id'] ) ),\n\t\t\t),\n\t\t);\n\n\t\treturn $links;\n\t}",
"public function makeLinks() {\r\n $this->url = new Url(sprintf(\"/f-p%d.htm#%d\", $this->id, $this->id));\r\n $this->url->single = sprintf(\"/forums?mode=post.single&id=%d\", $this->id);\r\n $this->url->report = sprintf(\"/f-report-%d.htm\", $this->id);\r\n $this->url->reply = sprintf(\"/f-po-quote-%d.htm\", $this->id);\r\n $this->url->delete = sprintf(\"/f-po-delete-%d.htm\", $this->id);\r\n $this->url->edit = sprintf(\"/f-po-editpost-%d.htm\", $this->id);\r\n $this->url->replypm = sprintf(\"/messages/new/from/%d/\", $this->id);\r\n $this->url->iplookup = sprintf(\"/moderators?mode=ip.lookup&ip=%s\", $this->ip);\r\n $this->url->herring = sprintf(\"/f-herring-p-%d.htm\", $this->id);\r\n \r\n if ($this->thread->forum->id == 71) {\r\n $this->url->developers = sprintf(\"/%s/d/%s/%s\", \"developers\", $this->thread->url_slug, $this->url_slug);\r\n }\r\n \r\n return $this;\r\n }",
"function sortRelAbcNew($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) \n\t{ \n\t\tif($a['title'] == $b['title']) \n\t\t{ \n\t\t\tif($a['reviewnumber'] == $b['reviewnumber']) { return 0; }\n\t\t\treturn ($a['reviewnumber'] < $b['reviewnumber']) ? 1 : -1;\n\t\t}\n\t\treturn ($a['title'] > $b['title']) ? 1 : -1;\n\t}\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}",
"public function getColumnSortingUrl($column);",
"public function page_links()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$pagination = '';\n\t\t\n\t\t// Let's get the starting page number, this is determined using num_links\n\t\t$start = (($this->current_page - $this->num_links) > 0) ? $this->current_page - ($this->num_links - 1) : 1;\n\n\t\t// Let's get the ending page number\n\t\t$end = (($this->current_page + $this->num_links) < $this->total_pages) ? $this->current_page + $this->num_links : $this->total_pages;\n\n\t\tfor ($i = $start; $i <= $end; $i++)\n\t\t{\n\t\t\t$text = $i;\n\t\t\t$url = '#';\n\t\t\t$state = $this->template['state']['current_page'];\n\n\t\t\tif ($this->current_page != $i)\n\t\t\t{\n\t\t\t\t// detect if anchor attribute is presented in the template \n\t\t\t\tif (stripos('<a ', $this->template['page_start']) < 0)\n\t\t\t\t{\n\t\t\t\t\t$text = '<a href=\":url\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$url = $this->build_url($i);\n\t\t\t\t$state = '';\n\t\t\t}\n\n\t\t\t$pagination .= Str::tr($this->template['page_start'].$text.$this->template['page_end'], array(\n\t\t\t\t'state' => $state,\n\t\t\t\t'url' => $url,\n\t\t\t));\n\t\t}\n\n\t\treturn $pagination;\n\t}",
"function getFieldHeader_sortLink($fN)\t{\r\n\t\treturn $this->pi_linkTP_keepPIvars($this->getFieldHeader($fN),array('sort'=>$fN.':'.($this->internal['descFlag']?0:1)));\r\n\t}",
"public function sort_list()\r\n {\r\n return view( $this->_skin .'.web.help_sort');\r\n }",
"private function getSportLinksAsList() {\n\t\t$Links = '';\n\n\t\tif ($this->ShowAllSportsLink) {\n\t\t\t$Links .= '<li'.(-1==$this->sportid ? ' class=\"active\"' : '').'>'.$this->getInnerLink(__('All'), -1, $this->year, $this->dat).'</li>';\n\t\t}\n\n\t\t$Sports = SportFactory::NamesAsArray();\n\t\tforeach ($Sports as $id => $name) {\n\t\t\t$Links .= '<li'.($id == $this->sportid ? ' class=\"active\"' : '').'>'.$this->getInnerLink($name, $id, $this->year, $this->dat).'</li>';\n\t\t}\n\n\t\treturn $Links;\n\t}",
"function reverseLinks() {\n return array(\n 'tag_history:tag_id'=>'id',\n\n );\n }",
"public function sortStrategy();",
"function page_links($url, $nitems, $items_per_page, $start){\n // How many pages to potentially show before and after this one:\n $preshow = 3;\n $postshow = 3;\n\n $x = \"\";\n \n if ($nitems <= $items_per_page) return \"\";\n $npages = ceil($nitems / $items_per_page);\n $curpage = ceil($start / $items_per_page);\n\n // If this is not the first page, display \"previous\"\n //\n if ($curpage > 0){\n $x .= page_link(\n $url, $curpage-1, $items_per_page,\n tra(\"Previous\").\" · \"\n );\n }\n\n if ($curpage - $preshow > 0) {\n $x .= page_link($url, 0, $items_per_page, \"1\");\n if ($curpage - $preshow > 1) {\n $x .= \" . . . \";\n } else {\n $x .= \" · \";\n }\n }\n // Display a list of pages surrounding this one\n //\n for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){\n $page_str = (string)($i+1);\n if ($i < 0) continue;\n if ($i >= $npages) break;\n\n if ($i == $curpage) {\n $x .= \"<b>$page_str</b>\";\n } else {\n $x .= page_link($url, $i, $items_per_page, $page_str);\n }\n if ($i == $npages-1) break;\n if ($i == $curpage+$postshow) break;\n $x .= \" · \";\n }\n\n if ($curpage + $postshow < $npages-1) {\n $x .= \" . . . \";\n $x .= page_link($url, $npages-1, $items_per_page, $npages);\n }\n // If there is a next page\n //\n if ($curpage < $npages-1){\n $x .= page_link(\n $url, $curpage+1, $items_per_page,\n \" · \".tra(\"Next\")\n );\n }\n $x .= \"\\n\";\n return $x;\n}",
"function doLink($a1,$a2,$linktype)\n\t{\n\t\t$a1 = wikiArticleNameEncode(trim($a1));\n\t\t$a2 = wikiArticleNameEncode(trim($a2));\n\t\n\t\t//create the initial lists that hold the individual sides\n\t\t\n\t\t\n\t\t$lists[0] = array(cleanArticleKey($a1)=>array('level'=>0,'done'=>false,'names'=>array($a1=>1)));\n\t\t$lists[1] = array(cleanArticleKey($a2)=>array('level'=>0,'done'=>false,'names'=>array($a2=>1)));\n\t\n\t\t$continue = true;\n\t\t$loopcount = 0;\n\t\tdo\n\t\t{\n\t\t\t//pick the bigger of the two article lists\n\t\t\tif(count($lists[0]) <= count($lists[1]))\n\t\t\t{\n\t\t\t\t$smallerside \t= 0;\n\t\t\t\t$largerside \t= 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$smallerside = 1;\n\t\t\t\t$largerside = 0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//get links on the smaller of the two sides\n\t\t\t\n\t\t\t\n\t\t\t$curlinkdirection = null;\n\t\t\t//calculate link direction that we are interested in\n\t\t\tif($smallerside==0)\n\t\t\t{\n\t\t\t\tif($linktype == 1\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t//Left to Right, currently on the Left.\n\t\t\t\t\t//Outbound links\n\t\t\t\t\t$curlinkdirection = 'out';\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($smallerside==1)\n\t\t\t{\n\t\t\t\tif($linktype == 1)\n\t\t\t\t{\n\t\t\t\t\t//Left to Right, currently on the Right.\n\t\t\t\t\t//Inbound links\n\t\t\t\t\t$curlinkdirection = 'in';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//go get the links!\n\t\t\t//echo \"curlinkdirection: $curlinkdirection<br/>\";\n\t\t\t\n\t\t\tif(hasUncheckedLinks($lists[$smallerside]))\n\t\t\t{\n\t\t\t\t$return = fetchLinks($lists,$smallerside,$largerside,$curlinkdirection,$linktype);\n\t\t\t\t$lists = $return['lists'];\n\t\t\t\t$finalbt = $return['finalbt'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$continue = false;\n\t\t\t}\n\t\t\t\n\n\t\t\t$loopcount++;\n\t\t\t\n\t\t}while($continue == true && count($intersect_results) == 0 && $finalbt == null);\n\t\n\t\t//scenarios for checking links. should be checked AFTER seeing if there was a positive link path established\n\t\tif(!hasUncheckedLinks($lists[0]))\n\t\t{\n\t\t\t//echo \"$a1 was a dead end. :-(<br/>\";\n\t\t\treturn(array('error'=>\"$a1 {$GLOBALS['wikiurls'][$GLOBALS['currentlang']]['text']['deadend']}. :-(\"));\n\t\t}\n\t\telseif(!hasUncheckedLinks($lists[1]))\n\t\t{\n\t\t\t//echo \"$a2 was a dead end. :-(<br/>\";\n\t\t\treturn(array('error'=>\"$a2 {$GLOBALS['wikiurls'][$GLOBALS['currentlang']]['text']['deadend']}. :-(\"));\n\t\t}\n\t\telseif($finalbt != null)\n\t\t{\n\t\t\treturn(array('result'=>$finalbt));\t\t\t\n\t\t}\n\t\t\n\t\treturn($finalbt_values);\n\t\t\n\n\t}",
"function makeLinks($nav1)\r\n{\r\n $myReturn = '';\r\n foreach($nav1 as $url => $text){\r\n \r\n if($url == THIS_PAGE){\r\n $myReturn .= \"<li><a class=\\\"selected\\\" href=\\\"$url\\\">$text</a></li>\";\r\n }else{\r\n $myReturn .= \"<li><a href=\\\"$url\\\">$text</a></li>\";\r\n }\r\n }\r\n \r\n return $myReturn;\r\n\r\n \r\n}"
] | [
"0.7302465",
"0.7016542",
"0.6994662",
"0.6820956",
"0.67789036",
"0.6756788",
"0.6687556",
"0.6682599",
"0.6678033",
"0.66494364",
"0.66352123",
"0.6600864",
"0.6532268",
"0.64101744",
"0.63309103",
"0.6320381",
"0.6226152",
"0.62194616",
"0.621642",
"0.6171456",
"0.61586213",
"0.6157577",
"0.6143437",
"0.61143506",
"0.6113084",
"0.6046399",
"0.603896",
"0.6037227",
"0.6017289",
"0.59746164",
"0.59743786",
"0.59687245",
"0.595104",
"0.59468716",
"0.59213454",
"0.5914749",
"0.5896056",
"0.5884602",
"0.5877738",
"0.5858389",
"0.58505523",
"0.5844405",
"0.58381397",
"0.5799799",
"0.57913584",
"0.57842785",
"0.57716036",
"0.57676935",
"0.5766812",
"0.57615113",
"0.575115",
"0.57509124",
"0.5744079",
"0.5737193",
"0.5735781",
"0.5732341",
"0.5730741",
"0.57204366",
"0.5702739",
"0.56904465",
"0.56875736",
"0.5670122",
"0.56623006",
"0.56590885",
"0.5654857",
"0.5652847",
"0.56507814",
"0.56217587",
"0.5612295",
"0.5612295",
"0.56004345",
"0.5591427",
"0.55902576",
"0.5588193",
"0.5585985",
"0.55815953",
"0.5573236",
"0.55730265",
"0.55694264",
"0.5565624",
"0.5564941",
"0.5558088",
"0.55577695",
"0.55557716",
"0.55501246",
"0.55498797",
"0.55473524",
"0.5535719",
"0.5535602",
"0.55319226",
"0.5530515",
"0.55236644",
"0.55188286",
"0.55179137",
"0.5517326",
"0.551302",
"0.55124956",
"0.5509691",
"0.55054516",
"0.5502505",
"0.54930264"
] | 0.0 | -1 |
Adds user to the database | public function addUser($name, $pass, $rePass, $role, $gravatar)
{
// Check if username exists
if ($this->app->access->exists($name)) {
echo "<div class='container'><p>Användaren existerar redan! Välj ett annat användarnamn.</p>";
header("Refresh:2; create_user");
return false;
}
// Check passwords match
if ($pass != $rePass) {
echo "<div class='container'><p>Lösenord matchar inte!</p>";
header("Refresh:2; create_user");
return false;
}
if ($name != "" and $role != "" and $pass != "") {
// Make a hash of the password
$cryptPass = password_hash($pass, PASSWORD_DEFAULT);
$this->db->execute("INSERT into users (name, role, gravatar, pass)
VALUES ('$name', '$role', '$gravatar', '$cryptPass')");
echo "<div class='container'><p>Användaren lades till!</p>";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }",
"public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSERT INTO users (user_email,\n user_password,\n user_first_name,\n user_last_name) \n VALUES (:email,\n :pass,\n :firstName,\n :lastName)');\n\n $result->bindParam(':email', $this->user_email); \n $result->bindParam(':pass', $this->user_password); \n $result->bindParam(':firstName', $this->user_first_name);\n $result->bindParam(':lastName', $this->user_last_name);\n \n $result->execute();\n $db->disconnect();\n }",
"public function addUser(){}",
"public function addUserToDatabase($user) {\n $name = $user->getName();\n $password = $user->getHashedPassword();\n $sql = \"INSERT INTO users (name, password) VALUES (:name, :password)\";\n $insertToDb = $this->connection->prepare($sql);\n $insertToDb->bindParam(':name', $name);\n $insertToDb->bindParam(':password', $password);\n $insertToDb->execute();\n $this->registerStatus = true;\n }",
"public function addUser(){\n\t}",
"function addUser ($user) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"INSERT INTO user (_user_FirstName, _user_Email, _user_Password) VALUES (?, ?, ?)\";\n $query = $conn->prepare($sql);\n $query->execute(array($user->_user_FirstName, $user->_user_Email, $user->_user_Password));\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\n }",
"private function addUser()\n {\n $this->online->addUser($this->user, $this->place, $this->loginTime);\n }",
"public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}",
"public function addUser($data)\n{\n\t$this->insert($data);\n}",
"function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}",
"public function addUser(){\n\n\t\ttry {\n\n\t\t\t$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n\t\t\t$password = $_POST['password'];\n\n\t\t\t$password = hash('sha256', $password);\n\n\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT * FROM users WHERE username=\"'.$username.'\"');\n\n\t\t\tif ($username && $password) {\n\n\t\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif($row == 0){\n\t\t\t\t\t$statement = $db->query(\"INSERT INTO users (username,password) VALUES ('$username', '$password')\" );\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"Username already taken, pick something else! <br><a href='/userlist'> Go back to user list\");\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}",
"function addUser($user)\n {\n $connection = Doctrine_Manager::connection();\n $query = \"INSERT INTO constant_contact (username, access_token, created_at) VALUES ('\".$user['username'].\"', '\".$user['access_token'].\"', '\".date('Y-m-d H:i:s').\"')\";\n $statement = $connection->execute($query);\n }",
"public static function create($user){\n\t\tApp::get('database')->add('users',$user);\n\t}",
"public function add($user){\n\n $this->builder->insert($user);\n\n }",
"public function add() {\n $user = $this->Users->newEntity();\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved.'));\n \n return $this->redirect(['action' => 'login']);\n } else {\n $this->Flash->error(__('The user could not be saved. Please, try again.'));\n }\n }\n \n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n }",
"public function add()\n {\n $storedPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $data = [];\n $data['username'] = $_POST[\"username\"];\n $data['password'] = $storedPassword;\n $data['email'] = $_POST['email'];\n $data['profile_picture'] = $_FILES['profile']['tmp_name'];\n $data['mime'] = $_FILES['profile']['type'];\n $data['phone_num'] = $_POST['phone-number'];\n\n if ($this->model('User')->addNewUser($data) > 0) {\n $this->redirect(BASE_URL . \"/home/index/{$data['username']}\");\n }\n }",
"public static function addUser()\n {\n if(empty($_POST))\n {\n require_once(__DIR__.'/../views/form.php');\n exit;\n }\n\n // add user to database\n $user = UserModel::addUser();\n\n if (!$user)\n {\n session_start();\n $_SESSION['message'] = 'Error occurred while saving user. Please try again later.';\n header('Location: /form');\n exit;\n }\n\n // update text file\n if (!self::updateTextFile($_SERVER['DOCUMENT_ROOT'] . $user['about'], $user['euro2016']))\n {\n header('Location: /form');\n exit;\n }\n\n session_start();\n $_SESSION['message'] = 'Successfully saved user';\n\n require_once(__DIR__.'/../views/form.php');\n }",
"public function insert() {\n\t\t$this->insert_user();\n\t}",
"private function addNewUserToDatabase($user) {\n $connect = $this->dc->connect();\n $username = $user->getUsername();\n $password = $user->getHashedPassword();\n $sql = \"INSERT INTO users (username, password) VALUES (:username, :password)\";\n $statement = $connect->prepare($sql);\n $statement->bindParam(':username', $username);\n $statement->bindParam(':password', $password);\n\n if ($statement->execute()) {\n return true;\n } else {\n throw new Exception ('Something went wrong');\n }\n }",
"public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}",
"public function add_user() {\n try {\n //Retrieve user details.\n if (filter_has_var(INPUT_POST, 'username') && filter_has_var(INPUT_POST, 'password') && filter_has_var(INPUT_POST, 'firstname') && filter_has_var(INPUT_POST, 'lastname')) {\n $firstname = trim(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING));\n $lastname = trim(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING));\n $username = trim(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING));\n $password = trim(filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING));\n }\n\n if ($firstname == \"\" || $lastname == \"\" || $username == \"\" || $password == \"\") {\n throw new DataMissingException(\"Please fill in all fields.\");\n }\n //Hash password.\n $hashed_password = password_hash($password, PASSWORD_DEFAULT);\n\n //Add user details to database.\n $sql = \"INSERT INTO \" . $this->tblUser . \" VALUES (NULL, 2, '$firstname', '$lastname', '$username', '$hashed_password')\";\n\n\n //Execute the insert query.\n $query = $this->dbConnection->query($sql);\n\n //If the query failed, return false. \n if (!$query) {\n throw new DatabaseException(\"There was an error adding the user.\");\n }\n //Return true if successful.\n return true;\n } catch (DataMissingException $e) {\n return $e->getMessage();\n } catch (DatabaseException $e) {\n return $e->getMessage();\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }",
"public function addUser($user_data) {\n\n Yii::$app->db->createCommand()->insert('users', [\n 'username' => $user_data['username'],\n 'password' => $user_data['password'],\n 'authKey' => $user_data['authKey'],\n 'accessToken' => $user_data['accessToken'],\n ])->execute();\n }",
"public function actionAdd() {\n\t\treturn $this->txSave ( \"app\\models\\User\" );\n\t}",
"public function addUser()\n {\n $categoryList = $this->itemModel->getCategories();\n\n //Check that register button exists and was clicked\n if (isset($_POST[\"user_submit\"])) { \n\n //Insert new row in Account and setting the User's name in database using values inputted in the HTML form\n $username = $_POST['username']; \n\n $newly_registered_account_id = $this->accountModel->registerAccount($username,$_POST[\"password\"],$_POST[\"sfsu_id\"]);\n\n $this->userModel->setUser($newly_registered_account_id,$_POST[\"firstname\"], \n $_POST[\"lastname\"],$_POST[\"country\"],$_POST[\"state\"],\n $_POST[\"address\"],$_POST[\"city\"],$_POST[\"zipcode\"],$_POST[\"phoneNumber\"]);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"accounts.php registerUser bad.\")';\n echo '</script>';\n }\n\n header('location: ' . URL . 'home/index');\n }",
"public function add(){\n\t\t// if we got a post information, do add else do nothing\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t// if the information is successfully saved\n\t\t\t\t$this->Session->setFlash(__('Congratulation, the user has been created.'));\n\t\t\t\t$this->redirect(array('controller'=>'jobs', 'action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Sorry, the user can not be created.'));\n\t\t\t}\n\t\t}\n\t}",
"function addToDatabase() {\n\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$add_query = \"INSERT INTO user_table \n\t\t(user_name, \n\t\t user_password,\t\n\t\t isAdmin,\t\n\t\t user_first_name,\n\t\t user_last_name) \n\t\tVALUES \n\t\t('$this->username', \n\t\t '$this->password',\t\n\t\t '$this->isAdmin',\t\n\t\t '$this->firstName',\t\n\t\t '$this->lastName');\";\n\n\t\t$result = mysqli_query($db, $add_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}",
"function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}",
"public function action_add()\r\n\t{\r\n\t\tif ( Request::current()->method() == Request::POST )\r\n\t\t{\r\n\t\t\treturn $this->_add();\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->title = __('Add user');\r\n\t\t$this->breadcrumbs\r\n\t\t\t->add($this->template->title);\r\n\r\n\t\t// check if user have already enter something\r\n\t\t$data = Flash::get( 'post_data', array() );\r\n\r\n\t\t$user = new User( $data );\r\n\r\n\t\t$this->template->content = View::factory( 'user/edit', array(\r\n\t\t\t'action' => 'add',\r\n\t\t\t'user' => $user,\r\n\t\t\t'permissions' => Model_Permission::get_all()\r\n\t\t) );\r\n\t}",
"public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}",
"public function addUserAction()\n {\n $form = new Application_Form_UserEdit();\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost())\n {\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n $username = $form->getValue('username');\n $password = $form->getValue('password');\n $role = $form->getValue('role');\n $first_name = $form->getValue('first_name');\n $last_name = $form->getValue('last_name');\n $email = $form->getValue('email'); \n $user = new Application_Model_DbTable_Users();\n $user->addUser($username, $password, $first_name,\n $last_name, $email, $role);\n $this->_helper->redirector('index', 'index');\n }\n else\n {\n $form->populate($formData);\n }\n }\n }",
"function addUserToDatabase($user, $post)\n {\n $connect = new Config();\n $text = new TextFunctions();\n $validateF = new ValidateFunctions();\n $newDate = '0000-00-00 00:00:00';\n $curDate = date(\"Y-m-d H:i:s\");\n $email = $validateF->sanitize($post['user_email']);\n $pass = $text->password_encryption($validateF->sanitize($post['user_password']));\n $curDate = date(\"Y-m-d H:i:s\");\n $sql = 'INSERT INTO user_db(user_info, user_email, user_password ,join_date,last_login) VALUES (:info,:email,:password,:cur_date,:last_login)';\n $query = $connect->connectPDO()->prepare($sql);\n $query->bindParam(':info', $user, \\PDO::PARAM_STR, 200);\n $query->bindParam(':email', $email, \\PDO::PARAM_STR);\n $query->bindParam(':password', $pass, \\PDO::PARAM_STR);\n $query->bindParam(':cur_date', $curDate, \\PDO::PARAM_STR);\n $query->bindParam(':last_login', $newDate, \\PDO::PARAM_STR);\n $query->execute();\n }",
"public function createUser();",
"public function createUser();",
"public function createUser();",
"public function createUser();",
"public function addNewUser($user)\n {\n $conn = $this->MySQL->getConn();\n $sql = \"INSERT INTO `\".DB::TBL_USERS.\"` \".\n \"SET `fio`=?,`login`=?,`loginHash`=?,`phone`=?,\n `email`=?, `emailHash`=?,`pass`=?,`photo`=?\";\n $st = $conn->prepare($sql);\n $st->execute([\n $user->fio, $user->login, $user->loginHash, $user->phone,\n $user->email, $user->emailHash, $user->pass, $user->photo\n ]);\n $user->id = $conn->lastInsertId();\n }",
"function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }",
"public function addAction() {\n $form = new Admin_Form_CreateAdminUser();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n $adminMapper = new Application_Model_Table_AdminUsers();\n $userFound = $adminMapper->fetchByUsername($values['username']);\n if(!$userFound){\n $values['is_active'] = 1;\n $values['is_admin'] = 1;\n $adminUser = $adminMapper->createRow($values);\n $adminUser->hashPassword($values['new_password']);\n $adminUser->save();\n $this->_helper->FlashMessenger->addMessage('The user has been created' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-users', true);\n } else {\n $this->view->messages['error'] = \"This username already exists\";\n }\n }\n }\n $this->view->form = $form;\n }",
"public function registerUser()\n {\n $sql = \"INSERT INTO user (username, password, email, firstname, lastname, address, date_of_birth, id_role)\n VALUES (\\\"\" . $this->getUsername().\"\\\", \\\"\" . $this->getPassword().\"\\\", \\\"\" . $this->getEmail().\"\\\",\\\"\" . $this->getFirstname().\"\\\", \\\"\" . $this->getLastname().\"\\\", \\\"\" . $this->getAddress().\"\\\", \\\"\" . $this->getDateOfBirth().\"\\\", \\\"\" . $this->getIdRole().\"\\\")\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n print \"erfolg\";\n\n }\n }",
"function add_user(MJKMH_User $user): void {\r\n\t\t$this->users[$user->id()] = $user;\r\n\t}",
"static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }",
"public function addUser($data) {\n\t\tglobal $db;\n\t\t$db->type = 'site';\n\t\t\n\t\tforeach ($data as $key=>$val) {\n\t\t\tif ($key != 'password') {\n\t\t\t\t$values[$key] = $db->sqlify($val);\n\t\t\t} else {\n\t\t\t\t$values[$key] = $db->sqlify(crypt($val)); \n\t\t\t}\n\t\t}\n\t\t$values['date_created'] = $db->sqlify(date('Y-m-d H:i:s')); \n\t\t\n\t\t$check = false;\n\t\tif (!empty($data['email'])) {\n\t\t\t$check = $this->getUserByEmail($data['email']);\n\t\t} elseif (!empty($data['twitter_id'])) {\n\t\t\t$check = $this->getUserByTwitterId($data['twitter_id']);\n\t\t}\n\t\t\n\t\tif (!$check) {\n\t\t\t$db->insert('users', $values);\n\t\t\t$db->doCommit();\n\t\t}\n\t}",
"function register_user($new) {\n \n $this->db->insert('users', $new);\n }",
"protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }",
"public function writeNewUser () {\n if (! $this->Writeable()){\n throw new Exception('User object is not writeable, cannot write to DB');\n }\n\n if ($this->exists($this->loginId)) {\n throw new Exception('User already exists, cannot be created');\n }\n\n $i = new folksoDBinteract($this->dbc);\n if ($i->db_error()) {\n throw new Exception('DB connect error: ' . $i->error_info());\n }\n\n $i->sp_query(\n sprintf(\"call create_user(\"\n .\"'%s', '%s', '%s', '%s', '', %d, '%s', '%s', '%s')\",\n $i->dbescape($this->nick),\n $i->dbescape($this->firstName),\n $i->dbescape($this->lastName),\n $i->dbescape($this->email),\n $i->dbescape($this->loginId),\n $i->dbescape($this->institution),\n $i->dbescape($this->pays),\n $i->dbescape($this->fonction)));\n\n if ($i->result_status == 'DBERR') {\n throw new Exception('DB query error on create FB user: ' . $i->error_info());\n }\n }",
"public function addUser($name, UserConfig $user);",
"public function addUser(UserInterface $user);",
"public function addUser(UserInterface $user);",
"public function add_user($data){\n return $this->db->insert('user', $data);\n }",
"function addUser($dbConn, $username, $password, $email){\n // Add user to USERS table.\n $dbQuery = \"INSERT INTO USERS(Username, First_name, Last_name, Email, Status, About, Date_joined, Password)\"\n .\"VALUES('\".$username.\"', '', '', '\".$email.\"', 'active', '', CURDATE(), '\".$password.\"')\";\n \n mysqli_query($dbConn, $dbQuery);\n\n $userId = mysqli_insert_id($dbConn); // ID of the latest created user.\n \n // Add user role for newly created user into USER_ROLES table.\n $dbQuery = \"INSERT INTO USER_ROLES(User_Id, Role_Id)\"\n .\"VALUES(\".$userId.\", 1)\";\n \n mysqli_query($dbConn, $dbQuery);\n \n // Add default avatar for newly created user into IMAGES table.\n $avatar = file('images/default_avatar.png'); // Default avatar for new users.\n $dbQuery = \"INSERT INTO IMAGES(Description, Image, User_Id) \"\n .\"VALUES('test', '\".$avatar.\"', \".$userId.\")\";\n \n mysqli_query($dbConn, $dbQuery);\n }",
"public function insertUser($data) {\n\t\t\n\t\t\n\t}",
"public function saveNewUser() {\n\t\t$db = $this->getDatabaseConnection();\n\n\t\t// Prepare the SQL\n\t\t$sql =\"INSERT INTO users (email, password, first_name, last_name, username)\n\t\t\t\tVALUES (:email, :password, :first_name, :last_name, :username)\";\n\n\t\t$statement = $db->prepare($sql);\n\n\t\t// Bind the form data to the SQL query\n\t\t$statement->bindValue(':email', $_POST['email']);\n\t\t$statement->bindValue(':password', $_POST['password']);\n\t\t$statement->bindValue(':first_name', $_POST['first_name']);\n\t\t$statement->bindValue(':last_name', $_POST['last_name']);\n\t\t$statement->bindValue(':username', $_POST['username']);\n\n\t\t// Run the query\n\t\t$result = $statement->execute();\n\n\t\t//Confirm tht it worked\n\t\tif( $result == true) {\n\t\t\t// Yay!\n\n\t\t\t$_SESSION['user_id'] = $db->lastInsertID();\n\t\t\t$_SESSION['privilege'] = 'user';\n\t\t\t$_SESSION['first_name'] = $_POST['first_name'];\n\t\t\t$_SESSION['last_name'] = $_POST['last_name'];\n\t\t\t$_SESSION['username'] = $_POST['username'];\n\t\t\t$_SESSION['email'] = $_POST['email'];\n\n\t\t\theader('Location: index.php?page=account');\n\t\t} else {\n\t\t\t// Uh oh...\n\t\t}\n\n\t\t//If it did, log the user in and redirect to their \n\t\t// new account page\n\t}",
"function add_user($name, $email, $plain_password) {\n $conn = connect();\n\n // unique id for new user\n $id = uniqid();\n\n // get current time \n $reg = date(\"F Y h:i:s A\");\n \n // hash password\n $pass = password_hash($plain_password.$email, PASSWORD_DEFAULT);\n\n try {\n // proceed transaction\n $conn->beginTransaction();\n \n $conn->exec(\"INSERT INTO user (id_user, name, email, password, registration) VALUES ('$id', '$name', '$email', '$pass', '$reg')\");\n\n // commit the transaction\n $conn->commit();\n\n echo \"New records created successfully\";\n \n } catch(PDOException $e) {\n // roll back the transaction if something failed\n $conn->rollback();\n echo \"Error: \" . $e->getMessage();\n }\n\n $conn = null;\n}",
"public function addUserToDb($token) {\n\t\t\trequire_once('classes/canvasWrapper.php');\n\t\t\t$canvas = new CanvasWrapper();\n\t\t\t$user = $canvas->formatUserData();\n\t\t\t$sql = \"INSERT INTO users (osuId,token,name) VALUES (\" . $user->user_id . \",'\" . $token . \"','\" . $user->name . \"')\";\n\t\t\t$result = $this->db->query($sql);\n\t\t}",
"public function addUser(UserAddForm $form);",
"public function add($params) {\n try {\n \t$baseType = (int)1;\n // Create a new user and attempt to save it to the database:\n $user = new User();\n $res = $user->setUsername(strtolower($_POST['username']))\n ->setPassword($_POST['password'])\n ->setEmail($_POST['email'])\n ->setType($baseType)\n ->setFirstname($_POST['firstname'])\n ->setLastname($_POST['lastname'])\n ->setPrivacy($_POST['privacy2'])\n ->commit($this->getDBConn());\n\n error_log(\"Added user \". $user->getUserId());\n\n require \"config.php\";\n if ($res) {\n // display success message and redirect to new user's page\n $this->addFlashMessage('Created new user: ' . $user->getUsername(), self::FLASH_LEVEL_SUCCESS);\n $this->redirect(\"/users/login\");\n } else {\n $this->addFlashMessage('Unknown error adding user. Please try again: ', self::FLASH_LEVEL_SERVER_ERR);\n }\n } catch (\\PDOException $dbErr) {\n $this->addFlashMessage('Database error on adding user:<br>'.$dbErr->getMessage(), self::FLASH_LEVEL_SERVER_ERR);\n }\n\n // Some sort of error on adding user; return to form\n $this->redirect(\"/users/new\");\n }",
"private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }",
"public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}",
"public function saveUser()\n {\n $connection = \\Yii::$app->db;\n $command = $connection->createCommand()\n ->update('users', [\n 'name' => $this->name,\n 'email' => $this->email,\n ], 'id='.$this->id);\n $command->execute();\n }",
"public function addUser($request)\n {\n $this->name = $request[\"name\"];\n $this->email = trim($request[\"email\"]);\n $this->enabled = $request[\"enabled\"];\n $this->access_level = $request[\"access_level\"];\n\n if (array_key_exists(\"password\", $request)) {\n $this->password = $this->passwordHash($request[\"password\"]);\n } else {\n $this->password = $this->passwordHash($this->generatePassword(12));\n }\n\n if (Auth::user()->isModerator()) {\n $this->group_id = Auth::user()->group_id;\n }\n\n if (Auth::user()->isAdministrator()) {\n $this->group_id = $request[\"group_id\"];\n }\n\n $this->save();\n }",
"protected function add()\n {\n $userModel = config('admin.database.users_model');\n $roleModel = config('admin.database.roles_model');\n\n $username = null;\n\n while ($username === null) {\n $answer_username = $this->ask('Please enter a username to login');\n\n if ($userModel::where('username', '=', $answer_username)->exists()) {\n\n $this->line(\"<error>Username is exists: </error> $answer_username\");\n } else {\n $username = $answer_username;\n }\n }\n\n $password = null;\n\n while ($password === null) {\n $answer_password = $this->secret('Please enter a password to login');\n\n $answer_password_again = $this->secret('Please enter the password again');\n\n if ($answer_password != $answer_password_again) {\n $this->line(\"<error>Password do not match</error>\");\n } else {\n $password = bcrypt($answer_password);\n }\n }\n\n $name = $this->ask('Please enter a name to display');\n\n if ($this->confirm('Add role for user?', true)) {\n $roles = $roleModel::all();\n\n if (!$this->confirm('All role?', true)) {\n /** @var array $selected */\n $selectedOption = $roles->pluck('name')->toArray();\n\n $selected = $this->choice('Please choose a role for the user, or you can use \",\" to make multiple', $selectedOption, null, null, true);\n\n $selected = Arr::wrap($selected);\n\n $roles = $roles->filter(function ($role) use ($selected) {\n return in_array($role->name, $selected);\n });\n }\n }\n\n $user = new $userModel(compact('username', 'password', 'name'));\n\n $user->save();\n\n if (isset($roles)) {\n $user->roles()->attach($roles);\n }\n\n $this->line('<info>User created successfully: </info> ' . $name);\n }",
"function add_user ($username,$password)\n {\n\t\t$insert_query = \"insert into users set username='$username',password = '$password'\";\n return $this->query ($insert_query);\n }",
"function addnewuser() {\n \t\t\t$this->set('GetUserQ', $this->Users->GetUsers(0));\n \t\t\t$this->set('GetLevelsQ', $this->AccessLevels->index());\n \t\t}",
"public function createUserAction() {\n $this->authService->createUser();\n die();\n }",
"public function useradd(){\n $arr=Input::get();\n unset($arr['_token']);\n unset($arr['checkbox']);\n\n $arr['password'] = password_hash($arr['pwd'],PASSWORD_DEFAULT);\n unset($arr['pwd']);\n $students = DB::select('select * from DS_User where account = '.$arr[\"account\"]);\n if (!empty($students)){\n alert('该用户已存在!','/account',2);\n }\n $ls = DB::table('User')->insert($arr);\n if($ls === false){\n alert('注册失败!','/account',2);\n }\n alert('注册成功!','/login',1);\n }",
"public function addUser($name, $email, $password)\n {\n\n //\n }",
"public function add_new_user($user_name,$name,$password)\n\t{\n\t\t///TODO\n\t\t//DB::insert('insert into users (name,password,device_id) values (?, ?,?)', [$user_name, $password,1]);\n\t\t$query=DB::insert('insert into users (name,password,device_id) values (?, ?,?)', [$user_name, $password,1]);\n\n\n\t}",
"public function newUser() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['users'].' (username, salt, hash) VALUES (:username, :salt, :hash)';\n\n $salt = $this->getNewSalt();\n\n $res = $this->db->execute(array(\n ':username' => $this->getData('username'),\n ':salt' => $salt,\n ':hash' => md5($salt . $this->getData('password'))\n ));\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'xxT5r'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'dU4r5'\n );\n }\n\n $this->renderOutput();\n }",
"function addUser ($username, $prenom, $nom, $hashMdp, $role, $statut)\n{\n $db = connect();\n\n $query = $db->prepare('INSERT INTO users (username, prenom, nom, password, role, statut) VALUES (?, ?, ?, ?, ?, ?)');\n $query->execute(array($username, $prenom, $nom, $hashMdp, $role, $statut));\n $query->closeCursor();\n}",
"public function addUserAction()\n\t{\n\t\t$user = new User();\n\n\t\t$form = $this->createForm(new UserType, $user);\n\t\t\n\t\t$request = $this->get('request');\n\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t$form->bind($request);\n\n // Checking the validity of the submission\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t$em->persist($user);\n\t\t\t\t$em->flush();\n\n // Redirection to the homepage of Bundle\n\t\t\t\treturn $this->redirect($this->generateUrl('valentin_films_manager_index'));\n\t\t\t}\n\t\t}\n\t\treturn $this->render('ValentinFilmsManagerBundle:Manager:addUser.html.twig', array(\n\t\t\t'form' => $form->createView(),\n\t\t\t));\n\t\t\n\t}",
"public function addAction() {\r\n\t\tif ($this->request->isPost ()) {\r\n\t\t\t$user = new Users ();\r\n\t\t\t$user->firstname = $this->request->get ( \"first_name\" );\r\n\t\t\t$user->lastname = $this->request->get ( \"last_name\" );\r\n\t\t\t$user->bithday = $this->request->get ( \"date\" );\r\n\t\t\t$user->save ();\r\n\t\t}\r\n\t}",
"public function addUser($username, $password_hash, $first_name, $last_name, $email){\n $color = \"#\".dechex(rand(128,255)) . dechex(rand(128,255)) . dechex(rand(128,255)); //generates a random color for them\n $query = \"INSERT INTO user VALUES (DEFAULT, '$first_name', '$last_name', '$username', '$password_hash', '$email', 0, DEFAULT, DEFAULT, DEFAULT, '$color')\";\n $db = Db::instance();\n $db->execute($query);\n }",
"function addUser()\n{\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n $sql = \"SELECT username FROM users WHERE username=:username\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $db = null;\n $username_test = $stmt->fetchObject();\n\n if($username_test) {\n echo \"error_username\";\n return;\n }\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n\n\n $sql = \"INSERT INTO users (username, password) VALUES (:username, :password)\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->bindParam(\"password\", $password);\n\n $stmt->execute();\n $db = null;\n\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}",
"public function addOnDB() {\n\t\t\t$db = mysqli_connect($GLOBALS['host'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\n\t\t\t\n\t\t\t$format = \"INSERT INTO `user` \n\t\t\t\t(`username`, `password`, `fullname`, `birthplace`, `birthdate`, `email`, `avatar`) VALUES \n\t\t\t\t('%s', '%s', '%s', '%s', '%s', '%s', '%s');\";\n\t\t\t$stmt = sprintf($format, $this->username, $this->password, $this->fullname, $this->birthplace, $this->birthdate,\n\t\t\t\t$this->email, $this->avatar_path);\n\t\t\t$result = mysqli_query($db, $stmt);\n\t\t\t\n\t\t\t$db->close();\n\t\t}",
"public function admin_add() {\n if ($this->isAuthorized()) {\n if ($this->request->is('post')) {\n $this->User->create();\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash(__('The user has been created'));\n return $this->redirect(array(\n 'action' => 'index',\n ));\n } else {\n $this->Session->setFlash(__('The user could not be created. Please, try again.'));\n }\n }\n } else {\n $this->Session->setFlash(__('You do not have permission to do this'));\n return $this->redirect(array(\n 'action' => 'admin_dashboard',\n ));\n }\n }",
"public static function create(Users $user)\n {\n $FirstName=$user->FirstName;\n $MiddleName=$user->MiddleName;\n $FamilyName=$user->FamilyName;\n $DateOfBirth=$user->DateOfBirth;\n $Mobile=$user->Mobile;\n $Home=$user->Home;\n $Address=$user->Address;\n $Email=$user->Email;\n $Password=$user->Password;\n $national_ID=$user->national_ID;\n $usertype_ID=$user->usertype_ID;\n date_default_timezone_set(\"Africa/Cairo\");\n $today = date(\"Y-m-d H:i:s\");\n DB::add(\"user\",\"FirstName,MiddleName,FamilyName,DateOfBirth,Mobile,Home,NationalID,Address_ID,Email,Password,usertype_ID,CreatedDateTime,LastUpdatedDateTime,IsDeleted\",\"'$FirstName','$MiddleName','$FamilyName','$DateOfBirth','$Mobile','$Home','$national_ID','$Address','$Email','$Password','$usertype_ID','$today','$today',0\");\n \n\n // $conn->close();\n header(\"Location:AddUser.php\");\n\n }",
"function add_newuser($user) {\n global $DB;\n $DB->insert_record('report_user_statistics', $user, false);\n}",
"function addNewUser($username, $password, $userid){\r\n $time = time();\r\n /* If admin sign up, give admin user level */\r\n if(strcasecmp($username, ADMIN_NAME) == 0){\r\n $ulevel = ADMIN_LEVEL;\r\n }else{\r\n $ulevel = USER_LEVEL;\r\n }\r\n $query = \"INSERT INTO \".TBL_USERS.\" SET username = :username, password = :password, userid = :userid, userlevel = '$ulevel', timestamp = '$time', hash = '0', advanced_mode = '0', shipping_address = NULL\";\r\n $stmt = $this->connection->prepare($query);\r\n return $stmt->execute(array(':username' => $username, ':password' => $password, ':userid' => $userid));\r\n }",
"public function addUser(\\Models\\User $user) {\n $this->users[] = $user;\n }",
"function addUser( $user, $password, $email = '', $realname = '' ) {\n return false;\n }",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }",
"public function store()\n {\n // Save post data in $user var\n $user = $_POST;\n \n // Create a password, set created_by ID and set the date of creation\n $user['password'] = password_hash('Gorilla1!', PASSWORD_DEFAULT);\n $user['created_by'] = Helper::getUserIdFromSession();\n $user['created'] = date('Y-m-d H:i:s');\n\n // Save the record to the database\n UserModel::load()->store($user);\n }",
"public function addUser($input) {\n $sql = \"INSERT INTO \n usertable (username, password, type, email, firstname, lastname) \n VALUES (:username, :password, :type, :email, :firstname, :lastname)\";\n\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':username', $input->getUserName(), PDO::PARAM_STR);\n $stmt->bindParam(':password', $input->getUserPassword(), PDO::PARAM_STR);\n $stmt->bindParam(':type', $input->getUserType(), PDO::PARAM_STR);\n $stmt->bindParam(':email', $input->getUserEmail(), PDO::PARAM_STR);\n $stmt->bindParam(':firstname', $input->getFirstname(), PDO::PARAM_STR);\n $stmt->bindParam(':lastname', $input->getLastname(), PDO::PARAM_STR);\n\n $stmt->execute();\n// echo 'User Registered.';\n\n $username = $input->getUserName();\n $sql = \"SELECT * FROM usertable WHERE username = '$username'\";\n foreach (parent::$this->db_connect->query($sql) as $row) {\n $custController = new profile_controller();\n $custController->newProfile($row['userid']);\n }\n }",
"public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}",
"public function add() {\n\t\t$data = array (\n\t\t\t'be_users_uid' => $this['beUserUid'],\n\t\t\t'group_uid' => $this['groupUid'],\n\t\t\t'rights' => $this['rights']\n\t\t);\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery(\n\t\t\t'tx_passwordmgr_group_be_users_mm',\n\t\t\t$data\n\t\t);\n\t\tif ( $res ) {\n\t\t\ttx_passwordmgr_helper::addLogEntry(1, 'addMembership', 'Added user '.$data['be_users_uid'].' to group '.$data['group_uid']);\n\t\t} else {\n\t\t\tthrow new Exception ('Error adding user. user / group: ' . $data['be_users_uid'] . ' ' . $data['group_uid']);\n\t\t}\n\t}",
"function insertNewUser() {\n\ttry {\n\t\t// Open DB connection\n\t\t$DBH = openDBConnection();\n\t\t$DBH->beginTransaction();\n\t\t\n\t\t// Prepare salt and hash\n\t\t$salt = makeSalt();\n\t\t$hash = computeHash($_REQUEST['newPW2'], $salt);\t\t\n\t\t\n\t\t// Insert user info into DB\n\t\t$stmt = $DBH->prepare(\"insert into Users values (?, ?, ?)\");\n\t\t$stmt->bindValue(1, $_REQUEST['newLogin']);\n\t\t$stmt->bindValue(2, $hash);\n\t\t$stmt->bindValue(3, $_REQUEST['newName']);\n\t\t$stmt->execute();\n\t\t\n\t\t// Make this new user a client\n\t\t$stmt2 = $DBH->prepare(\"insert into Roles values (?, ?)\");\n\t\t$stmt2->bindValue(1, \"client\");\n\t\t$stmt2->bindValue(2, $_REQUEST['newLogin']);\n\t\t$stmt2->execute();\n\t\t\n\t\t$DBH->commit();\n\t\treturn true;\n\t}\n\tcatch (PDOException $e) {\n\t\t$DBH->rollBack();\n\t\treturn false;\n\t}\n}",
"public function addUser(User $user) {\n\t\t\n\t\t$userData = array(\n\t\t\t'email' \t=> $user->getEmail(),\n\t\t\t'login' \t=> $user->getUsername(),\n\t\t\t'password' \t=> $user->getPassword(),\n\t\t\t'salt'\t\t=> $user->getSalt(),\n\t\t\t'role'\t\t=> $user->getRole()\n\t\t);\n\t\tif ($user->getId()) {\n\t\t\t// If the user already exists: upadate it\n\t\t\t$this->getDb()->update('users', $userData, array('id_user' => $user->getId()));\n\t\t}else {\n\t\t\t// Add new user\n\t\t\t$this->getDb()->insert('users', $userData);\n\t\t\t\n\t\t\t// Get id of newly created user and set it \n\t\t\t$id = $this->getDb()->lastInsertId();\n\t\t\t$user->setId($id);\n\t\t}\n\t}",
"function registerUser()\n\t{\n\t\t$userName = $_POST['userName'];\n\n\t\t# Verify that the user doesn't exist in the database\n\t\t$result = verifyUser($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$email = $_POST['email'];\n\t\t\t$userFirstName = $_POST['userFirstName'];\n\t\t\t$userLastName = $_POST['userLastName'];\n\n\t\t\t$userPassword = encryptPassword();\n\n\t\t\t# Make the insertion of the new user to the Database\n\t\t\t$result = registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword);\n\n\t\t\t# Verify that the insertion was successful\n\t\t\tif ($result['status'] == 'COMPLETE')\n\t\t\t{\n\t\t\t\t# Starting the session\n\t\t\t\tstartSession($userFirstName, $userLastName, $userName);\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Something went wrong while inserting the new user\n\t\t\t\tdie(json_encode($result));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Username already exists\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}",
"function master_add_user($conn, $user_id, $user_firstname, $user_lastname, $user_email, $user_password, $user_picture){\n //encrypt email\n $user_email = encrypt_user_email($user_email);\n //encrypt password\n $user_password = encrypt_user_password($user_password);\n\n if($this->user->add_user($conn, $user_id, $user_firstname, $user_lastname, $user_email, $user_password,\n upload_user_profile_picture()) == true){\n // alert user not added\n //add user details to session\n }\n else{\n //alert user not added\n //allow user to try or ask if pass is forgotten\n }\n }",
"public function add_user($id) {\n UserToPres::create_entry($id,$this->id);\n }",
"function addNewUser($username, $password){\r\n global $dbh;\r\n connectToDB();\r\n\r\n try {\r\n $statement = $dbh->prepare(\"insert into users(username, password) \".\r\n \"values(:username, :password)\");\r\n\r\n $success = $statement->execute(array(\r\n \":username\" => $username, \r\n \":password\" => $password\r\n ));\r\n \r\n if(!$success){\r\n die(\"There was an error saving to the database: \". \r\n $dbh->errorInfo()[2]);\r\n }\r\n } catch(PDOException $e){\r\n die(\"There was an error saving to the database: \". $e->getMessage());\r\n }\r\n}",
"public function createUser()\n {\n }",
"function addSignupUser($user) {\n\t$ret = false;\n\t// print_r($user);\n\t$sql = \"INSERT INTO customer (name, phone, position, company, shop) values (\".\n\t\t\"'$user->name', '$user->phone', '$user->position', '$user->company', '$user->shop')\";\n\tmysql_query($sql);\n\tif(mysql_insert_id()) {\n\t\t$ret = true;\n\t}\n\treturn $ret;\n}",
"public static function addUser($username,$email,$password){\n $connect = new Connect();\n\n $sql = \"INSERT INTO users (username, email, password) VALUES (?, ?, ?)\";\n $statement = $connect->connection->prepare($sql);\n\n if ($statement){\n $statement->bind_param(\"sss\", $username, $email, $password);\n\n $statement->execute();\n }else{\n echo \"Cannot add user\";\n }\n\n $connect->connection->close();\n }",
"function addUser(){\n $data= array(\n 'title'=>$this->security->xss_clean($this->input->post('title')),\n 'fname'=>$this->security->xss_clean($this->input->post('fname')),\n 'lname'=>$this->security->xss_clean($this->input->post('lname')),\n 'gender'=>$this->security->xss_clean($this->input->post('gender')),\n 'email'=>$this->security->xss_clean($this->input->post('email')),\n 'password'=>$this->security->xss_clean(md5($this->input->post('password'))),\n 'mobile'=>$this->security->xss_clean($this->input->post('mobile')),\n 'work_phone'=>$this->security->xss_clean($this->input->post('work_phone')),\n 'address'=>$this->security->xss_clean($this->input->post('address')),\n 'type'=>$this->security->xss_clean($this->input->post('type'))\n );\n \n $this->db->insert('user', $data);\n }",
"public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required',\n ]);\n $user = User::create($attributes);\n\n // Auth facades\n auth()->login($user);\n }",
"function _add_user()\n {\n if (!$this->has_arg('PROJECTID'))\n $this->_error('No project id specified');\n if (!$this->has_arg('PERSONID'))\n $this->_error('No user specified');\n\n $proj = $this->db->pq(\"SELECT p.projectid FROM project p WHERE p.personid LIKE :1 AND p.projectid=:2\", array($this->user->personId, $this->arg('PROJECTID')));\n\n if (!sizeof($proj))\n $this->_error('No such project');\n $proj = $proj[0];\n\n $person = $this->db->pq(\"SELECT CONCAT(CONCAT(givenname, ' '), familyname) as fullname FROM person WHERE personid=:1\", array($this->arg('PERSONID')));\n if (!sizeof($person))\n $this->_error('No such person');\n $person = $person[0];\n\n $this->db->pq(\"INSERT INTO project_has_person (projectid, personid) VALUES (:1, :2)\", array($this->arg('PROJECTID'), $this->arg('PERSONID')));\n\n $this->_output(array('FULLNAME' => $person['FULLNAME']));\n }",
"public function insertToDb($user) {\n $sql = \"INSERT INTO users (username, password, email, cash) VALUES (?, ?, ?, ?)\";\n $stmt = $this->dbh->prepare($sql);\n $succ = $stmt->execute(array($user->getUsername(), md5($user->getPassword()), $user->getEmail(), $user->getCash()));\n }",
"private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}",
"function addNewUser($conn, $username, $hashed_pass, $useremail){\n $insert_new_user = \"INSERT INTO user_details (user_name, user_password, user_email)\n VALUES ('$username', '$hashed_pass', '$useremail')\";\n if (mysqli_query($conn, $insert_new_user)) {\n //Redirecting to the login page\n header('Location: ../index.php');\n } else {\n echo \"Error: \" . $insert_new_user . \"<br>\" . mysqli_error($conn);\n }\n }",
"public function add($data){\n \t\t\t$result = $this->db->insert(\"user\",$data);\n \t\t}"
] | [
"0.8193425",
"0.8150622",
"0.8081003",
"0.7878645",
"0.7746147",
"0.76312715",
"0.76024634",
"0.7544496",
"0.7487822",
"0.7426746",
"0.74245465",
"0.73878723",
"0.7358185",
"0.73415476",
"0.7335648",
"0.73262537",
"0.7305713",
"0.7299163",
"0.7296498",
"0.72883123",
"0.7276377",
"0.7260968",
"0.72390866",
"0.72298944",
"0.721319",
"0.72040516",
"0.71027344",
"0.70848763",
"0.707854",
"0.70764375",
"0.7073213",
"0.7070908",
"0.7070908",
"0.7070908",
"0.7070908",
"0.70683223",
"0.70653605",
"0.70638126",
"0.7060157",
"0.7048036",
"0.7039663",
"0.7000502",
"0.69907767",
"0.69805527",
"0.6962083",
"0.6921527",
"0.6907011",
"0.6907011",
"0.6901863",
"0.69016874",
"0.6899636",
"0.6892623",
"0.68919426",
"0.68868834",
"0.68824",
"0.6878738",
"0.6872389",
"0.6872257",
"0.6868631",
"0.6866754",
"0.68639946",
"0.68578607",
"0.6854584",
"0.6852647",
"0.6831889",
"0.68269295",
"0.6812275",
"0.6811791",
"0.6804998",
"0.6796741",
"0.6793692",
"0.67909414",
"0.6768166",
"0.67667496",
"0.6765757",
"0.6762638",
"0.6757041",
"0.6756668",
"0.67509365",
"0.67508054",
"0.6748066",
"0.6731942",
"0.6728242",
"0.67149675",
"0.67119294",
"0.67117876",
"0.6707613",
"0.67072266",
"0.6706386",
"0.670262",
"0.6702357",
"0.6701606",
"0.6692693",
"0.66829574",
"0.66764647",
"0.66685885",
"0.66653883",
"0.6664089",
"0.6661969",
"0.6658335",
"0.66558594"
] | 0.0 | -1 |
Get categories and their popularity | public function getCategoryCloud()
{
$sql = "
SELECT
PC.id as cat_id,
PC.category,
P2C.id,
P2C.cat_id,
COUNT(P2C.id) AS amount
FROM Prod2Cat AS P2C
LEFT OUTER JOIN ProdCategory AS PC
ON PC.id = P2C.cat_id
GROUP BY P2C.cat_id
-- ORDER BY amount DESC
";
$this->db->execute($sql);
$res = $this->db->fetchAll();
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getPopularCategories()\n {\n $query = Queries::$getPopularCategories;\n\n try {\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n $this->successResponse($result);\n } catch (\\PDOException$e) {\n $this->errorResponse($e->getMessage());\n }\n }",
"public function getCategoryList()\n {\n global $user;\n\n $returned=array();\n\n if($this->options['galleryRoot'])\n {\n $startLevel=1;\n }\n else\n {\n $startLevel=0;\n }\n\n $sql=\"SELECT DISTINCT pct.id, pct.name, pct.global_rank AS `rank`, pct.status\n FROM \".CATEGORIES_TABLE.\" pct \";\n\n switch($this->options['filter'])\n {\n case self::FILTER_PUBLIC :\n $sql.=\" WHERE pct.status = 'public' \";\n break;\n case self::FILTER_ACCESSIBLE :\n if(!is_admin())\n {\n $sql.=\" JOIN \".USER_CACHE_CATEGORIES_TABLE.\" pucc\n ON (pucc.cat_id = pct.id) AND pucc.user_id='\".$user['id'].\"' \";\n }\n else\n {\n $sql.=\" JOIN (\n SELECT DISTINCT pgat.cat_id AS catId FROM \".GROUP_ACCESS_TABLE.\" pgat\n UNION DISTINCT\n SELECT DISTINCT puat.cat_id AS catId FROM \".USER_ACCESS_TABLE.\" puat\n UNION DISTINCT\n SELECT DISTINCT pct2.id AS catId FROM \".CATEGORIES_TABLE.\" pct2 WHERE pct2.status='public'\n ) pat\n ON pat.catId = pct.id \";\n }\n\n break;\n }\n $sql.=\"ORDER BY global_rank;\";\n\n $result=pwg_query($sql);\n if($result)\n {\n while($row=pwg_db_fetch_assoc($result))\n {\n $row['level']=$startLevel+substr_count($row['rank'], '.');\n\n /* rank is in formated without leading zero, giving bad order\n * 1\n * 1.10\n * 1.11\n * 1.2\n * 1.3\n * ....\n *\n * this loop cp,vert all sub rank in four 0 format, allowing to order\n * categories easily\n * 0001\n * 0001.0010\n * 0001.0011\n * 0001.0002\n * 0001.0003\n */\n $row['rank']=explode('.', $row['rank']);\n foreach($row['rank'] as $key=>$rank)\n {\n $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);\n }\n $row['rank']=implode('.', $row['rank']);\n\n $row['name']=GPCCore::getUserLanguageDesc($row['name']);\n\n $returned[]=$row;\n }\n }\n\n if($this->options['galleryRoot'])\n {\n $returned[]=array(\n 'id' => 0,\n 'name' => l10n('All the gallery'),\n 'rank' => '0000',\n 'level' => 0,\n 'status' => 'public',\n 'childs' => null\n );\n }\n\n usort($returned, array(&$this, 'compareCat'));\n\n if($this->options['tree'])\n {\n $index=0;\n $returned=$this->buildSubLevel($returned, $index);\n }\n else\n {\n //check if cats have childs & remove rank (enlight the response)\n $prevLevel=-1;\n for($i=count($returned)-1;$i>=0;$i--)\n {\n unset($returned[$i]['rank']);\n if($returned[$i]['status']=='private')\n {\n $returned[$i]['status']='0';\n }\n else\n {\n $returned[$i]['status']='1';\n }\n\n if($returned[$i]['level']>=$prevLevel)\n {\n $returned[$i]['childs']=false;\n }\n else\n {\n $returned[$i]['childs']=true;\n }\n $prevLevel=$returned[$i]['level'];\n }\n }\n\n return($returned);\n }",
"function getCategories() {\r\n\t\t$categories = $this->find('all');\r\n\t\t$result = array();\r\n\t\tforeach ($categories as $category) {\r\n\t\t\t$result[$category['NbCategory']['id']] = array(\r\n\t\t\t\t'probability' => $category['NbCategory']['probability'],\r\n\t\t\t\t'word_count' => $category['NbCategory']['word_count']\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $result;\r\n\t}",
"function getAllCategories()\n {\n // Get list of categories using solr\n $metadataDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"category\");\n $enabledDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"slicerdatastore\");\n $terms = array(); \n if($metadataDao)\n {\n $db = Zend_Registry::get('dbAdapter');\n $results = $db->query(\"SELECT value, itemrevision_id FROM metadatavalue WHERE metadata_id='\".$metadataDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n foreach($results as $result)\n {\n $arrayTerms = explode(\" --- \", $result['value']);\n foreach($arrayTerms as $term)\n { \n if(strpos($term, \"zzz\") === false) continue;\n $tmpResults = $db->query(\"SELECT value FROM metadatavalue WHERE itemrevision_id='\".$result['itemrevision_id'].\"' AND metadata_id='\".$enabledDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n if(empty($tmpResults))continue;\n $term = trim(str_replace('zzz', '', $term));\n if(!isset($terms[$term]))\n {\n $terms[$term] = 0;\n }\n $terms[$term]++;\n }\n } \n }\n ksort($terms);\n return $terms;\n }",
"public function topCategory(){\n $category = Category::select('title')\n ->join('category_meals', 'categories.id', 'category_meals.category_id')\n ->selectRaw('COUNT(category_id) AS count')\n ->groupby('title')\n ->orderBy('count', 'desc')\n ->take(5)\n ->get();\n return response()->json([\n 'data' => $category,\n ]);\n }",
"public function getCategories();",
"public function getCategories();",
"public function getMostPopularItems($category, $numResults)\n\t{\n\t\t\n\t}",
"public function findCategories();",
"public function generatePopularSubcategories()\n {\n\n $categoryId = $this->id;\n\n $subcategories = Subcategory::\n whereHas('categories', function ($query) use ($categoryId) {\n $query->where('categories.id', $categoryId);\n })\n ->whereHas('evercisegroups', function($query){})\n ->take(15)\n ->get()\n ->sortByDesc(function ($subcats) {\n return $subcats->evercisegroups->count();\n });\n\n $output = [];\n foreach ($subcategories as $subcat) {\n $output[] = [\n 'name' => $subcat->name,\n 'classes' => $subcat->evercisegroups->count(),\n ];\n }\n\n\n return $output;\n }",
"public function get_popular_list()\n\t{\n\t\t$result = $this->db->from(\"blog\")\n\t\t\t\t\t\t->join(\"category\",\"category.category_id\",\"blog.category_id\")\n\t\t\t\t\t\t->where(array(\"blog.publish_status\"=> 1, \"blog.blog_status\" => 1))\n\t\t\t\t\t\t->orderby(\"blog.blog_views\", \"DESC\")\n\t\t\t\t\t\t->limit(5)\n\t\t\t\t\t\t->get();\t\n\t\treturn $result;\n\t}",
"private function groupByCategory(){\n \n $searchResults = null;\n $items = $this->items; \n \n foreach($items as $item){\n foreach($item->categories as $category_tmp){ \n $searchResults[$category_tmp][] = $item;\n } \n }\n \n return $searchResults;\n }",
"public function getAllCategories();",
"public static function getCategories() {\n return Catalog::category()->orderBy('weight')->orderBy('name')->all();\n }",
"public function categories()\n {\n // Cache results\n static $categories;\n\n if ($categories) {\n return $categories;\n }\n\n $app = \\Slim\\Slim::getInstance();\n $dataMapper = $app->dataMapper;\n $CategoryMapper = $dataMapper('CategoryMapper');\n\n return $categories = $CategoryMapper->getAllCategories();\n }",
"public function index()\n {\n Input::get( 'count' ) !== null ? $count = Input::get( 'count' ) : $count = 20;\n \n return $this->posts->with('categories')->get()->take( $count );\n }",
"function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public static function browse()\n {\n $categories = static::\n with('subcategories')\n ->get()\n ->sortBy(function ($subcats) {\n return $subcats->order;\n });\n\n $output = [];\n foreach ($categories as $category) {\n $output[] = [\n 'name' => $category->name,\n 'description' => $category->description,\n 'popular_subcategories' => $category->getPopularClassSubcatMix(),\n 'generated_subcategories' => $category->generatePopularSubcategories(),\n ];\n }\n\n\n return $output;\n }",
"public function getAllWithCategory();",
"public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }",
"public function getCategories(){\n\t\t// preapres the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/category/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the answer into a php object\n\t\t$categories = json_decode($output, true);\n\n\t\treturn $categories;\n\t}",
"public function get_popular_products()\n\t{\n\t\t$this->db->select('product.*, category.category_name, brand.brand_name')->from('product, category, brand')->where(\"product.product_status = 1 AND product.category_id = category.category_id AND product.brand_id = brand.brand_id AND product.featured = 1\")->order_by(\"clicks\", 'DESC');\n\t\t$query = $this->db->get('',4);\n\t\t\n\t\treturn $query;\n\t}",
"function read_Categories() {\n\n\t\tglobal $myCategories;\n\t\tglobal $gesamt;\n\t\t\n\t\t$i = 0;\n\t\t\n\t\tforeach ($myCategories as $catInfo):\n\t\t\n\t\t$test=$myCategories->category[$i]['typ'];\n\t\t\n\t\tarray_push($gesamt, $test);\n\t\t\n\t\t$i++;\n\t\tendforeach;\t\n\t\t\n\t}",
"public static function categories() {\n $db = Db::getInstance();\n $req = $db->query('SELECT * FROM category');\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function index(){\n $criteria = Category::paginate(6);\n return new CategoryCollection($criteria);\n }",
"function getCategoriesCount(){\n return $this->query(\"SELECT GROUP_CONCAT(category) FROM docs WHERE visible=1\");\n }",
"public function topSubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n\n $subcategories = $subcategoriesRepo->findBy(array(), array('visits' => 'DESC'), 10);\n\n if ($subcategories) {\n $response[\"desc\"] = \"Subcategorias mas visitadas \";\n $response[\"count\"] = count($subcategories);\n $response[\"data\"] = $subcategories;\n } else {\n $response[\"desc\"] = 'No existen subcategorias mas visitadas';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"public function categories_get()\n {\n $em = $this->doctrine->em;\n $categoriesRepo = $em->getRepository('Entities\\Category');\n $categories = $categoriesRepo->findAll();\n\n foreach ($categories as $category) {\n $services = 0;\n $subcats = $category->getSubcategories();\n foreach ($subcats as $subcat) {\n $services += $subcat->getServices()->count();\n }\n $category->servicesCount = $services;\n }\n $response[\"data\"] = $categories;\n $response[\"count\"] = count($categories);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }",
"function searchCoursesByCategory($categoryId){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT id, name, author, image FROM Course WHERE CategoryId='\" . $categoryId . \"' ORDER BY popularity\";\n\n\t\t$result = $conn->query($query);\n\n\t\treturn fetch_all($result);\n\t}",
"public static function getTopCategories() {\n global $lC_Database, $lC_Language;\n \n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_link_target, c.categories_custom_url, c.categories_mode from :table_categories c, :table_categories_description cd where c.parent_id = 0 and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 and c.categories_visibility_nav = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n while ( $Qcategories->next() ) {\n $topCategories[] = array('id' => $Qcategories->value('categories_id'),\n 'name' => $Qcategories->value('categories_name'),\n 'link_target' => $Qcategories->value('categories_link_target'),\n 'custom_url' => $Qcategories->value('categories_custom_url'),\n 'mode' => $Qcategories->value('categories_mode'));\n }\n \n return $topCategories; \n }",
"public function popular()\n {\n return Article::orderBy('views', 'desc')->get();\n }",
"public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }",
"function Categories() {\n\t\treturn DataObject::get('categoryobject', '', 'Title');\n\t}",
"private static function _getSelectCategories()\n {\n $categories = Blog::category()->orderBy('name')->all();\n $sortedCategories = array();\n\n foreach($categories as $c)\n $sortedCategories[$c->id] = $c->name;\n\n return $sortedCategories;\n }",
"public function getCategory(Request $request)\n\t{\n\t\t$params = $request->all();\n\n\t\t$categories = new Categories;\n\n\t\tif(isset($params['category']) && $params['category']!=\"\"){\n\t\t\t$categories = $categories->where('slug', \"=\", $params['category']);\n\t\t}\n\n\t\t$categories = $categories->where('cat_status',1);\t\t\n\n\t\tif(isset($params['onlyParent']) && $params['onlyParent']){\n\t\t\t$categories = $categories->where('ancestors','exists',false);\n\t\t}\n\n\t\t$categories = $categories->get();\n\n\t\tif(empty($categories) || !is_object($categories) || empty($categories->toArray())){\n\t\t\treturn response([],404);\n\t\t}\n\n\t\tif(isset($params['withChild']) && $params['withChild']){\n\n\t\t\tforeach($categories as &$category){\t\t\t\t\n\t\t\t\t$category['children'] = array();\n\t\t\t\t$category['children'] = Categories::where('cat_status',1)->where('ancestors.0._id','=',$category['_id'])->get(array('_id','slug','cat_title','metaTitle','metaDescription','metaKeywords'));\n\t\t\t}\n\n\t\t}\t\n\t\t\n\t\t\n\t\tif(isset($params['withCount']) && $params['withCount']){\n\n\t\t\t// db.products.aggregate([{$group:{_id:\"$categories\",count:{$sum:1}}}])\n\n\t\t\t$products = DB::collection('products')->raw(function($collection){\n\n\t\t\t\treturn $collection->aggregate(array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$match' => array(\n\t\t\t\t\t\t\t'status' => 1\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$project' => array('categories' => 1)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$unwind' => array(\n\t\t\t\t\t\t\t'path' => '$categories',\n\t\t\t\t\t\t\t'preserveNullAndEmptyArrays' => true\t\n\t\t\t\t\t\t)\n\t\t\t\t\t),\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$group' => array(\n\t\t\t\t\t\t\t'_id'=>'$categories',\n\t\t\t\t\t\t\t'count' => array(\n\t\t\t\t\t\t\t\t'$sum' => 1\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t});\n\n\t\t\t$processedPro = [];\n\t\t\tforeach($products['result'] as $product){\n\n\t\t\t\t$cat = $product['_id'];\n\n\t\t\t\t$processedPro[$cat] = $product['count'];\n\n\t\t\t}\n\n\t\t\tforeach($categories as &$category){\n\n\t\t\t\t$category['productCount'] = isset($processedPro[$category['_id']])?$processedPro[$category['_id']]:0;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn response($categories);\n\t}",
"public static function getCategoryData()\n\t{\n\n\t\tstatic $cats;\n\n\t\t$app = Factory::getApplication();\n\n\t\tif (!isset($cats))\n\t\t{\n\t\t\t$db = Factory::getDbo();\n\n\t\t\t$sql = \"SELECT c.* FROM #__categories as c WHERE extension='\" . JEV_COM_COMPONENT . \"' order by c.lft asc\";\n\t\t\t$db->setQuery($sql);\n\t\t\t$cats = $db->loadObjectList('id');\n\t\t\tforeach ($cats as &$cat)\n\t\t\t{\n\t\t\t\t$cat->name = $cat->title;\n\t\t\t\t$params = new JevRegistry($cat->params);\n\t\t\t\t$cat->color = $params->get(\"catcolour\", \"\");\n\t\t\t\t$cat->overlaps = $params->get(\"overlaps\", 0);\n\t\t\t}\n\t\t\tunset ($cat);\n\n\t\t\t$app->triggerEvent('onGetCategoryData', array(& $cats));\n\n\t\t}\n\n\t\t$app->triggerEvent('onGetAccessibleCategories', array(& $cats, false));\n\n\n\t\treturn $cats;\n\t}",
"function get_website_search_results_category_list($keyword) {\n try {\n libraries_load('elasticsearch-php');\n $elasticsearch_host = variable_get('elasticsearch_host');\n $client = Elasticsearch\\ClientBuilder::create()\n ->setHosts([$elasticsearch_host])\n ->build();\n } catch (\\Exception $e) {\n\n }\n\n // Get all node types from node table.\n $node_types = db_query(\"SELECT DISTINCT(type) FROM {node}\")->fetchCol('type');\n // Save search results count to an associative array with node types as keys.\n $search_website_count_by_category = [];\n foreach ($node_types as $node_type) {\n // Build search params.\n $params = build_website_search_params($search_content = _remove_special_chars($keyword), $node_type = $node_type);\n // To get a total number of all search results, we need to unset 'from' and 'size' from $params.\n unset($params['from']);\n unset($params['size']);\n try {\n $count = $client->count($params)['count'];\n if ($count != 0) {\n $search_website_count_by_category[$node_type] = $count;\n }\n } catch (\\Exception $e) {\n\n }\n }\n\n // Add total count to the $search_website_count_by_category array.\n $total_count = ['all categories' => array_sum($search_website_count_by_category)];\n $search_website_count_by_category = $total_count + $search_website_count_by_category;\n $website_search_by_node_type = [\n 'keyword' => $keyword,\n 'count' => $search_website_count_by_category,\n ];\n\n $all_categories_text = 'All categories (' . $website_search_by_node_type['count']['all categories'] . ')';\n $all_categories_link = 'tripal_elasticsearch/search_website/' . $website_search_by_node_type['keyword'];\n $output = l($all_categories_text, $all_categories_link);\n unset($website_search_by_node_type['count']['all categories']);\n\n $items = [];\n foreach ($website_search_by_node_type['count'] as $category => $count) {\n $text = $category . ' (' . $count . ')';\n $url = 'tripal_elasticsearch/search_website/' . $category . '/' . $website_search_by_node_type['keyword'];\n $items[] = l($text, $url);\n }\n\n $output .= theme('item_list', ['items' => $items]);\n return $output;\n}",
"public function categories( Request $request ){\n\n $search = $request->get('search') ?: false;\n\n /* @var \\Bolt\\Cache $cache */\n $cache = $this->app['cache'];\n\n $categories = $cache->fetch('tipser-categories');\n if(!$categories){\n $tipser = $this->loadCategories();\n $categories = $this->convertCategories($tipser);\n $cache->save('tipser-categories', $categories, self::CATEGORIES_TTL);\n }\n $categories = $this->filterCategories($categories, $search);\n\n return new JsonResponse([\n 'items' => $categories,\n 'stats' => [\n 'total' => count($categories)\n ],\n 'status' => true,\n ]);\n }",
"public function getMostPopularCourses()\n {\n $result = $this\n ->_model\n ->orderBy('view_counter', 'desc')\n ->get();\n\n return $result;\n }",
"public function all()\n {\n return Category::withCount('posts');\n }",
"public function index()\n {\n $categories = Category::select('id', 'name')\n ->withCount('books')\n ->orderBy('id', 'desc')\n ->paginate(config('define.page_length'));\n return metaResponse($categories);\n }",
"function getCategories($limit=0) {\n\t$limit = intval($limit);\n\tif($limit != 0) { $limit = \"LIMIT $limit\"; }\n\telse { $limit = \"\"; }\n\t$query = \"SELECT c.*,IFNULL(l.count,0) AS count FROM categories AS c LEFT JOIN (\n\t\t\tSELECT category, COUNT(*) AS count FROM links GROUP BY category\n\t\t ) AS l ON l.category=c.name WHERE c.name != 'main' AND count > 0 ORDER BY count DESC $limit\";\n\treturn(dbResultArray($query));\n}",
"public function categoryListWithResourcesCount()\n {\n $categories = Category::where('id', '<>', '1')->orderBy('name', 'asc')->get();\n if (count($categories) > 0) {\n foreach ($categories as $key => $value) {\n $categories[$key][\"count\"] = UserTechnologyMapping::where('domain_id', $value->id)->distinct('user_id')->count('user_id');\n $user_name = [];\n $user_ids = [];\n if (count($value->user) > 0) {\n\n foreach ($value->user as $key1 => $value1) {\n array_push($user_name, $value1->name);\n array_push($user_ids, $value1->id);\n }\n }\n $categories[$key][\"user_name\"] = $user_name;\n $categories[$key][\"user_ids\"] = $user_ids;\n }\n }\n return $this->dispatchResponse(200, \"Data.\", $categories);\n }",
"public function popular()\n {\n $subQuery = \\Overtrue\\LaravelFollow\\FollowRelation::popular(\\App\\Serie::class)->where('relation', '=', 'like');\n\n return Serie::select(['series.*', 'popular.count AS likes_count'])\n ->with([\n 'genre1',\n 'genre2',\n 'authors'\n ])\n ->joinSub(\n $subQuery,\n 'popular',\n function($join)\n {\n $join->on('series.id', '=', 'popular.followable_id');\n }\n )\n ->paginate(RESULTS_PER_PAGE);\n }",
"private function getAllCategory() {\n $repository = $this->getDoctrine()\n ->getRepository('AppBundle:Category');\n\n return $repository->\n findBy(\n [],\n ['name' => 'ASC']\n );\n }",
"public function getPopularSubcategories()\n {\n\n //return $this->popular_subcategories;\n\n if ($this->popular_subcategories)\n {\n $subcats = Subcategory::whereIn('id', explode(',', $this->popular_subcategories))->get();\n\n $output = [];\n foreach ($subcats as $subcat) {\n $output[] = [\n 'name' => $subcat->name,\n ];\n }\n\n return $output;\n }\n else\n {\n return [];\n }\n }",
"public function getAllWithCategoryAndTags();",
"public function getIndex()\n\t{\n $objects['DIR'] = array_flatten( CategoryObject::where('type', '=', 'DIR')->lists('id') );\n $objects['IND'] = array_flatten( CategoryObject::where('type', '=', 'IND')->lists('id') );\n \n $this->view_data['categories'] = (object) [\n 'tot' => OccurrenceCategory::count(),\n 'double_object' => (object) [\n 'tot' => OccurrenceCategory::whereNotNull('second_object_id')->count(),\n 'direct_first' => OccurrenceCategory::whereNotNull('second_object_id')->whereIn('first_object_id', $objects['DIR'])->lists('id'), \n 'indirect_first' => OccurrenceCategory::whereNotNull('second_object_id')->whereIn('first_object_id', $objects['IND'])->lists('id'), \n ],\n 'single_object' => (object) [\n 'tot' => OccurrenceCategory::whereNull('second_object_id')->count(),\n 'direct' => OccurrenceCategory::whereNull('second_object_id')->whereIn('first_object_id', $objects['DIR'])->count(),\n 'indirect' => OccurrenceCategory::whereNull('second_object_id')->whereIn('first_object_id', $objects['IND'])->count(),\n ],\n 'object_types' => CategoryObject::count(),\n ];\n \n \n $occurr_per['cat'] = Occurrence::selectRaw('COUNT(*) as `tot`, `category_id` as `cat`')->groupBy('cat')->orderBy('cat')->remember(1)->get(['tot', 'cat']);\n $occurr_per['verb'] = Occurrence::selectRaw('COUNT(*) as `tot`, `verb`')->groupBy('verb')->orderBy('verb')->remember(1)->get(['tot', 'verb']);\n $occurr_per['keyword'] = Occurrence::selectRaw('COUNT(*) as `tot`, `keyword`')->groupBy('keyword')->orderBy('keyword')->remember(1)->get(['tot', 'keyword']);\n // dd( $occurr_per_cat );\n \n $this->view_data['occurrences'] = (object) [\n 'tot' => Occurrence::count(),\n 'per_category' => array_combine( $occurr_per['cat']->lists('cat') , $occurr_per['cat']->lists('tot')),\n 'per_verb' => array_combine( $occurr_per['verb']->lists('verb') , $occurr_per['verb']->lists('tot')),\n 'per_keyword' => array_combine( $occurr_per['keyword']->lists('keyword') , $occurr_per['keyword']->lists('tot')),\n ];\n \n $props['IND'] = OccurrenceObjectProperty::selectRaw('COUNT(*) as `tot`, `property_id` as `pid`')->where('type', '=', 'IND')->groupBy('pid')->remember(1)->get();\n $props['DIR'] = OccurrenceObjectProperty::selectRaw('COUNT(*) as `tot`, `property_id` as `pid`')->where('type', '=', 'DIR')->groupBy('pid')->remember(1)->get();\n \n $prop_names = ObjectProperty::remember(1)->orderBy('name')->get();\n \n $this->view_data['properties'] = (object) [\n 'tot' => ObjectProperty::count(),\n 'usage' => (object) [\n 'direct' => array_combine( $props['DIR']->lists('pid'), $props['DIR']->lists('tot') ),\n 'indirect' => array_combine( $props['IND']->lists('pid'), $props['IND']->lists('tot') ),\n ],\n 'names' => array_combine( $prop_names->lists('id'), $prop_names->lists('name') )\n ];\n \n arsort($this->view_data['properties']->usage->direct);\n arsort($this->view_data['properties']->usage->indirect);\n \n unset($objects);\n unset($occurr_per);\n unset($props);\n \n return $this->makeView('DoubleObject.Statistics.index');\n\t}",
"public function categories()\n {\n return $this->apiResponse(Items::$categories, 2678400);\n }",
"function catagoryStatistics($catId, $clientKey){\n\t\n\t$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, \"https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&id=\".$catId.\"&key=\".$clientKey.\"\");\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n$output = curl_exec($ch);\necho curl_error($ch);\ncurl_close($ch);\n \n$searchResponse = json_decode($output,true);\n\t\n\tforeach ($searchResponse['items'] as $searchResult) {\n\t//$videoId = $searchResult['id'];\n\t$catChannelId=$searchResult['snippet']['channelId'];\n\t$title=$searchResult['snippet']['title'];\n\treturn array ('catTitle'=>$title, 'catChannelId'=>$catChannelId);\n\t\n\t}\n\n}",
"public function getCategoriesForListView(): Collection;",
"public function getListCountCategory()\n {\n $listCatCount = DB::table('category')\n ->join('film_category', 'film_category.category_id', '=', 'category.category_id')\n ->select(DB::raw('category.name, count(*)'))\n ->groupBy('category.name')\n ->get();\n \n return response()->json([\n 'success' => true,\n 'message' => 'Jumlah berdasarkan kategory film',\n 'data' => $listCatCount\n ]);\n }",
"public function index()\n {\n $categories = Category::with('post')->latest()->get();\n\n // return $categories->post->count();\n\n return response()->json($categories, 200);\n }",
"function percategory(SS_HTTPRequest $r){\r\n\t\t$catID = (int) $r->param('ID');\r\n\t\t$locale = $this->Locale;\r\n\t\t$percat = DataObject::get(\"SupportReview\",\"`Published` = true AND `Locale` ='\".$locale.\"' AND `SRCategoryID` = \". $catID, null, null, $this->getLimit());\r\n\t\treturn array(\r\n\t\t\t\"Reviews\" => $percat,\r\n\t\t\t\"Heading\" => DataObject::get_by_id(\"SRCategory\", $catID)->i18nTitle()\r\n\t\t);\r\n\t}",
"public function getSuggestions()\n {\n $ttl = 60; // seconds\n\n $categories = Cache::remember('customer_suggestions', $ttl, function () {\n return Category::inRandomOrder()\n ->orderBy('name')\n ->take(5)\n ->get()\n ->sortBy(function ($model) {\n return $model->name;\n })\n ->values()\n ->each(function ($category) {\n $category->load(['films' => function ($query) {\n $query->inRandomOrder()->take(10);\n }]);\n });\n });\n\n return new CategoryCollection($categories);\n }",
"function returnPopulars()\n{\n\n\t$strSQL = \"SELECT * FROM newsletter WHERE language_code = 'th' AND category_id = '4' ORDER BY nid desc LIMIT 3 \";\n\t$objQuery = mysql_query($strSQL) or die (mysql_error());\n\t$resultArray = array();\n\twhile($obResult = mysql_fetch_array($objQuery))\n\t{\n\t\tarray_push($resultArray,$obResult);\n\t}\n\t// mysql_close($objConnect);\n\treturn $resultArray;\n}",
"function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\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\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}",
"public function get_category()\n\t{\n\t\tglobal $module_name, $nv_Cache;\n\n\t\t$category = array();\n\n\t\t$sql = \"SELECT * FROM \" . $this->table_prefix . \"_category ORDER BY weight ASC\";\n\t\t$result = $this->db_cache( $sql, 'id', $module_name );\n\n\t\t$category[0] = array(\n\t\t\t'id' => 0,\n\t\t\t'title' => $this->lang('unknow'),\n\t\t\t'keywords' => '',\n\t\t\t'description' => ''\n\t\t);\n\n\t\tif( ! empty( $result ) )\n\t\t{\n\t\t\tforeach( $result as $row )\n\t\t\t{\n\t\t\t\t$category[$row['id']] = array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'title' => $row['title'],\n\t\t\t\t\t'keywords' => $row['keywords'],\n\t\t\t\t\t'description' => $row['description']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $category;\n\t}",
"public function index() {\n $categories = $this->category->model->where('parent_id', null)->orderBy('id', 'asc')->paginate(15);\n \n foreach ($categories as $category) { \n $category['products_count']=$category->articles()->count();\n }\n\n $all_categories = $this->category->model->all();\n $breadcrumbs = [['url' => '' , 'name' => trans('text.categories') ]];\n $category = null;\n return compact('categories', 'all_categories', 'breadcrumbs', 'category');\n }",
"public function getAll()\n {\n return CategorieResource::collection(Categorie::paginate());\n }",
"function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}",
"public function getCountAction()\n {\n $dm = $this->get('doctrine.odm.mongodb.document_manager');\n $categoryRepository = $dm->getRepository('FaithleadRestBundle:Category');\n\n\n return array('count' => $categoryRepository->findCount());\n }",
"function getCategorias(){\r\n $conector = new Conector();\r\n $banco = new BancoCategoria();\r\n return $banco->getCategorias($conector->getConexao());\r\n }",
"public function findAllCategories(): iterable;",
"public static function getCategories()\n {\n $app = App::getInstance();\n\n $manager = BaseManager::build('FelixOnline\\Core\\Category', 'category');\n\n try {\n $values = $manager->filter('hidden = 0')\n ->filter('deleted = 0')\n ->filter('id > 0')\n ->order('order', 'ASC')\n ->values();\n\n return $values;\n } catch (\\Exception $e) {\n return array();\n }\n }",
"public function listCategory()\n {\n if (isset($_GET['search'])) $data['search'] = $_GET['search'];\n $data['categorys_list'] = Category::OrderBy('title', 'asc');\n if (!empty($data['search'])) {\n $search_token = explode(' ', $data['search']);\n foreach ($search_token as $search) {\n $data['categorys_list'] = $data['categorys_list']->where(function ($query) use ($search) {\n $query->where('title', 'LIKE', '%' . $search . '%');\n });\n }\n }\n\n $data['categorys_list'] = $data['categorys_list']->paginate(PAGINATE_SMALL, ['*'], 'p');\n return view('category.list', $data);\n }",
"function selectAllCategories() {\r\n global $conn;\r\n $select = \"SELECT * FROM product GROUP BY category ORDER BY COUNT(category);\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}",
"public function getCategories() : array;",
"public function index()\n {\n return $this->apiResponse(ResultTypeController::Success, Category::all(),'Kategoriler', 200);\n }",
"function pbc($catid_in=0,$count=0) {\r\n\r\n\tglobal $wpdb, $post;\r\n\t\r\n\t$the_output = '<ul>';\r\n\t\t\r\n\t$pbcresults = $wpdb->get_results(\"SELECT *\r\nFROM $wpdb->posts, $wpdb->term_relationships,$wpdb->term_taxonomy\r\nWHERE \r\n$wpdb->posts.post_status = 'publish'\r\nAND $wpdb->posts.post_type = 'post'\r\nAND $wpdb->posts.id = $wpdb->term_relationships.object_id\r\nand \r\n$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id\r\nAND $wpdb->term_taxonomy.term_id =$catid_in\r\nORDER BY $wpdb->posts.post_date DESC , $wpdb->posts.post_title ASC\r\nLIMIT $count\");\r\n\t\t\r\n\t\tforeach ( $pbcresults as $pbcresult ) \r\n\t\t{\r\n\t $the_output .= '<li><a href=\"' . get_permalink($pbcresult->ID) . '\">' . apply_filters('the_title', $pbcresult->post_title) . '</a></li>';\r\n\t\t}\r\n \r\n $the_output .= '</ul>';\r\n\t\r\n\treturn $the_output;\r\n}",
"public function displaypopularcakes()\n {\n $data=DB::table('products')\n ->where('products.category_id',1)\n ->select('products.*')\n ->get();\n\n return view('popular-cakes', ['products'=>$data]);\n }",
"public function getCategorias() {\n $categorias=$this->db->query('SELECT * FROM categorias ORDER BY id DESC;');\n return $categorias;\n }",
"public function getCategory() {}",
"public function getPopularEntries()\n {\n try {\n $response = $this->getApiProvider()->getClient()->request('GET', $this->apiUrl('popular'));\n\n return $this->getEntitiesBuilder(static::class)\n ->fromResponse($response)\n ->with($this->apiProvider, $this->resource)\n ->collection();\n } catch (RequestException $e) {\n //\n }\n\n return [];\n }",
"public function categorias()\n {\n //$categorias = Categoria::get();\n $categorias = Categoria::with(['atractivos','fotos'])->get();\n //$categorias = $categorias->load('cat_atractivos','cat_fotos');\n //$atractivos = Atractivo::all();\n $response = Response::json($categorias,200);\n //return [\"results\" =>[$response]];\n return $response;\n //return Response::json(['results' => $atractivos],200);\n }",
"public function fetchCategoriesWithImages() {\n try {\n\t$sql = \"SELECT c.id AS catId, c.category, \"\n\t . \"SUBSTRING_INDEX(GROUP_CONCAT(i.id, '-', i.name ORDER BY RAND() SEPARATOR ','), ',', 6) AS images, \"\n\t . \"COUNT(ic.image_id) AS countImages FROM category c \"\n\t . \"JOIN image_category ic ON c.id = ic.cat_id \"\n\t . \"JOIN image i ON i.id = ic.image_id \"\n\t . \"GROUP BY(ic.cat_id) HAVING countImages > 4 \"\n\t . \"ORDER BY RAND()\";\n\treturn $this->getAllColumns($sql, 'catId');\n } catch (PDOException $e) {\n\treturn $this->returnPdoErrors($e);\n }\n }",
"public function getPostCategory($catslug) {\n\n $postCategories = PostCategory::with('posts') \n \t\t\t\t ->where('catslug', '=', $catslug)\n ->first();\n\n \n $categories = PostCategory::all();\n\n $trendings = Post::select(DB::raw('posts.*, count(*) as `aggregate`'))\n ->join('views', 'posts.id', '=', 'views.post_id')\n ->groupBy('post_id')\n ->orderBy('aggregate', 'desc')\n ->limit(4)\n ->get();\n \n // return view\n return view ('pages.frontend.articles.category.categoriesposts')->with('postCategories', $postCategories)->with('categories', $categories)->with('trendings', $trendings);\n\n\t}",
"public function categories()\n {\n $catsArray = [];\n $countCat = [];\n $lastMonCounts = [];\n $currentMonCounts = [];\n $countCatNew = [];\n $currentMonth = date('F');\n $lastMonth = Date(\"F\", strtotime(\"first day of last month\"));\n // die(Date(\"F\", strtotime(\"first day of next month\")));\n $categories = $this->notesModel->getCategories();\n\n foreach ($categories as $key) {\n array_push($catsArray, $key->category);\n $lastMonResult = json_decode(json_encode($this->notesModel->getMonthlyCounts($key->category, $lastMonth)), true);\n $curMonResult = json_decode(json_encode($this->notesModel->getMonthlyCounts($key->category, $currentMonth)), true);\n array_push($countCat, $this->notesModel->getCategoryCount($key->category));\n array_push($lastMonCounts, $lastMonResult['monthly_counts']);\n array_push($currentMonCounts, $curMonResult['monthly_counts']);\n };\n foreach ($countCat as $key) {\n array_push($countCatNew, $key->no_of_notes);\n }\n function strToNum($value)\n {\n return empty($value) ? 0 : intval($value);\n }\n $lastCountsNew = array_map('strToNum', $lastMonCounts);\n $curCountsNew = array_map('strToNum', $currentMonCounts);\n\n $data = [\n 'categories' => $catsArray,\n 'countCat' => $countCatNew,\n 'lastMonCounts' => $lastCountsNew,\n 'currentMonCounts' => $curCountsNew,\n ];\n // die(print_r($data['categories'][0]->category));\n echo json_encode($data);\n }",
"public function get_categories($category = '')\n {\n /** @var \\tacitus89\\homepage\\entity\\category[] $entities */\n $entities = array();\n\n\t\t//it show all categories\n if($category == ''){\n $sql = 'SELECT f1.forum_id, f1.parent_id, f1.forum_name, f1.forum_desc, f1.forum_image, f1.hp_url, f1.hp_desc, f1.hp_special\n\t\t\tFROM ' . FORUMS_TABLE . ' f1, '. FORUMS_TABLE .' f2\n\t\t\tWHERE (f2.hp_show = 1 AND f2.parent_id = 0\n\t\t\t AND (f1.hp_special = 0 AND f1.hp_show = 1 AND (f1.parent_id = 0 OR f1.parent_id = f2.forum_id)) )\n\t\t\t\tOR (f1.forum_id = 543 AND f2.forum_id = 543)\n\t\t\t\tOR (f2.hp_show = 1 AND f1.hp_special = 1 AND (f1.parent_id = 0 OR f1.parent_id = f2.forum_id))\n\t\t\tORDER BY f1.hp_special, f1.left_id ASC';\n }\n\t\t//Special url\n\t\t//display all modding forums\n elseif ($category == 'modding') {\n $sql = 'SELECT f1.forum_id, f1.parent_id, f1.forum_name, f1.forum_desc, f1.forum_image, f1.hp_url, f1.hp_desc, f1.hp_special\n\t\t\tFROM ' . FORUMS_TABLE . ' f1\n\t\t\tWHERE f1.hp_show = 1 AND f1.hp_special = 1\n\t\t\tORDER BY f1.left_id ASC';\n }\n\t\t//display all forums of category\n\t\telse {\n\t\t\t$sql = 'SELECT f1.forum_id, f1.parent_id, f1.forum_name, f1.forum_desc, f1.forum_image, f1.hp_url, f1.hp_desc, f1.hp_special\n\t\t\tFROM ' . FORUMS_TABLE . ' f1\n\t\t\tRIGHT JOIN '. FORUMS_TABLE .' f2 ON (f2.left_id < f1.left_id AND f2.right_id > f1.right_id)\n\t\t\tWHERE f1.hp_show = 1 AND f2.hp_show = 1 \n\t\t\t\tAND f1.hp_special = 0 AND f2.hp_special = 0\n\t\t\t AND f2.hp_url = \"'. $category .'\"\n\t\t\tORDER BY f1.left_id ASC';\n\t\t}\n // Load all page data from the database\n $result = $this->db->sql_query($sql);\n\n while ($row = $this->db->sql_fetchrow($result))\n {\n\t\t\t//adding to pseudo-Category\n\t\t\tif($row['hp_special'] == 1)\n\t\t\t{\n\t\t\t\t$row['parent_id'] = 543;\n\t\t\t}\n\t\t\t//pseudo-Category\n\t\t\tif($row['forum_id'] == 543)\n\t\t\t{\n\t\t\t\t$row['forum_name'] = 'Modding';\n\t\t\t\t$row['hp_url'] = 'modding';\n\t\t\t}\n\t\t\t\n $category = $this->container->get('tacitus89.homepage.category')->import($row);\n if(isset($entities[$row['parent_id']]) && $row['parent_id'] > 0)\n {\n\t\t\t\t$entities[$row['parent_id']]->add_forum($category);\n }\n else\n {\n // Import each page row into an entity\n $entities[$row['forum_id']] = $category;\n }\n }\n $this->db->sql_freeresult($result);\n\n // Return all page entities\n return $entities;\n }",
"public function loadAllCategories() {\n\t\t$sql = \"SELECT * FROM categories_grumble ORDER BY category_name ASC\";\n\t\t$this->db->query($sql);\n\t\treturn $this->db->rows();\n\t}",
"public function catCompare() {\n\t\tglobal $db;\n\t\t$user = new User;\n\t\t$lang = new Language;\n\t\t$where = \"WHERE category_author = '{$user->_user()}'\";\n\t\tif ( $user->can( 'manage_user_items' ) ) {\n\t\t\t$where = null;\n\t\t}\n\t\t$get = $db->customQuery( \"SELECT category_id,category_name FROM {$db->tablePrefix()}categories $where\" );\n\t\t$return = '';\n\t\t$getLinks = $db->customQuery( \"SELECT COUNT(*) FROM {$db->tablePrefix()}links WHERE link_category = '0'\" );\n\t\t$countLinks = $getLinks->fetch_row();\n\t\t$return .= \"['{$lang->_tr( 'Without Category', 1 )}', {$countLinks[0]}],\";\n\t\t$countLinks = $getLinks->fetch_row();\n\t\twhile ( $array = $get->fetch_array() ) {\n\t\t\t$getLinks = $db->customQuery( \"SELECT COUNT(*) FROM {$db->tablePrefix()}links WHERE link_category = '{$array['category_id']}'\" );\n\t\t\t$countLinks = $getLinks->fetch_row();\n\t\t\t$return .= \"['{$array['category_name']}', {$countLinks[0]}],\";\n\t\t}\n\t\treturn $return;\n\t}",
"function getCategoryTree($db) {\n // Make Category Tree\n $query = \"SELECT `COMPLAINT_TYPE`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $category['name'] = trim($row[\"COMPLAINT_TYPE\"], ' /');\n $category['COMPLAINT_TYPE'] = $row[\"COMPLAINT_TYPE\"];\n $category['slug'] = slugify($category['name']);\n $category['count'] = $row[\"COUNT(*)\"];\n if( $category['slug'] != 'n-a' && $category['slug'] != 'select-one' && $category['slug'] != 'other' ){\n $topCategories[$category['slug']]=$category;\n }\n }\n\n $query = \"SELECT `COMPLAINT_TYPE`, `DESCRIPTOR`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE`, `DESCRIPTOR` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $subCategory['name'] = trim($row[\"DESCRIPTOR\"], ' /');\n $subCategory['DESCRIPTOR'] = $row[\"DESCRIPTOR\"];\n $subCategory['slug'] = slugify($subCategory['name']);\n $subCategory['count'] = $row[\"COUNT(*)\"];\n if(\n trim($row['COMPLAINT_TYPE']) != ''\n && $subCategory['slug'] != 'n-a'\n && $subCategory['slug'] != 'select'\n ){\n $topCategories[slugify($row['COMPLAINT_TYPE'])]['subCategories'][$subCategory['slug']]=$subCategory;\n }\n }\n\n return $topCategories;\n}",
"private function listByCategory($category_id, $sort_by=\"time\")\n\t{\n\t\tif ($sort_by == \"hot\")\n\t\t\t$order = \"replyCount\";\n\t\telse \n\t\t\t$order = \"timestamp\";\n\n\t\tif ($category_id == 1)\n\t\t{\n\t\t\t$criteria = new CDbCriteria(array(\n\t\t\t\t'condition'=>'post_type='.Post::POST_TYPE_NEWS,\n\t\t\t\t'with'=>array('commentCount', 'author', 'replyCount', 'fbLikeCount'),\n\t\t\t\t'order'=>$order.' DESC'\n\t\t\t)); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$criteria = new CDbCriteria(array(\n\t\t\t\t'condition'=>'post_type=:post_type AND category_id=:id',\n\t\t\t\t'params'=>array('post_type'=>Post::POST_TYPE_NEWS,\n\t\t\t\t\t\t\t\t'id'=>$category_id),\n\t\t\t\t'with'=>array('commentCount', 'author', 'replyCount', 'fbLikeCount'),\n\t\t\t\t'order'=>$order.' DESC'\n\t\t\t)); \n\t\t}\n\t\n\t\t$dataProvider=new CActiveDataProvider('Post', array(\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>10,\n\t\t\t), \n\t\t\t'criteria'=>$criteria,\n\t\t)); \n\t\t\n\t\t$posts = $dataProvider->getData();\n\t\t\n\t\t// Get the number of likes from facebook\n\t\t/*\n\t\t$urls = \"\";\n\t\tforeach ($posts as $post)\n\t\t{\n\t\t\t//$urls .= yii::app()->createAbsoluteUrl(\"post/postDetail/\".$post->id).\",\";\n\t\t\t$urls .= \"http://matrix.csie.org:3390/rc/post/postDetail/\".$post->id.\",\";\n\t\t}\n\t\t$jsonurl = \"http://graph.facebook.com/?ids=\".substr($urls, 0, -1);\n\t\t$json = file_get_contents($jsonurl,0,null,null);\n\t\t$json_output = json_decode($json);\n\t\t$share_num = array();\n\t\tforeach ( $json_output as $fb_post )\n\t\t{\n\t\t\tif (isset($fb_post->shares))\n\t\t\t\t$share_num[$fb_post->id] = $fb_post->shares;\n\t\t\telse\n\t\t\t\t$share_num[$fb_post->id] = 0;\n\t\t}\n\t\t*/\n\t\t/*\n\t\t$final_post = array();\n\t\tforeach ($posts as $post)\n\t\t{\n\t\t\t$p = array(\n\t\t\t\t'id'=>$post->id,\n\t\t\t\t'title'=>$post->title,\n\t\t\t\t'author'=>$post->author->name,\n\t\t\t\t'replyCount'=>$post->replyCount,\n\t\t\t\t//'share_num'=>$share_num['http://matrix.csie.org:3390/rc/post/postDetail/'.$post['id']])\n\t\t\t\t'fbLikeCount'=>$post->fbLikeCount);\n\t\t\tarray_push($final_post, $p);\n\t\t}\n\t\t*/\n\t\t//$this->portlets['post'] = $final_post;\n\t\t//return $final_post;\n\t\treturn $posts;\n\t}",
"public static function categories() {\n\t\t// can take a long time\n\t\tset_time_limit(0);\n\n\t\t// select all uncategorized monuments\n\t\t$monuments = ORM::factory('monument')->where('id_category','is',null)->or_where('id_category','=',12)->find_all();\n\t\t$i = 0;\n\t\tforeach($monuments as $monument) {\n\n\t\t\t$category = $monument->extractCategory();\n\n\t\t\t// save the extracted category to the database\n\t\t\t$monument->id_category = $category;\n\t\t\t$monument->category_extracted = 1;\n\t\t\tif($category > 0) {\n\t\t\t\t$i++;\n\t\t\t\t$monument->save();\n\t\t\t}\n\t\t}\n\n\t\treturn $i;\n\t}",
"public function getTopCategories($limit=10) {\n\t\tglobal $db;\n\t\t$categories = $db->query(\"SELECT category, used FROM categories ORDER BY used DESC LIMIT $limit\");\n\t\treturn $categories;\n\t}",
"public function getCategory();",
"public function getCategory();",
"public function allCategoriesAllCountry() {\n $allnews = array();\n // $data = Newsdata::where('created_at', '<=', Carbon::now()->subDays(5)->toDateTimeString ())->get(); //Older than today\n // $data = Newsdata::where('created_at', '>=', Carbon::now()->subDays(2)->toDateTimeString ())->get(); //Younger than today\n // return $data;\n \n array_push($allnews, Newsdata::inRandomOrder()->get() );\n array_push($allnews, Business::inRandomOrder()->get() );\n array_push($allnews, Entertainment::inRandomOrder()->get() );\n array_push($allnews, Health::inRandomOrder()->get() );\n array_push($allnews, Science::inRandomOrder()->get() );\n array_push($allnews, Sport::inRandomOrder()->get() );\n array_push($allnews, Technology::inRandomOrder()->get() );\n\n $news = array();\n $news = $this->sortNewsIntoSingleArray($allnews);\n return $news;\n }",
"public function getTopCategoryList( $user_id=null ){\n //\n // This function will use a facebook id and get all the likes and profile info and manipulate the data to return\n // and an array of their top Likes\n //\n // Functionality has also been added so that the fb id does not need to be passed in. In this case it will not\n // go and collect data from fb and is expected that it is set prior to being called.\n //\n // RETURN: A facebook Like array but filter/sorted/and manipulated with the best likes on top\n\n $main_list;\n\n Zend_Loader::loadClass('FacebookLikes');\n\n $facebookLikes = new facebookLikes();\n \n if( $this->debug )\n $facebookLikes->setDebugTrue();\n \n // Can be set out side or this function will go and get the main_list of various likes for this user\n if( ! $this->didSetMainList ){\n $main_list = $facebookLikes->getFacebookLikeData( $this->facebookSession, $user_id );\n }else{\n $main_list = $this->main_list;\n }\n\n if( $this->debug ){\n echo '<h3>main_list</h3>';\n print_r( $main_list );\n }\n \n // Save the likes to our database\n Zend_Loader::loadClass('SaveData');\n $saveData = new SaveData();\n $saveData->saveFacebookLikes( $main_list, $this->userID, $this->accessToken ); \n\n $likesCategorized = $facebookLikes->sumUpLikesCategories( $main_list );\n\n if( $this->debug ){\n echo '<h3> likesCategorized</h3>';\n print_r( $likesCategorized );\n }\n\n $topCategorySorted = $facebookLikes->sortTopCategories( $likesCategorized );\n\n if( $this->debug ){\n echo '<h3>Top Categorys sorted</h3>';\n print_r( $topCategorySorted );\n echo '<h3>Top Categorys sorted and filter-weighted</h3>';\n }\n\n $topCategorySorted = $facebookLikes->filter_weightCategory( $topCategorySorted );\n\n if( $this->debug ){\n print_r( $topCategorySorted );\n \n echo '<h3>Top 5 Category Hits and 3 items in each category</h3>';\n }\n\n $topCategoriesHits = $facebookLikes->getTopXCategorySearchTerms( $topCategorySorted, $likesCategorized, $main_list );\n\n // Put it through the augment maniplulation filter to augment the search terms if needed \n $topCategoriesHits = $facebookLikes->manipulate_augmentSearchTerm( $topCategoriesHits );\n\n if( $this->debug ){\n print_r( $topCategoriesHits );\n }\n\n //$this->view->topCategoriesHits = $topCategoriesHits;\n\n return $topCategoriesHits;\n\n }",
"public function listRetailersByPopularityByCountry() {\n\t\t\tglobal $retailers;\n\t\t\t$countries = array_column($retailers, 'country');\n\t\t\tforeach($countries as $ck =>$cv){\n \t\t\t$p=0;\n \t\t\tforeach($retailers as $rk =>$rv){\n \t\t\tif ($rv['country']==$cv && $rv['popularity']>$p ){\n \t\t\t\t\t\t\t$p=$rv['popularity']; \n \t\t\t\t\t\t\t$this->mostpopularbycountry[$cv] = $rv;\n\t\t\t\t\t\t\t}//end if\n \t\t\t}//end foreach\n\t\t\t}//end foreach\n\t\t}",
"public function getCategories()\n {\n return Category::all();\n }",
"public function categories() {\n\t\treturn $this->terms('category');\n\t}",
"public function getBookmarkedCategories()\n {\n return Auth::user()->bookmarkedCategories()->simplePaginate(10);\n }",
"public function getAll(){\n\n \t$categorias = $this->db->query(\"SELECT * FROM categorias ORDER BY id_categoria DESC\");\n\n \treturn $categorias;\n }",
"public function getPopular($limit = 10, $productID = null, $categoryID = null){\n if($productID !== null && !Framework::isValidID($productID)){\n return $this->getResponseObject(null, null, \"Invalid Product ID: $productID\");\n }\n if($categoryID !== null && !Framework::isValidID($categoryID)){\n return $this->getResponseObject(null, null, \"Invalid Category ID: $categoryID\");\n }\n $contentSearch = null;\n $productID = intval($productID);\n $categoryID = intval($categoryID);\n $limit = max(min($limit, 10), 1);\n try{\n if($productID || $categoryID){\n $contentSearch = new KnowledgeFoundation\\ContentSearch();\n $contentSearch->Filters = new KnowledgeFoundation\\ContentFilterArray();\n if($productID){\n $productFilter = new KnowledgeFoundation\\ServiceProductContentFilter();\n $productFilter->ServiceProduct = $productID;\n $contentSearch->Filters[] = $productFilter;\n }\n if($categoryID){\n $categoryFilter = new KnowledgeFoundation\\ServiceCategoryContentFilter();\n $categoryFilter->ServiceCategory = $categoryID;\n $contentSearch->Filters[] = $categoryFilter;\n }\n }\n $topAnswers = KnowledgeFoundation\\Knowledge::GetPopularContent($this->getKnowledgeApiSessionToken(), $contentSearch, null, $limit);\n $topAnswers = $topAnswers->SummaryContents;\n }\n catch(\\Exception $e){\n return $this->getResponseObject(null, null, $e->getMessage());\n }\n if($topAnswers){\n return $this->getResponseObject($topAnswers);\n }\n return $this->getResponseObject(null, null, null, 'No results found.');\n }",
"public static function popularity() {\n\t\tset_time_limit(0);\n\n\t\t$query = DB::select('monuments.id_monument')\n\t\t->select(array(DB::expr(\"(3 * COUNT(dev_visits.id) + 2 * COUNT(id_log) + COUNT(dev_venues.id))\"), \"new_popularity\"))\n\t\t->from('monuments')\n\t\t->join('logs_monuments', 'left')->on('logs_monuments.id_monument', '=', 'monuments.id_monument')\n\t\t->join('visits', 'left')->on('visits.id_monument', '=', 'monuments.id_monument')\n\t\t->join('venues', 'left')->on('venues.id_monument', '=', 'monuments.id_monument')\n\t\t->having('new_popularity', '!=', 'popularity')\n\t\t->group_by('monuments.id_monument')\n\t\t->execute();\n\n\t\tforeach ($query AS $monument) {\n\t\t\t$query = DB::update('monuments')\n\t\t\t->set(array('popularity' => $monument['new_popularity']))\n\t\t\t->where('id_monument', '=', $monument['id_monument'])\n\t\t\t->execute();\n\t\t}\n\n\t\treturn count($query);\n\t}",
"public function categories_all() {\n\t\t// Simple! Get the categories\n\t\t$this->data['categories'] = $this->mojo->blog_model->categories();\n\t\t\n\t\t// ...and display the view. We won't\n\t\t// be needing Pagination or anything like that\n\t\t$this->_view('categories');\n\t}",
"public function listsCategoriesGet()\r\n {\r\n $response = Category::all();\r\n return response()->json($response, 200);\r\n }",
"public function index()\n {\n $categories = Category::paginate(10);\n return (new CategoryCollection($categories))->additional([\n \"message\" => \"categories fetch successfully.\"\n ]);\n }",
"public function index()\n {\n return response()\n ->json(\n [\n 'categories' => $this->queryCategory(null)\n ],\n 200\n );\n }"
] | [
"0.6856333",
"0.6606608",
"0.648939",
"0.6299891",
"0.62710917",
"0.62520313",
"0.62520313",
"0.6238672",
"0.6093382",
"0.6090886",
"0.60602975",
"0.6052847",
"0.5987166",
"0.5983488",
"0.59693944",
"0.5967071",
"0.59436905",
"0.5925538",
"0.59227276",
"0.58903617",
"0.5856867",
"0.58420265",
"0.583522",
"0.58184296",
"0.58158296",
"0.5813486",
"0.5808865",
"0.58029056",
"0.5734183",
"0.5732213",
"0.5723269",
"0.5721175",
"0.5719464",
"0.5716569",
"0.57157946",
"0.5700994",
"0.5695181",
"0.5681788",
"0.56751424",
"0.56624025",
"0.5649846",
"0.55942106",
"0.55934906",
"0.55886537",
"0.5581824",
"0.5581746",
"0.55792767",
"0.5575559",
"0.5569842",
"0.55553955",
"0.5552157",
"0.55355084",
"0.55354786",
"0.55297655",
"0.5524067",
"0.5523035",
"0.551932",
"0.5482875",
"0.5480622",
"0.5480226",
"0.54747736",
"0.54694563",
"0.5468933",
"0.54661214",
"0.546526",
"0.5459837",
"0.54590386",
"0.5457578",
"0.5448447",
"0.5437038",
"0.5432091",
"0.5423368",
"0.5421104",
"0.5414666",
"0.54130745",
"0.5411463",
"0.54097635",
"0.5409361",
"0.54055506",
"0.54054123",
"0.5400216",
"0.5398491",
"0.53981215",
"0.5397835",
"0.53949505",
"0.5374942",
"0.5374942",
"0.5372566",
"0.53708136",
"0.5356617",
"0.535298",
"0.5347228",
"0.5340345",
"0.533927",
"0.53354406",
"0.533514",
"0.53282505",
"0.53269404",
"0.53265893",
"0.5317573"
] | 0.60414016 | 12 |
Get userId from userName | public function getUserId($user)
{
$sql = "SELECT id FROM users WHERE name = '$user'";
$res = $this->db->executeFetch($sql);
$res = $res->id;
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserId($userName)\n {\n $sql = \"SELECT id FROM fos_user WHERE username = :username\";\n $stmt = $this->connection->prepare($sql);\n $stmt->bindValue(\"username\", $userName);\n $stmt->execute();\n $res = $stmt->fetch();\n return intval($res['id']);\n }",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"function _getUserIdByUserName($userName) {\n $user = UserManager::instance()->getUserByUserName($userName);\n if ($user == null) {\n return null;\n } else {\n return $user->getId();\n }\n}",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"function getUsername($userId){\n return getSingleValue(\"SELECT `username` FROM `private_users` WHERE `id` =\" . escape(intval($userId)) . \" LIMIT 0, 1\");\n }",
"protected function getUserId() {}",
"protected function getUserId() {}",
"public function getUserId(): string;",
"public function get_user_id();",
"function getUserId(){\n\t//replace with actual\n\treturn '123';\n}",
"abstract protected function getUserId() ;",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }",
"private function retrieveUserId($name,$log=false){\n\t\t$res = $this->_link->selectLCASE('users',array('id'),array('name'=>strtolower($name)),true,$log);\n\t\treturn $res['id'];\n\t}",
"public function getUserId()\n\t{\n\t\treturn $this->evaluateExpression($this->getUserIdExpression);\n\t}",
"public function getUserIdWithUsername($id);",
"public function getUserIdName()\n {\n return $this->userRepo->getUserIdName();\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getuserId()\n {\n return $this->userId;\n }",
"public function getCustomUserId();",
"function GetUserID($username) {\r\n $user_ids = array();\r\n $usernames = array($username);\r\n user_get_id_name($user_ids, $usernames);\r\n return $user_ids[0];\r\n }",
"protected static function getUserID()\r\n {\r\n $userID = \\CAT\\Helper\\Validate::sanitizePost('user_id','numeric');\r\n\r\n if(!$userID)\r\n $userID = \\CAT\\Helper\\Validate::sanitizeGet('user_id','numeric');\r\n\r\n if(!$userID)\r\n $userID = self::router()->getParam(-1);\r\n\r\n if(!$userID || !is_numeric($userID) || !\\CAT\\Helper\\Users::exists($userID))\r\n Base::printFatalError('Invalid data')\r\n . (self::$debug ? '(\\CAT\\Backend\\Users::getUserID())' : '');;\r\n\r\n return $userID;\r\n }",
"public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}",
"public function getUserId () {\n\t\treturn ($this->userId);\n\t}",
"public function getUserId()\n {\n return $this->authenticator->getUserId();\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public static function getUserName($user_id);",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function userId($user);",
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId() {\n return($this->userId);\n }",
"public static function getUserId() {\n $returnValue = 0;\n if (isset($_SESSION[\"userid\"])) {\n $returnValue = $_SESSION[\"userid\"];\n }\n return $returnValue;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"function user_id () {\r\n\t$info = user_info();\r\n\treturn (isset($info[0]) ? $info[0] : 0);\r\n}",
"public function getUserId() {\n\t\treturn($this->userId);\n\t}",
"public function getUserId($username) {\r\n\t\treturn ($this->appUserDao->getUserId ( mysql_escape_string($username) ));\r\n\t}",
"public function getCurrentUserId();",
"public function getUserId()\r\n {\r\n return $this->userId;\r\n }",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"public function getUserIdByUserName(string $userName): string {\n\t\t$this->featureContext->setResponse(GraphHelper::getUser(\n $this->featureContext->getBaseUrl(),\n $this->featureContext->getStepLineRef(),\n $this->featureContext->getAdminUsername(),\n $this->featureContext->getAdminPassword(),\n $userName\n ));\n\t\tif ($this->featureContext->getResponse()) {\n\t\t\t$rawBody = $this->featureContext->getResponse()->getBody()->getContents();\n\t\t\t$response = \\json_decode($rawBody, true, 512, JSON_THROW_ON_ERROR);\n\t\t\tif (isset($response[\"id\"])) {\n\t\t\t\treturn $response[\"id\"];\n\t\t\t} else {\n\t\t\t\tthrow new Exception(__METHOD__ . \" accounts-list is empty\");\n\t\t\t}\n\t\t}\n\t\tthrow new Exception(__METHOD__ . \" user with name $userName not found\");\n\t}",
"public function getUserId() {\n\t\treturn ($this->userId);\n\t}",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->userid;\n }",
"final protected function userId()\n {\n return $this->container->make(LashyGuard::class)->id();\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->login;\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function getUserid()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId() {\n return $this->userId;\n }",
"public function getUserId() {\n return $this->userId;\n }",
"public function getUserId(): int\n {\n return $this->userId;\n }",
"public function getUserId() {\n\t\treturn $this->userId;\n\t}",
"public function getUserId()\n {\n if (array_key_exists(\"userId\", $this->_propDict)) {\n return $this->_propDict[\"userId\"];\n } else {\n return null;\n }\n }",
"public static function userId()\r\n {\r\n return (new Session())->get(static::$userIdField);\r\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"public function getuserid(){\n // SQL statement\n $sql = \"SELECT user_id FROM user WHERE user_name = '\".$_SESSION['user'].\"'\";\n $value = $this->con->query($sql);\n $value = $value->fetch_assoc();\n return $value['user_id'];\n }",
"public function getUserId()\n {\n return($this->userId);\n }",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }",
"public function getUserId(){\n \n if ($user = JWTAuth::parseToken()->authenticate()) {\n $userId = $user->id;\n return $userId;\n }\n }",
"public function getUserId(ServerRequestInterface $request): string;",
"public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }",
"public function get_userId()\n {\n return $this->_userId;\n }",
"public function getUserId() \n {\n if (!$this->hasUserId()) \n {\n $this->userId = 0;\n }\n\n return $this->userId;\n }",
"public function getUserId(): ?string;",
"public function getUserId(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_USER_ID);\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"function GetUserIdByName ($username) {\n $username = filter_var($username, FILTER_SANITIZE_STRING);\n \n $path = REST_PATH . 'users/' . $username . '.xml';\n\n // Call Rest API\n $result = CallRestApi($path);\n \n // Read the returned XML\n $xml = simplexml_load_string($result) or die(\"Error: Cannot create object\");\n return $xml->User->Id;\n}",
"public function getUserId()\n {\n }",
"protected function userID ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n //var_dump($datosUsers);\n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$datosUsers->nombre),\n array('password'=>$datosUsers->password)\n )\n ));\n if(!empty($user))\n {\n $id=0;\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n $username = $user[$key]->nombre;\n $password = $user[$key]->password;\n }\n return $id; \n } \n }",
"function getUserName($userId) {\n $profile = getProfile($userId);\n if (!$profile) {\n return false;\n }\n\n return $profile[\"username\"];\n}",
"public function getUserId() : int\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n $request = new GetUserRequest();\n $user = $this->serviceClient->GetService()->GetUser($request)->User;\n return $user->Id;\n }",
"function getIdUser($username)\r\n {\r\n $results = $this->querySimpleExecute(\"select * from t_user where useUsername='\". $username . \"'\");\r\n return $results = $this->formatData($results)[0]['idUser'];\r\n }"
] | [
"0.7713086",
"0.7673868",
"0.7673868",
"0.7673868",
"0.7673868",
"0.7673868",
"0.7673868",
"0.7673868",
"0.7673868",
"0.7673868",
"0.76495916",
"0.7519041",
"0.7485491",
"0.74818623",
"0.74818623",
"0.7472115",
"0.7468829",
"0.74465775",
"0.7439943",
"0.73775417",
"0.7325574",
"0.7295436",
"0.72767264",
"0.72705007",
"0.72572637",
"0.72516084",
"0.72516084",
"0.72516084",
"0.72515064",
"0.72328806",
"0.72227424",
"0.7197814",
"0.7178357",
"0.71783406",
"0.7174587",
"0.7171218",
"0.7164426",
"0.7164426",
"0.7164426",
"0.7147804",
"0.7124868",
"0.71179754",
"0.7117826",
"0.71160245",
"0.7114716",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.7098804",
"0.709011",
"0.70853764",
"0.7082385",
"0.70781773",
"0.70733315",
"0.7065801",
"0.7059995",
"0.7059843",
"0.7054574",
"0.7054574",
"0.70400614",
"0.7033068",
"0.70274085",
"0.70226544",
"0.70223415",
"0.7019602",
"0.70174044",
"0.70174044",
"0.70148706",
"0.70035565",
"0.7000237",
"0.69999313",
"0.6999044",
"0.69868666",
"0.6985636",
"0.6977861",
"0.69774073",
"0.6976669",
"0.696974",
"0.6968087",
"0.6964042",
"0.69635636",
"0.69608307",
"0.69522417",
"0.69472706",
"0.69465333",
"0.6941304",
"0.69382465",
"0.6935194",
"0.6932707",
"0.6929424",
"0.6926492"
] | 0.0 | -1 |
Search for product by name or description | public function searchProducts($searchString)
{
$sql = "SELECT
P.id,
(select COUNT(id) FROM Product) as rows,
P.name,
P.description,
P.image,
P.recommended,
GROUP_CONCAT(DISTINCT PC.category) AS category,
P.price,
Offer.new_price,
I.items
FROM Product AS P
INNER JOIN Prod2Cat AS P2C
-- LEFT OUTER JOIN Prod2Cat AS P2C
ON P.id = P2C.prod_id
INNER JOIN ProdCategory AS PC
-- LEFT OUTER JOIN ProdCategory AS PC
ON PC.id = P2C.cat_id
LEFT OUTER JOIN Offer
ON P.id = Offer.product
LEFT OUTER JOIN Inventory AS I
ON P.id = I.prod_id
WHERE P.name LIKE '%$searchString%'
OR P.description LIKE '%$searchString&'";
$this->db->execute($sql);
$res = $this->db->fetchAll();
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function searchProduct($search)\n {\n $this->db->connect();\n $sql = \"SELECT * FROM $this->table WHERE name LIKE ? OR description LIKE ? OR category LIKE ?;\";\n $resultset = $this->db->executeFetchAll($sql, array_fill(0, 3, \"%\" . $search . \"%\"));\n return $resultset;\n }",
"public function ProductSearch() {\n\t\t\n\t\t$search_data \t\t=\tjson_decode($this->request->getContent(),true);\n\t\t$search_term\t\t=\t$search_data['search_term'];\n\t\t$seller_id\t\t\t=\t$search_data['seller_id'];\n\t\t\n\t\t$querydata \t\t= \t$this->_objectManager->create('Webkul\\Marketplace\\Model\\Product')\n\t\t\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t\t\t->addFieldToFilter(\n\t\t\t\t\t\t\t\t\t'seller_id',\n\t\t\t\t\t\t\t\t\t['eq' => $seller_id]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t->addFieldToFilter(\n\t\t\t\t\t\t\t\t\t'status',\n\t\t\t\t\t\t\t\t\t['eq' =>1]\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->addFieldToSelect('mageproduct_id')\n\t\t\t\t\t\t\t\t->setOrder('mageproduct_id');\n\t\t\t//return \t$querydata->getData();\t\t\t\t\n\t\t\t$collection = $this->_productCollectionFactory->create()->addAttributeToSelect(\n '*'\n );\n\t\t$collection->addAttributeToFilter('entity_id', array('in' => $querydata->getData()));\n\t\t$collection->addAttributeToFilter('name', array('like' => '%'.$search_term.'%'));\n\t\t\t\n\t\treturn $collection->getData();\n\t\t\t\n }",
"public function searchProduct(Request $request){\n\n $searchKey = $request->term;\n $products = farmproduct::where('productName','LIKE','%'.$searchKey.'%')->get();\n $result='';\n \n if(count($products)==0){\n $result[] = 'No matches found.';\n }else{\n foreach($products as $product){\n $result[] = $product->productName;\n }\n }\n return $result;\n }",
"function find_product_by_title($product_name){\n global $db;\n $p_name = remove_junk($db->escape($product_name));\n $sql = \"SELECT name FROM products WHERE name like '%$p_name%' LIMIT 5\";\n $result = find_by_sql($sql);\n return $result;\n }",
"function searchProduct($type,$input)\n {\n $products;\n switch($type)\n {\n case 0:\n $products=Product::search($input);\n break;\n case 1:\n $products=Product::searchByName($input);\n break;\n case 2:\n $products=Product::searchByGroup($input);\n break;\n case 3:\n $products=Product::searchBySupplier($input);\n break;\n case 4:\n $products=Product::searchByTag($input);\n break;\n case 5: $products=Product::searchByDescription($input);\n break;\n default:\n break;\n }\n if(!empty($products))\n {\n return $products;\n }else {\n return false;\n }\n }",
"public function product_by_search() {\n\n $CI = & get_instance();\n\n $this->auth->check_admin_auth();\n\n $CI->load->library('lproduct');\n\n $product_id = $this->input->post('product_id');\n\n\n\n $content = $CI->lproduct->product_search_list($product_id);\n\n $this->template->full_admin_html_view($content);\n\n }",
"function getProductsbySearch($Search){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn->prepare(\"\tSELECT * \n\t\t\t\t\t\t\t\t\tFROM `product` \n\t\t\t\t\t\t\t\t\tWHERE `name` LIKE ? OR \n\t\t\t\t\t\t\t\t\t`description` LIKE ? OR\n\t\t\t\t\t\t\t\t\t`large_description` LIKE ? AND `stock`>0\");\n\t\t$Search = '%'.$Search.'%';\n\t\t$Search = str_replace(\" \", \"%\", $Search);\n\t\t$sth \t-> execute(array($Search, $Search, $Search));\n\n\t\treturn \t$sth;\n\t}",
"public function product_by_search()\n\t{\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->library('lproduct');\n\t\t$product_id = $this->input->post('product_id');\t\t\n $content = $CI->lproduct->product_search_list($product_id);\n $sub_menu = array(\n\t\t\t\tarray('label'=> 'Manage Product', 'url' => 'Cproduct', 'class' =>'active'),\n\t\t\t\tarray('label'=> 'Add Product', 'url' => 'Cproduct/manage_product')\n\t\t\t);\n\t\t$this->template->full_admin_html_view($content,$sub_menu);\n\t}",
"public function searchAction()\n {\n //get the barcode, identifier and action for the product scanned or entered.\n $code = $this->getRequest()->getPost('input');\n $identifier = $this->getRequest()->getPost('identifier');\n\n Mage::log($identifier, null, 'identifier.log');\n\n if(isset($code) && !empty($identifier))\n {\n $product = Mage::getModel('barcodescanner/find')->findProduct($code, $identifier);\n } else {\n $product = \"Product not found, please try a different code\";\n }\n\n $this->getResponse()->setBody(json_encode($product));\n\n }",
"function find_all_product_info_by_title($title){\n global $db;\n $sql = \"SELECT * FROM products \";\n $sql .= \" WHERE name ='{$title}'\";\n $sql .=\" LIMIT 1\";\n return find_by_sql($sql);\n }",
"public function search_product(){\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->model('Orders');\n\t\t$product_name = $this->input->post('product_name');\n\t\t$category_id = $this->input->post('category_id');\n\t\t$product_search = $this->Orders->product_search($product_name,$category_id);\n if ($product_search) {\n foreach ($product_search as $product) {\n echo \"<div class=\\\"col-xs-6 col-sm-4 col-md-2 col-p-3\\\">\";\n echo \"<div class=\\\"panel panel-bd product-panel select_product\\\">\";\n echo \"<div class=\\\"panel-body\\\">\";\n echo \"<img src=\\\"$product->image_thumb\\\" class=\\\"img-responsive\\\" alt=\\\"\\\">\";\n echo \"<input type=\\\"hidden\\\" name=\\\"select_product_id\\\" class=\\\"select_product_id\\\" value='\".$product->product_id.\"'>\";\n echo \"</div>\";\n echo \"<div class=\\\"panel-footer\\\">$product->product_model - $product->product_name</div>\";\n echo \"</div>\";\n echo \"</div>\";\n \t}\n }else{\n \techo \"420\";\n }\n\t}",
"public function search($name)\n {\n return Item::where('title', 'like','%' .$name. '%')->orWhere('sku', 'like','%' .$name. '%')->orWhere('ebay_item_id', 'like','%' .$name. '%')->get();\n\n \n }",
"function find_products($keyword)\n{\n return get_products();\n}",
"public function search($query)\n {\n if(strlen($query) >= 1){\n $results = \\DB::select(\n \" select * from products where name like '%$query%'\"\n );\n $ids = [];\n foreach ($results as $result) {\n foreach($result as $key => $val){\n if($key == 'id'){\n array_push($ids, $val);\n }\n }\n }\n return Product::find($ids);\n }\n }",
"public function search($title=null)\n {\n\n // $products = QueryBuilder::for(Product::class)->allowedFilters(['title'])->get();\n\n $products = Product::where([\"title\"=>$title])->orWhere([\"description\"=>$title])->orWhere([\"type\"=>$title])->get();\n return view('show_products',['products'=>$products]);\n }",
"public function Search($search)\n\t{\n\t\t//$this->db->query(\"SELECT * FROM products WHERE description LIKE '%$search%' \");\n\t\t//$this->db->query(\" SELECT produceCode,description,productLine,supplier,quantityInStock,bulkBuyPrice,bulkSalePrice,Photo FROM products WHERE description LIKE '%$search%' \");\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}",
"public function searchitem($keyword){\n\t\t$this->db->like('ProductSearchKey', $keyword, 'BOTH');\n\t\t$this->db->or_like('ProductName', $keyword, 'BOTH');\n\t\t$this->db->select('Product_Id,ProductName,ProductAuther,ProductRetailPrice,ProductSellingPrice,ProductDiscount,ProductLanguage,ProductBinding,ProductThumbImage,CategoryName');\n\t\t$this->db->from('tbl_product_category');\n\t\t$this->db->join('tbl_products', 'tbl_product_category.Product_Id = tbl_products.ProductId', 'inner');\n\t\t$this->db->join('tbl_category', 'tbl_product_category.Category_Id = tbl_category.CategoryId', 'inner');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}",
"public function productSearch( $params = array() ) {\r\n\r\n return $this->Api( 'product-search', 'product-search', $params );\r\n\r\n }",
"public function getProductsWithName($name){\r\n\t\t$newQuery = \"SELECT * from products \".\r\n\t\t\t\t\" WHERE name LIKE '%\".$name.\"%'\";\r\n\t\t\r\n\t\treturn $GLOBALS['dbObj']->dbQuery($newQuery);\r\n\t}",
"public function searchItemById(){\n\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> ProductoDAO -> searchItemById());\n $res = $this -> Conexion -> extraer();\n $this -> idProducto = $res[0];\n $this -> nombre = $res[1];\n $this -> foto = $res[2];\n $this -> descripcion = $res[3];\n $this -> precio = $res[4];\n $this -> Conexion -> cerrar();\n }",
"function searchRecipe($text=false){\n\t\t$filter=false;\n\t\tif($text!=false){\n\t\t\t$filter=\"Name like '%$text%'\";\n\t\t}\n\t\t\n\t\treturn $this->getRecipe($filter);\n\t}",
"public function findProduct(\r\n $sku\r\n, $name = null\r\n, $skuMatchMode = 'IGNORE_DASH'\r\n, $baseSkuSearchFlag = true\r\n) { \r\n global $baseSkuAttributeId;\r\n\t$sku = str_replace('\\'', '', $sku);\r\n\t$sku = str_replace('\\\\', '', $sku);\r\n\t$sku = trim($sku, '()');\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\t$table = $resource->getTableName('catalog/product');\r\n $findResult = array('search_mask' => null, 'product_data' => array(), \r\n 'no_base_sku_count' => 0, 'base_sku_count' => 0\r\n );\r\n\t// try to match words\r\n\tif (strlen($sku) >=4) { \r\n if ($skuMatchMode == 'LEFT') { \r\n $findResult['search_mask'] = \" \" . $sku . \" %\";\r\n $searchExpression = \"concat(' ', sku, ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'LEFT_IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', \" \" . $sku . \" %\");\r\n $searchExpression = \"concat(' ', replace(sku, '-', ' '), ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'EXACT') { \r\n $findResult['search_mask'] = $sku;\r\n $searchExpression = \"sku = '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', $sku);\r\n $searchExpression = \"replace(sku, '-', ' ') = '\" . $findResult['search_mask'] . \"'\";\r\n } else {\r\n throw new Exception('Uknown skuMatchMode: \"' . $skuMatchMode . '\"');\r\n } \r\n $findResult['product_data'] = $readConnection->fetchAll(\r\n \"select entity_id as product_id, sku \r\n from \" . $table . \" p\r\n where \r\n -- website SKU is at the beginning\r\n \" . $searchExpression\r\n );\r\n if ($baseSkuSearchFlag) { \r\n // add base sku search\r\n if (!isset($baseSkuAttributeId)) {\r\n $baseSkuAttributeId = $readConnection->fetchOne(\r\n \"select attribute_id from eav_attribute where attribute_code = 'base_sku'\"\r\n );\r\n } \r\n $baseSkuResult = \r\n $readConnection->fetchAll( \r\n \"select \r\n entity_id as product_id\r\n , (select sku from catalog_product_entity p where p.entity_id = v.entity_id) as sku\r\n , value as base_sku\r\n from\r\n catalog_product_entity_varchar v\r\n where \r\n -- source sku is like (contains) base sku\r\n -- replace dashes with spaces\r\n ' \" . str_replace('-', ' ', $sku) . \" ' \r\n like concat('% ', replace(value, '-', ' '), ' %')\r\n and v.attribute_id = \" . $baseSkuAttributeId \r\n );\r\n $findResult['no_base_sku_count'] = count($findResult['product_data']); \r\n if (count($baseSkuResult) > 0) {\r\n $findResult['base_sku_count'] = count($baseSkuResult);\r\n $findResult['product_data'] = array_merge($findResult['product_data'], $baseSkuResult);\r\n $findResult['search_mask'] = $findResult['search_mask'] . \" && base_sku\";\r\n $this->logMessage('baseSkuResult: count=' . count($baseSkuResult));\r\n }\r\n }\r\n\t}\t\r\n\tif (!empty($name) && count($findResult['product_data']) == 0) { \r\n\t $words = explode(' ', strtr(trim($name), '-:', ' '));\r\n\t foreach ($words as $word) { \r\n\t\t$findResult = findProduct($word, null, $skuMatchMode, $baseSkuSearchFlag);\r\n\t\t// For name words allow only one match\r\n\t\tif (count($findResult['product_data']) == 1) { \r\n\t\t return $findResult;\r\n\t\t} \r\n\t } \r\n\t} \r\n\treturn $findResult;\r\n}",
"public function actionSearch()\n {\n $route = 'merchant.searchProduct';\n $request = new searchProductRequest();\n $request->setCustomerId($this->customer_id);\n $request->setAuthToken($this->auth_token);\n //$request->setKeyword('方便面');\n $request->setWholesalerId(3);\n $request->setPageSize(10);\n $request->setCategoryId(377);\n $request->setCategoryLevel(3);\n// $request->setBrand('百威;王老吉;');\n $result = Proxy::sendRequest($route, $request);\n $header = $result->getHeader();\n try{\n $body = searchProductResponse::parseFromString($result->getPackageBody());\n }catch (\\Exception $e){\n $body = null;\n }\n return $this->render('index',[\n 'request' => $request->toArray(),\n 'route' => $route,\n 'header' => $header,\n 'body' => $body\n ]);\n }",
"public function productSearch( $search ) {\n\t\tif ( Auth::user()->user_role != 1 ) {\n\t\t\treturn redirect( '/' );\n\t\t}\n\n\t\t$user = Product::where( \"product_name\", \"like\", \"%\" . $search . \"%\" )\n\t\t ->with( 'category' )->get();\n\n\t\t$data = array();\n\t\t$data['category'] = Category::get();\n\t\t$data['product'] = $user;\n\t\t//Basic Page Settings\n\n\t\t$data['search'] = $search;\n\t\t$data['title'] = 'All Product';\n\n\t\treturn view( 'product.list', $data );\n\t}",
"public function testSearchForProductByAttributeType()\n {\n // full results flag returns the full data set for the product\n }",
"public function search(Request $request){\n\n $this->validate($request, [\n 'query' =>'required|min:3',\n ]);\n\n\n \n \n $query = $request->input('query');\n\n $products = Product::where('pro_name','like',\"%$query%\")->get();\n\n return view('shop.index')->with('products',$products);\n }",
"function select_by_nameproduct($name_product= NULL, $slug_product= NULL) {\t\n\t\t$this->db->select('*'); \n\t\t$this->db->from($this->table_name);\n\t\t$this->db->join('ac_brand', 'ac_brand.id_brand = ac_product.id_brand','left');\n\t\t$this->db->where(array('name_product'=>$name_product));\n\t\t$this->db->or_where(array('slug_product'=>$name_product));\n\t\t$query = $this->db->get();\n\t\treturn $query ->row();\n\t}",
"public function action_search() {\n\t\t$productIds = explode('/', $this->request->param('id'));\n\t\t\n\t\t$products = ORM::factory('product')->where('product_id', 'in', $productIds)->find_all();\n\t\t\n\t\t$view = View::factory('product/search');\n\t\t$view->set('products', $products);\n\t\t$this->template->set('content', $view);\n\t}",
"public function search(Request $r){\n\n $keyword = $r->keyword;\n\n $products = Product::where('name', 'LIKE', '%' . $keyword . '%')->limit(24)->get();\n\n\n $seo_data = array(\n 'title' => $keyword, \n 'tag' => \"search,\".$keyword, \n 'description' => \"shop page\", \n );\n\n \n\n return view('public.product.search',compact('products','seo_data'));\n}",
"public function searchProduct(){\n if($this->checkKeyWord() === false && $this->searchOrNoSearch == 0) return array();\n $this->check_branch();\n $andWhere = '';\n if($this->active == 0) $andWhere .= ' AND usp_active = 0';\n else $andWhere .= ' AND usp_active = 1';\n if($this->checkKeyWord() && $this->searchOrNoSearch == 0){\n if($this->class_import_export->detect_barcode($this->keyword)){\n if($this->class_import_export->detect_me_barcode($this->keyword)) $andWhere .= \" AND usp_me_barcode LIKE '%\".$this->keyword.\"%'\";\n else $andWhere .= \" AND usp_barcode LIKE '%\".$this->keyword.\"%'\";\n }else{\n $andWhere .= \" AND usp_pro_name LIKE '%\".$this->keyword.\"%'\";\n }\n }\n $sql_search = \"SELECT * FROM \".USER_PRODUCTS.\"\n WHERE usp_branch_id = \" . $this->branch_id . \"\n AND usp_use_child_id = \".$this->use_id.\"\n AND usp_use_parent_id = \" . $this->admim_id .$andWhere;\n $db_query = new db_query($sql_search);\n return $db_query->resultArray();\n }",
"public function getProductsBySearch ($search) {\n \n $words = explode(' ', $search);\n $regex = implode('|', $words);\n \n $errorCode = 0;\n\t\t$errorMessage = \"\";\n \n if (!empty($search)) {\n \n try {\n\n $query = \"SELECT ea_product.id, upc, brand, product_name, \n product_description, avg_price, ea_category.name\n FROM ea_product, ea_category\n WHERE ea_product.category_id = ea_category.id\n AND ( product_name REGEXP '{$regex}'\n OR brand REGEXP '{$regex}'\n OR upc REGEXP '{$regex}'\n OR ea_category.name REGEXP '{$regex}' )\n ORDER BY avg_price\";\n //print(\"$query\");\n foreach($this->dbo->query($query) as $row) {\n $id = stripslashes($row[0]);\n $upc = strval(stripslashes($row[1]));\n $brand = $this->convertFancyQuotes(stripslashes($row[2]));\n $product_name = $this->convertFancyQuotes(stripslashes($row[3]));\n $product_description = $this->convertFancyQuotes(stripslashes($row[4]));\n $avg_price = stripslashes($row[5]);\n $category_name = $this->convertFancyQuotes(stripslashes($row[6]));\n\n $product[\"id\"] = $id;\n $product[\"upc\"] = $upc;\n $product[\"brand\"] = $brand;\n $product[\"product_name\"] = $product_name;\n $product[\"product_description\"] = $product_description;\n $product[\"avg_price\"] = $avg_price;\n $product[\"category_name\"] = $category_name;\n\n $product[\"image_path\"] = $this->getImagePath($upc);\n\n $products[] = $product;\n }\n\n } catch (PDOException $e) {\n $this->errorCode = 1;\n $errorCode = -1;\n $errorMessage = \"PDOException for getProductsBySearch.\";\n }\t\n \n } else {\n $errorCode = 1;\n\t\t\t$errorMessage = \"No Search value provided.\";\n }\n \n\t\t$error[\"id\"] = $errorCode;\n\t\t$error[\"message\"] = $errorMessage;\n\t\t\n\t\t$data[\"error\"] = $error;\n\t\t\n\t\t$data[\"search\"] = $search;\n $data[\"query\"] = $query;\n \n $data[\"products\"] = $products;\n\n $data = json_encode($data);\n \n\t\treturn $data;\n \n }",
"public function search($input) {\r\n $con = database::connectDB();\r\n $query = \"select * \"\r\n . \"from tbl_product pr \"\r\n . \"INNER JOIN tbl_categories cate on pr.CATE_id = cate.CATE_id\"\r\n . \"where \"\r\n . \"pr.PRODUCT_id LIKE '%\" . $input . \"%' OR pr.PRODUCT_name LIKE '%\" . $input . \"%'\"\r\n . \"OR cate.CATE_name LIKE '%\" . $input . \"%'\";\r\n $result = mysqli_query($con, $query);\r\n database::close();\r\n\r\n return $result;\r\n }",
"public function searchProduct(Request $request){\n\n //dd($request->input('query'));\n $product = Product::\n where('descripcion' , 'like', $request->input('query') . '%')\n ->select(['id', \\DB::raw('SUBSTRING(descripcion, 1, 80) descripcion'), \\DB::raw('precio_venta precio'), 'stock'])->take(20)->get();\n\n return response()->json([\n 'data' => $product\n ]);\n }",
"public function searchRepeatedProduct($name) {\n $stmt = $this->db->prepare(\"select * from product where title = :title;\");\n $stmt->bindValue(\"title\", $name, PDO::PARAM_STR);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function getSearch()\n {\n $products = $this->product->getExecuteFormSearch();\n $products->load('variants', 'brand');\n\n $this->theme->breadcrumb()->add('Product Search Result', URL::to('products/search'));\n $this->theme->setTitle('Product Search Result');\n\n $view_data = compact('products');\n\n return $this->theme->of('products.search', $view_data)->render();\n }",
"public function showAction($name,$description)\n {\n \n \n\n $repository = $this->getDoctrine()\n ->getRepository('DiegoStoreBundle:Product');\n\n\n $product = $repository->findOneBy(\n array('name' => $name,'description' => $description)\n );\n \n\n if (!$product) {\n throw $this->createNotFoundException(\n 'Producto no encontrado'\n );\n }\n\n return new Response('Nombre del producto '.$product->getName());\n }",
"function getSearchTerms(ProductInterface $product);",
"public function searchProducts()\n {\n if (! array_key_exists('Query', $this->options)) {\n $this->log('Search Query must be set in order to search for a query!', 'Warning');\n\n return false;\n }\n\n $url = $this->urlbase.$this->urlbranch;\n\n $query = $this->genQuery();\n\n if ($this->mockMode) {\n $xml = $this->fetchMockFile();\n } else {\n $response = $this->sendRequest($url, ['Post' => $query]);\n\n if (! $this->checkResponse($response)) {\n return false;\n }\n\n $xml = simplexml_load_string($response['body']);\n }\n\n $this->parseXML($xml);\n }",
"public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }",
"public function testSearchForProductByAttribute()\n {\n // full results flag returns the full data set for the product\n }",
"public function it_search_a_product_that_exits()\n {\n $response = $this->json('GET', '/compraproducto', ['product_code'=>'1','product_cant' => '355']);\n $response->assertViewIs('CompraProducto');\n $response->assertSee('Resultados de Compra');\n $response->assertSee('Cristian Keebler');\n $response->assertSuccessful();\n }",
"public function getMatchingProduct($request);",
"public function searchProduct(Request $request){\n\n $search = $request->search;\n\n if($search==null){\n // If the search field is empty, take all products\n $products = DB::table('products')->paginate(6);\n } else {\n $products = DB::table('products')->where('name', 'LIKE', \"%\".$search.\"%\")->paginate(6);\n }\n\n return view('allproducts', ['products' => $products]);\n }",
"function add_product_to_search_index($product_id)\n\t{\n\t\t$product =& model::create('product');\n\t\t\t\t\n\t\tif(!$product->find($product_id))\n\t\t\treturn false;\n\t\t\n\t\tforeach($this->_indexed_fields['product'] as $field)\n\t\t{\n\t\t\t$string_to_index \t= $product->$field;\n\t\t\t$string_weight \t\t= $this->_search_weights['product'][$field];\n\t\t\t\n\t\t\t//Sanitize input\n\t\t\t$sanitized_string \t= $this->get_sanitized_search_query($string_to_index);\t\n\t\t\n\t\t\t//Split string into keywords\n\t\t\t$keywords \t\t\t= explode(\" \",$sanitized_string);\n\t\t\t\n\t\t\t//Remove unneccessary keywords\n\t\t\t$clean_keywords \t= $this->remove_ignored_keywords_from_array($keywords);\n\t\t\t\n\t\t\t//Group keywords and count frequency of occurance\n\t\t\t$keywords_with_frequencies = array_count_values($clean_keywords);\n\t\t\t\n\t\t\tforeach($keywords_with_frequencies as $keyword => $frequency)\n\t\t\t\t$this->_index_keyword($keyword, $product->id, $frequency * $string_weight);\n\t\t}\n\t}",
"public function productsearch($sellerid,$name,$userid)\n\t {\n\t\t \n\t\t $result4='';\n\t\t\t\t if($name!='')\n\t\t\t\t {\n\t\t\t\t\t $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t\t\t $products = $objectManager->create('Magento\\Catalog\\Model\\ProductFactory')\n\t\t\t\t ->create()\n\t\t\t\t\t\t\t\t\t ->getCollection()\n\t\t\t\t\t\t\t\t\t// ->addFieldToFilter('store_id', 1); \n ->addFieldToFilter('name', array(\"like\"=>'%'.$name.'%') );\t\t\t\t\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t //var_dump($products->getData());\n\t\t\t\t if(!empty($products->getData())):\n\t\t\t\t foreach($products as $product)\n\t\t\t\t {\n $productId =$product->getId();\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t\t\t\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t\t\t\t\t$connection = $resource->getConnection();\n\t\t\t\t\t\t$quote_sql = \"Select * FROM marketplace_product where mageproduct_id=$productId and seller_id=$sellerid \";\n\t\t\t\t\t\t$result_result = $connection->fetchAll($quote_sql);\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\tif(!empty($result_result))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$currentproduct = $objectManager->create('Magento\\Catalog\\Model\\Product')->load($productId);\n\t\t\t\t\t\t\t\t\t\t$offfer_tag = $currentproduct->getData('offfer_tag');\n\t\t\t\t\t\t\t\t\t\t$attr = $currentproduct->getResource()->getAttribute('offfer_tag'); \t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$optionText =$attr->getSource()->getOptionText($offfer_tag);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif($optionText=='')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t $optionText='null';\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 $_price=$currentproduct->getPrice();\n\t\t\t\t\t\t\t\t\t $_finalPrice=$currentproduct->getFinalPrice();\n\t\t\t\t\t\t\t\t\t $savetag='null';\n\t\t\t\t\t\t\t\t\t\tif($_finalPrice < $_price):\n\t\t\t\t\t\t\t\t\t\t$_savePercent = 100 - round(($_finalPrice / $_price)*100);\n\t\t\t\t\t\t\t\t\t\t//echo $_savePercent;\n\t\t\t\t\t\t\t\t\t\t$savetag=$_savePercent;\n\t\t\t\t\t\t\t\t\t endif;\n\n\t\t\t\t\t\t\t\t $producturl=$currentproduct->getProductUrl();\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 $wishlisttag='';\n\t\t\t\t\t\t\t\t\t\t\tif($userid > 0)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t $wishlist = \"Select * FROM wishlist a,wishlist_item b where a.customer_id=$userid and a.wishlist_id=b.wishlist_id and b.product_id=$productId\";\n\t\t\t\t\t\t\t\t\t\t\t $result_wishlist = $connection->fetchAll($wishlist);\n\t\t\t\t\t\t\t\t\t\t\tif(!empty($result_wishlist))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$wishlisttag=1;\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$wishlisttag=0;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t$wishlisttag=0;\n\t\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t $reviewFactory = $objectManager->create('Magento\\Review\\Model\\Review');\n\t\t\t\t\t\t\t\t\t\t $storeId = $this->storeManager->getStore()->getId();\n\t\t\t\t\t\t\t\t\t\t $reviewFactory->getEntitySummary($currentproduct, $storeId);\n\t\t\t\t\t\t\t\t\t\t $ratingSummary = $currentproduct->getRatingSummary()->getRatingSummary();\n\t\t\t\t\t\t\t\t\t\t if($ratingSummary=='')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$ratingSummary='null';\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 \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 \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t$result4[]=array(\"id\"=>$currentproduct->getId(),\"name\"=>$currentproduct->getName(),\"description\"=>$currentproduct->getDescription(),\"price\"=>$currentproduct->getPrice(),\"finalPrice\"=>$currentproduct->getFinalPrice(),\"thumbnail\"=>'http://159.203.151.92/pub/media/catalog/product'.$currentproduct->getthumbnail(),\"offferTag\"=>array(\"shareurl\"=>$producturl,\"Tag\"=>$optionText,'discount'=>$savetag,'rating'=>$ratingSummary),'wishlisttag'=>$wishlisttag);\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\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'product'=>$result4);\n\t\t return $result; \n else:\n \t\t\t\t \n\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'product'=>'No result found!');\n\t\t return $result; \n\t\t\t\t \n\t\t\t\t endif;\n \n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t \n\t\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t\t\t\t return $result; \n\t\t\t\t }\n\t\t\t\t \n\t }",
"public static function searchProduct($keyword) {\n\t\n\t\t$data = Doctrine_Query::create()->select('g.name as name')\n\t\t->from(\"airport g\")\n\t\t->andWhere(\"g.name LIKE ?\", \"%$keyword%\")\n\t\t->orderBy(\"g.name ASC\")\n\t\t->limit(5)\n\t\t->fetchArray();\n\n\t\treturn $data;\n\t}",
"function getSearch($id){\n\t\t\t\t$Q = $this->db->query(\"SELECT product. * , product_type.type_name\n\t\t\t\tFROM product\n\t\t\t\tJOIN product_type ON product_type.product_type_id = product.product_type_id \n\t\t\t\tWHERE product_type.type_name LIKE '%\".$id.\"%'\n\t\t\t\tOR product.product_id LIKE '%\".$id.\"%'\n\t\t\t\tOR product.price LIKE '%\".$id.\"%'\n\t\t\t\tOR product.product_name LIKE '%\".$id.\"%'\");\n\t\t\t\treturn $Q->result_array();\t\t\n\t\t }",
"public function search($productKey){\n\t\tif(!array_key_exists($productKey,$this->products)){\n\t\t\tthrow new \\Exception('Product do not exists!');\n\t\t}\n\t\treturn $this->products[$productKey];\n\t}",
"function searchRelated($productName)\n{\n // TODO: 1. try use doM\n // TODO: 2. try implement getOrElse\n return checkRelatedInCache($productName)\n ->bind(function (Maybe\\Maybe $products) use ($productName) {\n switch (get_class($products)) {\n case Maybe\\Just::class:\n return S\\value($products->extract());\n case Maybe\\Nothing::class:\n return retrieveRelated($productName);\n }\n });\n}",
"public function autocompletesearch($sellerid,$name)\n\t {\n\t\t \n\t\t $result4='';\n\t\t\t\t if($name!='')\n\t\t\t\t {\n\t\t\t\t\t $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t\t\t $products = $objectManager->create('Magento\\Catalog\\Model\\ProductFactory')\n\t\t\t\t ->create()\n\t\t\t\t\t\t\t\t\t ->getCollection()\n\t\t\t\t\t\t\t\t\t//->addFieldToFilter('store_id', 1)\n ->addFieldToFilter('name', array(\"like\"=>'%'.$name.'%') );\t\t\t\t\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t //echo \"<pr>\";var_dump($products->getData()); \n\t\t\t\t if(!empty($products->getData())):\n\t\t\t\t foreach($products as $product)\n\t\t\t\t {\n $productId =$product->getId();\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t\t\t\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t\t\t\t\t$connection = $resource->getConnection();\n\t\t\t\t\t\t $quote_sql = \"Select * FROM marketplace_product where mageproduct_id=$productId and seller_id=$sellerid \";\n\t\t\t\t\t\t$result_result = $connection->fetchAll($quote_sql);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($result_result))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$currentproduct = $objectManager->create('Magento\\Catalog\\Model\\Product')->load($productId);\n //echo\"<pre>\";print_r($currentproduct->getData());\n\t\t\t\t\t\t$cats = $currentproduct->getCategoryIds();\n\t\t\t\t\t\t$c=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$categoryname='';\n\t\t\t\t\t\t$categoryId='';\n\t\t\t\t\t\t foreach ($cats as $categoryIds) {\n\t\t\t\t\t\t\tif($categoryIds!=2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($c<1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t//$currentcategory = $objectManager->create('Magento\\Catalog\\Model\\category')->load($categoryIds);\n\t\t\t\t\t\t //$sami=$categoryIds;\n\t\t\t\t\t\t\t //$currentcategory = $objectManager->create('Magento\\Catalog\\Model\\category')->load($sami);\n\t\t\t\t\t\t\t// $categoryname=$currentcategory->getName();\n\t\t\t\t\t\t\t//$categoryId = 3;\n\t\t\t\t\t\t\t$categoryId =$categoryIds;\n\t\t\t\t\t\t\t$_objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t\t\t\t\t\t$object_manager = $_objectManager->create('Magento\\Catalog\\Model\\Category')\n\t\t\t\t\t\t\t->load($categoryId);\n\t\t\t\t\t\t\t//print_r($object_manager->getData());\n\t\t\t\t\t\t\t$categoryname=$object_manager->getName();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$c++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\t$producturl=$currentproduct->getProductUrl();\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t//$result4[]=array(\"id\"=>$currentproduct->getId(),\"name\"=>$currentproduct->getName(),\"categoryName\"=>$currentcategory->getName());\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$result4[]=array(\"id\"=>$currentproduct->getId(),\"name\"=>$currentproduct->getName(),\"categoryName\"=>$categoryname,\"categoryid\"=>$categoryId,\"urltag\"=>$name);\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'product'=>$result4);\n\t\t return $result; \n else:\n \t\t\t\t \n\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'product'=>'No result found!');\n\t\t return $result; \n\t\t\t\t \n\t\t\t\t endif;\n \n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t \n\t\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t\t\t\t return $result; \n\t\t\t\t }\n\t\t\t\t \n\t }",
"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\tif(isset($this->searchText) && !empty($this->searchText))\n\t\t{\n\t\t\t$this->productId = $this->searchText;\n\t\t\t$this->supplierId = $this->searchText;\n\t\t\t$this->brandId = $this->searchText;\n\t\t\t$this->brandModelId = $this->searchText;\n\t\t\t$this->categoryId = $this->searchText;\n\t\t\t$this->categoryId2 = $this->searchText;\n\t\t\t$this->code = $this->searchText;\n\t\t\t$this->name = $this->searchText;\n\t\t\t$this->isbn = $this->searchText;\n\t\t\t$this->sku = $this->searchText;\n\t\t\t$this->upc = $this->searchText;\n\t\t\t$this->location = $this->searchText;\n\t\t\t$this->quantity = $this->searchText;\n\t\t\t$this->productUnits = $this->searchText;\n\t\t\t$this->stockStatusId = $this->searchText;\n\t\t\t$this->image = $this->searchText;\n\t\t\t$this->shipping = $this->searchText;\n\t\t\t$this->price = $this->searchText;\n\t\t\t$this->priceGroupId = $this->searchText;\n\t\t\t$this->points = $this->searchText;\n\t\t\t$this->taxClassId = $this->searchText;\n\t\t\t$this->dateAvailable = $this->searchText;\n\t\t\t$this->weight = $this->searchText;\n\t\t\t$this->length = $this->searchText;\n\t\t\t$this->width = $this->searchText;\n\t\t\t$this->height = $this->searchText;\n\t\t\t$this->dimensionUnits = $this->searchText;\n\t\t\t$this->metricUnits = $this->searchText;\n\t\t\t$this->subtract = $this->searchText;\n\t\t\t$this->minimum = $this->searchText;\n\t\t\t$this->sortOrder = $this->searchText;\n\t\t\t$this->status = $this->searchText;\n\t\t\t$this->createDateTime = $this->searchText;\n\t\t\t$this->updateDateTime = $this->searchText;\n\t\t\t$this->viewed = $this->searchText;\n\t\t\t$this->marginId = $this->searchText;\n\t\t\t$this->description = $this->searchText;\n\t\t}\n\n\t\t$criteria->compare('productId',$this->productId,true, 'OR');\n\t\t$criteria->compare('supplierId',$this->supplierId,true, 'OR');\n\t\t$criteria->compare('brandId',$this->brandId,true, 'OR');\n\t\t$criteria->compare('brandModelId',$this->brandModelId,true, 'OR');\n\t\t$criteria->compare('categoryId',$this->categoryId,true, 'OR');\n\t\t$criteria->compare('categoryId2',$this->categoryId2,true, 'OR');\n\t\t$criteria->compare('code',$this->code,true, 'OR');\n\t\t$criteria->compare('name',$this->name,true, 'OR');\n\t\t$criteria->compare('isbn',$this->isbn,true, 'OR');\n\t\t$criteria->compare('sku',$this->sku,true, 'OR');\n\t\t$criteria->compare('upc',$this->upc,true, 'OR');\n\t\t$criteria->compare('location',$this->location,true, 'OR');\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('productUnits',$this->productUnits,true, 'OR');\n\t\t$criteria->compare('stockStatusId',$this->stockStatusId);\n\t\t$criteria->compare('image',$this->image,true, 'OR');\n\t\t$criteria->compare('shipping',$this->shipping);\n\t\t$criteria->compare('price',$this->price,true, 'OR');\n\t\t$criteria->compare('priceGroupId',$this->priceGroupId,true, 'OR');\n\t\t$criteria->compare('points',$this->points,true, 'OR');\n\t\t$criteria->compare('taxClassId',$this->taxClassId,true, 'OR');\n\t\t$criteria->compare('dateAvailable',$this->dateAvailable,true, 'OR');\n\t\t$criteria->compare('weight',$this->weight,true, 'OR');\n\t\t$criteria->compare('length',$this->length,true, 'OR');\n\t\t$criteria->compare('width',$this->width,true, 'OR');\n\t\t$criteria->compare('height',$this->height,true, 'OR');\n\t\t$criteria->compare('dimensionUnits',$this->dimensionUnits,true, 'OR');\n\t\t$criteria->compare('metricUnits',$this->metricUnits,true, 'OR');\n\t\t$criteria->compare('subtract',$this->subtract);\n\t\t$criteria->compare('minimum',$this->minimum,true, 'OR');\n\t\t$criteria->compare('sortOrder',$this->sortOrder);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('createDateTime',$this->createDateTime,true, 'OR');\n\t\t$criteria->compare('updateDateTime',$this->updateDateTime,true, 'OR');\n\t\t$criteria->compare('viewed',$this->viewed,true, 'OR');\n\t\t$criteria->compare('marginId',$this->marginId,true, 'OR');\n\t\t$criteria->compare('description',$this->description,true, 'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n if ( ! $this->isInstalledAndEnabled()) {\n return $this;\n }\n\n foreach ($this->products() as $product) {\n // Make this result more relevant, if the query is found in the title\n $relevance = mb_stripos($product->title, $this->query) === false ? 1 : 2;\n\n $result = new Result($this->query, $relevance);\n $result->title = $product->title;\n $result->text = $product->intro;\n $result->url = $this->getUrl($product);\n $result->thumb = $this->getThumb($product->images);\n $result->model = $product;\n\n $this->addResult($result);\n }\n\n return $this;\n }",
"public function findByTitle($searchQuery) {\n\t\t if ($this->identityMap->hasIdentifier($searchQuery, $this->objectType)) {\n\t\t $object = $this->identityMap->getObjectByIdentifier($searchQuery, $this->objectType);\n\t\t } else {\n\t\t $query = $this->createQuery();\n\t\t $query->getQuerySettings()->setRespectSysLanguage(FALSE);\n\t\t $query->getQuerySettings()->setRespectStoragePage(FALSE);\n\t\t // Suchstring kann überall im Wort vorkommen, daher den String wrappen mit %\n\t\t $searchQuery = '%'.$searchQuery.'%';\n\t\t $object = $query->matching($query->like('product_title', $searchQuery))->execute();\n\t\t }\n\t\t return $object;\n\t}",
"function searchProductByName($keyword){\n //$regex=\"^(?=.*?(std|8))(?=.*?(std|8)).*$\";\n //$where='MATCH(prod_name) AGAINST(\"'.$keyword.'\" IN BOOLEAN MODE)';\n $this->db->select('*');\n $this->db->from('cld_products');\n $this->db->like('prod_name',$keyword);\n //$this->db->where($where);\n //$this->db->like('prod_name',$regex);\n $this->db->where('user_id',$this->session->userdata['logged_in']['id']);\n //$this->db->order_by($where,'DESc');\n \n $query=$this->db->get();\n \n return $query->result_array();\n }",
"function searchDescription($description){\n\t\t//Connect to database. Include db_password.php with your MySQL or MariaDB credentials\n\t\n\t\ttry{\n\t\t\tif(!isset($pdo)){\n\t\t\t\t$pdo = new PDO('mysql:host=127.0.0.1;dbname=auction_site_db', $GLOBALS[\"user\"], $GLOBALS[\"pass\"]); //$user, $pass);\n\t\t\t}\n\t\t\t\n\t\t\t$queryString = 'SELECT * FROM AuctionItems WHERE itemDescription LIKE :itemDescription'; //= :itemName'; \n\t\t\t//$queryString = \"SELECT * FROM AuctionItems\"; //for debugging\n\t\t\t\n\t\t\t$query = $pdo->prepare($queryString);\n\t\t\t\n\t\t\t//take name variable, add SQL wildcards to find more results\n\t\t\t//$wildcard = \"%\";\n\t\t\t//$iName = {$wildcard}{$GLOBALS[\"name\"]}{$wildcard};\n\t\t\t//print_r($iName);\n\t\t\t//$name = \"fdfd\";\n\t\t\t\n\t\t\t$query->execute(array(':itemDescription' => $description));//$GLOBALS[\"name\"]));\t//$name));\n\t\t\t$query_result = $query->fetchAll(PDO::FETCH_BOTH);\n\t\t\t\n\t\t\tif($query_result){\n\t\t\t\t//echo json_encode(array_values($query_result));\n\t\t\t\treturn json_encode(array_values($query_result));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//echo \"No match was found\";\n\t\t\t\t//echo json_encode(array_values([\"itemName\"=>\"failed\", \"itemDescription\"=>\"db query\", \"itemPrice\"=>\"match\"]));\n\t\t\t}\n\t\t\t\n\t\t\t//make everything null so it closes the db connection\n\t\t\t$query = null; \n\t\t\t$pdo = null;\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\t//echo json_encode(array_values([\"itemName\"=>\"failed\", \"itemDescription\"=>\"db query\", \"itemPrice\"=>\"match\"]));\n\t\t\tdie();\n\t\t}\n\t\n\t}",
"public function getByName($name)\n {\n $params = array('term' => $name);\n return $this->curl->get('products/find', $params);\n }",
"public function search(Request $request)\n {\n\n $name = trim($request->name);\n $type = trim($request->type);\n $published = trim($request->published);\n $products_builder = Product::where('is_deleted', false)\n ->where(function ($query) use ($name) {\n if ($name != null) {\n $query->where('name', 'like', '%' . $name . '%');\n }\n })->where(function ($query) use ($type) {\n if ($type != null) {\n $query->where('type', 'like', '%' . $type . '%');\n }\n })->where(function ($query) use ($published) {\n if ($published != null) {\n $query->where('published', $published);\n }\n });\n if ($request->per_page == \"all\") {\n $products = $products_builder->get();\n } else {\n $products = $products_builder->paginate(env('PAGE_COUNT'));\n }\n return (new ProductCollection($products))->additional([\n 'errors' => null,\n ])->response()->setStatusCode(200);\n }",
"public static function find($search) {\n global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image;\n\n $Qproducts = $lC_Database->query('select SQL_CALC_FOUND_ROWS p.*, pd.products_name, pd.products_description, pd.products_keyword from :table_products p, :table_products_description pd where p.parent_id = 0 and p.products_id = pd.products_id and pd.language_id = :language_id');\n\n $Qproducts->appendQuery('and (pd.products_name like :products_name or pd.products_keyword like :products_keyword) order by pd.products_name');\n $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);\n $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);\n $Qproducts->bindInt(':language_id', $lC_Language->getID());\n $Qproducts->bindValue(':products_name', '%' . $search . '%');\n $Qproducts->bindValue(':products_keyword', '%' . $search . '%');\n\n $Qproducts->execute();\n\n $cnt = 0;\n $result = '<table id=\"liveSearchTable\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" onMouseover=\"bgcolor:#cccccc;\">';\n while ( $Qproducts->next() ) {\n if ($Qproducts->valueInt('products_status') > -1) {\n $price = $lC_Currencies->format($Qproducts->value('products_price'));\n //$products_status = ($Qproducts->valueInt('products_status') === 1);\n $products_status = ($Qproducts->valueInt('products_status'));\n $products_quantity = $Qproducts->valueInt('products_quantity');\n $products_name = $Qproducts->value('products_name');\n $products_description = $Qproducts->value('products_description');\n $products_keyword = $Qproducts->value('products_keyword');\n\n if ( $Qproducts->valueInt('has_children') === 1 ) {\n $Qvariants = $lC_Database->query('select min(products_price) as min_price, max(products_price) as max_price, sum(products_quantity) as total_quantity, min(products_status) as products_status from :table_products where parent_id = :parent_id');\n $Qvariants->bindTable(':table_products', TABLE_PRODUCTS);\n $Qvariants->bindInt(':parent_id', $Qproducts->valueInt('products_id'));\n $Qvariants->execute();\n\n $products_status = ($Qvariants->valueInt('products_status') === 1);\n $products_quantity = '(' . $Qvariants->valueInt('total_quantity') . ')';\n\n $price = $lC_Currencies->format($Qvariants->value('min_price'));\n\n if ( $Qvariants->value('min_price') != $Qvariants->value('max_price') ) {\n $price .= ' - ' . $lC_Currencies->format($Qvariants->value('max_price'));\n }\n }\n\n $Qimage = $lC_Database->query(\"select image from :table_products_images where products_id = '\" . $Qproducts->valueInt('products_id') . \"'\");\n $Qimage->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);\n $Qimage->execute();\n\n $products_image = $Qimage->value('image');\n $products_link = lc_href_link(FILENAME_PRODUCTS, $products_keyword);\n\n $rowClass = ($cnt & 1) ? 'liveSearchRowOdd' : 'liveSearchRowEven';\n $result .= '<tr onclick=\"window.location=\\'' . $products_link . '\\';\" class=\"' . $rowClass . '\"><td valign=\"top\">' .\n ' <ol class=\"liveSearchListing\">' .\n ' <li>' .\n ' <span class=\"liveSearchListingSpan\" style=\"width: ' . $lC_Image->getWidth('mini') . 'px;\">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $products_keyword), $lC_Image->show($products_image, $products_name, null, 'mini')) . '</span>' .\n ' <div class=\"liveSearchListingDiv\">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $products_keyword), $products_name) . '</div>' .\n ' <div class=\"liveSearchListingPrice\">' . $price . '</div>' .\n ' <div style=\"clear: both;\"></div>' .\n ' </li>' .\n ' </ol>' .\n '</td></tr></a>';\n $cnt++;\n }\n }\n $result .= '</table>';\n\n $Qproducts->freeResult();\n\n return $result;\n }",
"public function index($productId, Request $request)\n {\n return Description::ofProduct($productId)\n ->withKeyword($request->input('keyword'))\n ->paginate(15);\n }",
"public function search(SearchProducts $searchProducts, $kind, $param1, $param2)\n {\n return $searchProducts->search($kind, $param1, $param2);\n }",
"public static function findByName($name)\n {\n // realiza la busqueda de todos los identificadores de productos que \n // tengan un nombre similar al dado (via SQL LIKE)\n $ids = \\database\\DAOFactory::getDAO(\"product\")->query(\n \"SELECT idProducto FROM PRODUCTO WHERE nombre LIKE ?\",\n \"%\" . $name . \"%\");\n if (!$ids || !is_array($ids)) return array();\n\n // genera un array de objetos Product creandolos con los \n // identificadores anteriores y llamando a fill() para recuperar todos \n // sus datos\n $found = array();\n foreach ($ids as $id) {\n $product = new Product($id[\"idProducto\"]);\n if (!$product->fill()) break;\n $found[ ] = $product;\n }\n\n return $found;\n }",
"public function actionIndex()\n {\n// $searchModel = new ProductSearch();\n// $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $products = ProductGoods::find()\n// ->where([\n// 'status' => ProductGoods::STATUS_ACTIVE\n// ])\n ->andWhere([\n 'like','name',Yii::$app->request->post('name','')\n ])->all();\n\n return $this->render('index', [\n 'products' => $products,\n// 'searchModel' => $searchModel,\n// 'dataProvider' => $dataProvider,\n ]);\n }",
"public function modelReadSearchProductName($key,$recordPerPage){\n\t\t\t//lay bien p truyen tu url\n\t\t\t$p = isset($_GET[\"p\"]) && is_numeric($_GET[\"p\"]) && $_GET[\"p\"] > 0 ? ($_GET[\"p\"]-1) : 0;\t\t\t\n\t\t\t//lay tu ban ghi nao\n\t\t\t$from = $p * $recordPerPage;\n\t\t\t//---\n\t\t\t//lay bien ket noi csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van\n\t\t\t$query = $conn->query(\"SELECT * FROM products WHERE MATCH name against('$key' IN NATURAL LANGUAGE MODE) order by id desc limit $from,$recordPerPage\");\n\t\t\t//lay toan bo ket qua tra ve\n\t\t\t$result = $query->fetchAll();\t\t\t\n\t\t\t//---\n\t\t\treturn $result;\n\t\t}",
"public function SearchProduct(Request $request)\n {\n $name = $request->name;\n $price = $request->price;\n \n $category= $request->category;\n $brand= $request->brand;\n \n $listSearch = DB::table('products');\n if (!empty($name))\n {\n\n $listSearch->where('name','LIKE','%'.$name.'%');\n } \n \n if (!empty($price))\n {\n $price_ex= explode(\"-\", $price );\n $min_price= $price_ex[0];\n $max_price= $price_ex[1];\n \n $listSearch->whereBetween('price',[$min_price , $max_price]);\n }\n if (!empty($category))\n {\n $listSearch->where('category', $category);\n }\n if (!empty($category))\n {\n $listSearch->where('category', $category);\n }\n if (!empty($brand))\n {\n $listSearch->where('brand', $brand);\n }\n $listSearch = $listSearch->get()->toArray();\n \n return view('frontend\\search\\search_product',compact('listSearch'));\n \n }",
"public function getMatchingProductForId($request);",
"public function search(SearchRequest $request)\n {\n $input = $request->input();\n $data['exactmatch'] = true;\n $search = '%'.$input['phrase'].'%';\n $data['phrase'] = $input['phrase'];\n $data['products'] = Product::where('p_id', 'LIKE', $search)->orwhere('p_name', 'LIKE', $search)->get()->toArray();\n\n if (empty($data['products'])){\n $data['products'] = $this->subSearch($search);\n $data['exactmatch'] = false;\n }\n\n\n return view('products.search', $data);\n\n }",
"public function getMatchProducts($name){\n\n\t\t$results = $this->db->query(\"SELECT DISTINCT pd.product_id,pd.name,cp2p.customer_id FROM \".DB_PREFIX.\"product_description pd LEFT JOIN \".DB_PREFIX.\"customerpartner_to_product cp2p ON (cp2p.product_id = pd.product_id) LEFT JOIN \".DB_PREFIX.\"customerpartner_to_customer cp2c ON (cp2c.customer_id = cp2c.customer_id) WHERE LOWER(pd.name) LIKE '%\".$this->db->escape(utf8_strtolower($name)).\"%' AND cp2p.customer_id = '\".(int)$this->customer->getId().\"' AND pd.language_id = '\".$this->config->get('config_language_id').\"'\")->rows;\n\n\t\treturn $results;\n\t}",
"public function testSearch()\n {\n $this->clientAuthenticated->request('GET', '/product/search/name');\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n }",
"public function searchResult()\n {\n $name=Input::get('name', '');\n $searchbykeyword=Product::SearchByKeyWord($name)->get();\n /* var_dump($searchbykeyword);*/\n return view('products.search', compact('searchbykeyword'));\n }",
"public function search_product($productname,$vendor,$category,$approved,$pending,$declined,$stock_warning,$is_template,$tag,$sort){\n if(!empty($productname)){$this->db->like('title', $productname);}\n if(!empty($category)){$this->db->where('category', $category);}\n\t if(!empty($approved)){$this->db->where('is_approved', $approved);}\n\t if(!empty($pending)){$this->db->where('is_approved', $pending);}\n\t if(!empty($declined)){$this->db->where('is_approved', $declined);}\n\t if(!empty($stock_warning)){$this->db->where('is_approved', $stock_warning);}\n\t if(!empty($is_template)){$this->db->where('is_template', $is_template);}\n if(!empty($vendor)){$this->db->where('vendor_id', $vendor);}\n if(!empty($tag)){$this->db->like('tag', $tag);}\n\t \n //two not empty with category\n if(!empty($category) && !empty($productname)){$this->db->where('category' , $category);$this->db->like('title', $productname);}\n if(!empty($category) && !empty($vendor)){$this->db->where(array('category' => $category, 'vendor_id' => $vendor));}\n if(!empty($category) && !empty($tag)){$this->db->where('category',$category); $this->db->like('tag', $tag);}\n\t if(!empty($category) && !empty($approved)){$this->db->where(array('category' => $category, 'is_approved' => $approved));}\n\t if(!empty($category) && !empty($pending)){$this->db->where(array('category' => $category, 'is_approved' => $pending));}\n\t if(!empty($category) && !empty($declined)){$this->db->where(array('category' => $category, 'is_approved' => $declined));}\n //two not empty with product\n if(!empty($productname) && !empty($vendor) ){$this->db->where('vendor_id' , $vendor);$this->db->like('title', $productname);}\n if(!empty($productname) && !empty($tag) ){$this->db->like('title', $productname);$this->db->like('tag', $tag);}\n\t if(!empty($productname) && !empty($approved) ){$this->db->like('title', $productname);$this->db->where('is_approved', $approved);}\n\t if(!empty($productname) && !empty($pending) ){$this->db->like('title', $productname);$this->db->where('is_approved', $pending);}\n\t if(!empty($productname) && !empty($declined) ){$this->db->like('title', $productname);$this->db->where('is_approved', $declined);}\n\n //two not empty with vendor\n if(!empty($tag) && !empty($vendor)){$this->db->where('vendor_id' , $vendor);$this->db->like('tag', $tag);}\n\t if(!empty($approved) && !empty($vendor)){$this->db->where('vendor_id' , $vendor);$this->db->where('is_approved', $approved);}\n\t if(!empty($pending) && !empty($vendor)){$this->db->where('vendor_id' , $vendor);$this->db->where('is_approved', $pending);}\n\t if(!empty($declined) && !empty($vendor)){$this->db->where('vendor_id' , $vendor);$this->db->where('is_approved', $declined);}\n\n //three not empty with product\n if(!empty($productname) && !empty($category) && !empty($vendor) ){$this->db->like('title', $productname);$this->db->where(array('category' => $category, 'vendor_id' => $vendor));}\n\t \n\t if(!empty($productname) && !empty($category) && !empty($approved) ){$this->db->like('title', $productname);$this->db->where(array('category' => $category, 'is_approved' => $approved));}\n\t \n\t if(!empty($productname) && !empty($category) && !empty($pending) ){$this->db->like('title', $productname);$this->db->where(array('category' => $category, 'is_approved' => $pending));}\n\t\t\n\t\t if(!empty($productname) && !empty($category) && !empty($declined) ){$this->db->like('title', $productname);$this->db->where(array('category' => $category, 'is_approved' => $declined));}\n\t \n //three not empty with tag\n if(!empty($productname) && !empty($category) && !empty($tag) ){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('category', $category); }\n\t \n\t if(!empty($productname) && !empty($approved) && !empty($tag) ){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('is_approved', $approved); }\n\t \n\t if(!empty($approved) && !empty($category) && !empty($tag) ){$this->db->where('is_approved', $approved); $this->db->or_like('tag', $tag); $this->db->where('category', $category); }\n\t \n\t if(!empty($productname) && !empty($pending) && !empty($tag) ){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('is_approved', $pending); }\n\t \n\t if(!empty($pending) && !empty($category) && !empty($tag) ){$this->db->where('is_approved', $pending); $this->db->or_like('tag', $tag); $this->db->where('category', $category); }\n\n\t \n\t if(!empty($productname) && !empty($declined) && !empty($tag) ){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('is_approved', $declined); }\n\t \n\t if(!empty($declined) && !empty($category) && !empty($tag) ){$this->db->where('ia_approved', $declined); $this->db->or_like('tag', $tag); $this->db->where('category', $category); }\n\t \n //All Not Empty\n if(!empty($productname) && !empty($category) && !empty($tag) && !empty($vendor)){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('category', $category); $this->db->where(array('category' => $category, 'vendor_id' => $vendor));}\n\t \n\t if(!empty($productname) && !empty($category) && !empty($tag) && !empty($approved)){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('category', $category);$this->db->where('is_approved', $approved); $this->db->where(array('category' => $category, 'vendor_id' => $vendor, 'is_approved'=>$approved));}\n\t\t\n\t\t if(!empty($productname) && !empty($category) && !empty($tag) && !empty($pending)){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('category', $category);$this->db->where('is_approved', $pending); $this->db->where(array('category' => $category, 'vendor_id' => $vendor, 'is_approved'=>$pending));}\n\t\t \n\t\t if(!empty($productname) && !empty($category) && !empty($tag) && !empty($declined)){$this->db->like('title', $productname); $this->db->or_like('tag', $tag); $this->db->where('category', $category);$this->db->where('is_approved', $declined); $this->db->where(array('category' => $category, 'vendor_id' => $vendor, 'is_approved'=>$declined));}\n \n if(empty($sort)){\n $this->db->order_by('product_id', 'desc');\n }\n else{\n $this->db->order_by($sort, 'desc');\n }\n\n $query = $this->db->get('product');\n return $query->result_array(); \n }",
"public function getByProductName($name)\n {\n return DB::table('product_models')\n ->where('name',$name)\n ->first();\n }",
"public function search();",
"public function search();",
"public function search($description)\n {\n return Taske::where('description', 'LIKE', \"%{$description}%\")->paginate(15);\n \n }",
"public function searchByName($query);",
"function findProducts ($text, $category, $limit) {\r\n $sql = \"SELECT * FROM stockitems\";\r\n\r\n //checks if the item is in the requested categories\r\n if (isset($category) && $category != 'all') {\r\n $category = (int)$category;\r\n $sql = $sql . \" WHERE StockItemID IN (SELECT StockItemID FROM stockitemstockgroups WHERE StockGroupID = $category )\";\r\n if (isset($text) && $text != '') {\r\n //adds the text search if needed\r\n $sql = $sql . \"AND StockItemName LIKE '%$text%'\";\r\n }\r\n } else {\r\n //adds the text search if needed\r\n if (isset($text) && $text != '' ) {\r\n $sql = $sql . \" WHERE StockItemName LIKE '%$text%'\";\r\n }\r\n }\r\n\r\n if (isset($limit)) {\r\n $sql = $sql . \" LIMIT $limit\";\r\n }\r\n\r\n return runQuery($sql);\r\n}",
"public static function search(){\n $keyword=Input::get('keyword');\n return view('store.search')\n ->with('products',Products::where('title','LIKE','%'.$keyword.'%')->get())\n ->with('keyword',$keyword);\n }",
"public function find(ProductInterface $product);",
"public function search(){}",
"function filter($_search, $_category, $_sort){\n\t\tinclude('mysql_r_db_connect.php');\n\t\t\n\t\t//Create dynamically OREDER BY\n\t\tswitch ($_sort){\n\t\t\tcase 1:\n\t\t\t\t$_sort = 'ORDER BY fldIdProduct DESC';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$_sort = 'ORDER BY fldPrice ASC';\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$_sort = 'ORDER BY fldPrice DESC';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$_search = '%' . $_search . '%';\n\t\t\n\t\t//Check if such product exists \n\t\t$sql = \"SELECT COUNT(fldIdProduct) FROM tblProducts WHERE fldProduct LIKE '$_search'\";\n\t\t$quantity = $handle -> prepare($sql);\n\t\t$quantity->execute();\n\t\t$row = $quantity->fetchColumn();\n\t\t\n\t\tif ($row != 0){\n\t\t\t\n\t\t\t//Check if to search in specific category or in all\n\t\t\t$sql = \"SELECT COUNT(fldIdCategory) FROM tblCategorys WHERE fldCategoryShort LIKE '$_category'\";\n\t\t\t$quantity = $handle -> prepare($sql);\n\t\t\t$quantity->execute();\n\t\t\t$row = $quantity->fetchColumn();\n\t\t\t\n\t\t\tif ($row == 0){\n\t\t\t\n\t\t\t\t//SQL query to show the wanted Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldPrice, fldImage FROM tblProducts WHERE fldProduct LIKE '$_search' AND fldEnabled <> false $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<!-- Begin of product content-->\n\t\t\t\t\t\t<div class=\"col m6\">\n\t\t\t\t\t\t\t<!-- Beginn of product-->\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t\t\t<div class=\"card-image\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"btn-floating halfway-fab waves-effect waves-light red modal-trigger\" href=\"#' . $row->fldIdProduct . '\"><i class=\"material-icons\">add</i></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"card-content center\">\n\t\t\t\t\t\t\t\t\t<p>' . $row->fldProduct . '</p>\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldPrice . ' CHF</h4>\n\t\t\t\t\t\t\t\t\t<br/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//SQL query to get FK of Tag\n\t\t\t\t\t\t\t\t\t$sql_fk_tag = \"SELECT fldFkTag FROM tblProductsToTags WHERE fldFkProduct LIKE '$row->fldIdProduct'\";\n\t\t\t\t\t\t\t\t\t$stmt_fk_tag = $handle->query($sql_fk_tag);\n\t\t\t\t\t\t\t\t\twhile($row_fk_tag = $stmt_fk_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//SQL query to get Tag\n\t\t\t\t\t\t\t\t\t\t$sql_tag = \"SELECT fldTag FROM tblTags WHERE fldIdTag LIKE '$row_fk_tag->fldFkTag'\";\n\t\t\t\t\t\t\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t\t\t\t\t\t\twhile($row_tag = $stmt_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"chip\"><a href=\"filter.php?search='.$row_tag->fldTag.'&category=All&sort=1&start_search=Suchen\">' . $row_tag->fldTag . '</a></div>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of product-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of product content-->\n\t\t\t\t\t';\n\t\t\t\t}\t\n\t\t\t\techo '\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\t';\n\t\t\t\t\n\t\t\t//SQL query to create modal for shown Products\n\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldDescription, fldPrice, fldImage, fldFkSoldBy FROM tblProducts WHERE fldProduct LIKE '$_search' AND fldEnabled <> false $_sort\";\n\t\t\t$stmt = $handle->query($sql);\n\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t//SQL query to get seller\n\t\t\t\t$sql_seller = \"SELECT fldUsername FROM tblUsers WHERE fldIdUser LIKE '$row->fldFkSoldBy'\";\n\t\t\t\t$stmt_seller = $handle->query($sql_seller);\n\t\t\t\twhile($row_seller = $stmt_seller->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<div id=\"' . $row->fldIdProduct . '\" class=\"modal\">\n\t\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t\t<h4>' . $row->fldProduct . '</h4>\n\t\t\t\t\t\t\t\t<div class=\"clearfix float-my-children\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\" class=\"imagepadding\">\n\t\t\t\t\t\t\t\t\t<!-- Modal details container-->\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<p class=\"DescTitle\">Produkt Beschreibung:</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"Description\">' . $row->fldDescription . '</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"DescPrice\">\n\t\t\t\t\t\t\t\t\t\tPreis: ' . $row->fldPrice . ' CHF\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<!-- Buy informations button/link-->\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"buy.php?product=' . $row->fldIdProduct . '\" class=\"waves-effect waves-light btn\">Jetzt Kaufen</a>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescVerkaufer\">Verkaufer: <a href=\"userprof.php?user=' . $row->fldFkSoldBy . '\">' . $row_seller->fldUsername . '</a></p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- End of buy informations-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- End of details container-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<!-- Modal bottom button-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t\t\t<a class=\"modal-action modal-close waves-effect waves-teal lighten-2 btn-flat\">Schliessen</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of bottom button-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of modal-->\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Search for entries in specific category\n\t\t\t\t$sql_cat = \"SELECT fldIdCategory FROM tblCategorys WHERE fldCategoryShort LIKE '$_category'\";\n\t\t\t\t$stmt_cat = $handle->query($sql_cat);\n\t\t\t\t$row_cat = $stmt_cat->fetchObject();\n\t\t\t\t\n\t\t\t\t//SQL query to show wanted Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldPrice, fldImage FROM tblProducts WHERE fldProduct LIKE '$_search' AND fldFkCategory LIKE '$row_cat->fldIdCategory' AND fldEnabled <> false $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<!-- Begin of product content-->\n\t\t\t\t\t\t<div class=\"col m6\">\n\t\t\t\t\t\t\t<!-- Beginn of product-->\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t\t\t<div class=\"card-image\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"btn-floating halfway-fab waves-effect waves-light red modal-trigger\" href=\"#' . $row->fldIdProduct . '\"><i class=\"material-icons\">add</i></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"card-content center\">\n\t\t\t\t\t\t\t\t\t<p>' . $row->fldProduct . '</p>\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldPrice . ' CHF</h4>\n\t\t\t\t\t\t\t\t\t<br/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//SQL query to get FK of Tag\n\t\t\t\t\t\t\t\t\t$sql_fk_tag = \"SELECT fldFkTag FROM tblProductsToTags WHERE fldFkProduct LIKE '$row->fldIdProduct'\";\n\t\t\t\t\t\t\t\t\t$stmt_fk_tag = $handle->query($sql_fk_tag);\n\t\t\t\t\t\t\t\t\twhile($row_fk_tag = $stmt_fk_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//SQL query to get Tag\n\t\t\t\t\t\t\t\t\t\t$sql_tag = \"SELECT fldTag FROM tblTags WHERE fldIdTag LIKE '$row_fk_tag->fldFkTag'\";\n\t\t\t\t\t\t\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t\t\t\t\t\t\twhile($row_tag = $stmt_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"chip\"><a href=\"filter.php?search='.$row_tag->fldTag.'&category=All&sort=1&start_search=Suchen\">' . $row_tag->fldTag . '</a></div>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of product-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of product content-->\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t';\t\n\t\t\t\t//SQL query to create modal for shown Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldDescription, fldPrice, fldImage, fldFkSoldBy FROM tblProducts WHERE fldProduct LIKE '$_search' $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//SQL query to get seller\n\t\t\t\t\t$sql_seller = \"SELECT fldUsername FROM tblUsers WHERE fldIdUser LIKE '$row->fldFkSoldBy'\";\n\t\t\t\t\t$stmt_seller = $handle->query($sql_seller);\n\t\t\t\t\twhile($row_seller = $stmt_seller->fetchObject()){\n\t\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<div id=\"' . $row->fldIdProduct . '\" class=\"modal\">\n\t\t\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldProduct . '</h4>\n\t\t\t\t\t\t\t\t\t<div class=\"clearfix float-my-children\">\n\t\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\" class=\"imagepadding\">\n\t\t\t\t\t\t\t\t\t\t<!-- Modal details container-->\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescTitle\">Produkt Beschreibung:</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"Description\">' . $row->fldDescription . '</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescPrice\">\n\t\t\t\t\t\t\t\t\t\t\tPreis: ' . $row->fldPrice . ' CHF\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<!-- Buy informations button/link-->\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"buy.php?product=' . $row->fldIdProduct . '\" class=\"waves-effect waves-light btn\">Jetzt Kaufen</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescVerkaufer\">Verkaufer: <a href=\"userprof.php?user=' . $row->fldFkSoldBy . '\">' . $row_seller->fldUsername . '</a></p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<!-- End of buy informations-->\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- End of details container-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Modal bottom button-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t\t\t\t<a class=\"modal-action modal-close waves-effect waves-teal lighten-2 btn-flat\">Schliessen</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<!-- End of bottom button-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of modal-->\n\t\t\t\t\t\t';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//Search for tags with the same words like the user input\n\t\t\t$sql = \"SELECT COUNT(fldIdTag) FROM tblTags WHERE fldTag LIKE '$_search'\";\n\t\t\t$quantity = $handle -> prepare($sql);\n\t\t\t$quantity->execute();\n\t\t\t$row = $quantity->fetchColumn();\n\t\t\t\n\t\t\tif ($row != 0){\n\t\t\t\t//Get ID of Tag\n\t\t\t\t$sql_tag = \"SELECT fldIdTag FROM tblTags WHERE fldTag LIKE '$_search'\";\n\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t$row_tag = $stmt_tag->fetchObject();\t\n\t\t\t\t\n\t\t\t\t//Get FK of Tag from in between table\n\t\t\t\t$sql_pro = \"SELECT fldFkProduct FROM tblProductsToTags WHERE fldFkTag LIKE '$row_tag->fldIdTag'\";\n\t\t\t\t$stmt_pro = $handle->query($sql_pro);\n\t\t\t\t$row_pro = $stmt_pro->fetchObject();\n\t\t\t\t\n\t\t\t\t//SQL query to show the wanted Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldPrice, fldImage FROM tblProducts WHERE fldIdProduct LIKE '$row_pro->fldFkProduct' $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<!-- Begin of product content-->\n\t\t\t\t\t\t<div class=\"col m6\">\n\t\t\t\t\t\t\t<!-- Beginn of product-->\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t\t\t<div class=\"card-image\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"btn-floating halfway-fab waves-effect waves-light red modal-trigger\" href=\"#' . $row->fldIdProduct . '\"><i class=\"material-icons\">add</i></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"card-content center\">\n\t\t\t\t\t\t\t\t\t<p>' . $row->fldProduct . '</p>\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldPrice . ' CHF</h4>\n\t\t\t\t\t\t\t\t\t<br/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//SQL query to get FK of Tag\n\t\t\t\t\t\t\t\t\t$sql_fk_tag = \"SELECT fldFkTag FROM tblProductsToTags WHERE fldFkProduct LIKE '$row->fldIdProduct'\";\n\t\t\t\t\t\t\t\t\t$stmt_fk_tag = $handle->query($sql_fk_tag);\n\t\t\t\t\t\t\t\t\twhile($row_fk_tag = $stmt_fk_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//SQL query to get Tag\n\t\t\t\t\t\t\t\t\t\t$sql_tag = \"SELECT fldTag FROM tblTags WHERE fldIdTag LIKE '$row_fk_tag->fldFkTag'\";\n\t\t\t\t\t\t\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t\t\t\t\t\t\twhile($row_tag = $stmt_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"chip\"><a href=\"filter.php?search='.$row_tag->fldTag.'&category=All&sort=1&start_search=Suchen\">' . $row_tag->fldTag . '</a></div>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of product-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of product content-->\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SQL query to create modal for shown Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldDescription, fldPrice, fldImage, fldFkSoldBy FROM tblProducts WHERE fldIdProduct LIKE '$row_pro->fldFkProduct' $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//SQL query to get seller\n\t\t\t\t\t$sql_seller = \"SELECT fldUsername FROM tblUsers WHERE fldIdUser LIKE '$row->fldFkSoldBy'\";\n\t\t\t\t\t$stmt_seller = $handle->query($sql_seller);\n\t\t\t\t\twhile($row_seller = $stmt_seller->fetchObject()){\n\t\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<div id=\"' . $row->fldIdProduct . '\" class=\"modal\">\n\t\t\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldProduct . '</h4>\n\t\t\t\t\t\t\t\t\t<div class=\"clearfix float-my-children\">\n\t\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\" class=\"imagepadding\">\n\t\t\t\t\t\t\t\t\t\t<!-- Modal details container-->\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescTitle\">Produkt Beschreibung:</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"Description\">' . $row->fldDescription . '</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescPrice\">\n\t\t\t\t\t\t\t\t\t\t\tPreis: ' . $row->fldPrice . ' CHF\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<!-- Buy informations button/link-->\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"buy.php?product=' . $row->fldIdProduct . '\" class=\"waves-effect waves-light btn\">Jetzt Kaufen</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescVerkaufer\">Verkaufer: <a href=\"userprof.php?user=' . $row->fldFkSoldBy . '\">' . $row_seller->fldUsername . '</a></p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<!-- End of buy informations-->\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- End of details container-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Modal bottom button-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t\t\t\t<a class=\"modal-action modal-close waves-effect waves-teal lighten-2 btn-flat\">Schliessen</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<!-- End of bottom button-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of modal-->\n\t\t\t\t\t\t';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</div></div>';\n\t\t\t\t}\n\t\t\telse{\n\t\t\t\techo 'Es tut uns leid, aber es konnten keine Produkte mit diesen Suchkriterien gefunden werden</div></div>';\n\t\t\t}\n\t\t}\n\t}",
"function product_search($query_string = false, $lang = 'en_us')\n\t{\n\t\t$lang = str_replace('_', '-', $lang);\n\t\t\n\t\tif (!empty($query_string))\n\t\t{\n\t\t\n\t\t\t$query = explode(' ', $query_string);\n\t\t\n\t\t}\n\t\t\n\t\t$content = '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\t\t\t<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t\t\t\t<soap:Header>\n\t\t\t\t\t<ServiceAuthHeader xmlns=\"http://tempuri.org/\">\n\t\t\t\t\t\t<UserName>' . $this->username . '</UserName>\n\t\t\t\t\t\t<Password>' . $this->password . '</Password>\n\t\t\t\t\t</ServiceAuthHeader>\n\t\t\t\t</soap:Header>\n\t\t\t\t<soap:Body>\n\t\t\t\t\t<product_search xmlns=\"http://tempuri.org/\">';\n\t\tif (!empty($query)) {\n\t\t\tforeach ($query as $q) $content .= '<search_terms>' . $q . '</search_terms>';\n\t\t}\n\t\t$content .=\t'<lang>'.$lang.'</lang></product_search>\n\t\t\t\t</soap:Body>\n\t\t\t</soap:Envelope>';\n\t\t\n\t\t$headers = array( \n\t\t\t'POST /redactedapiservice.asmx HTTP/1.1',\n\t\t\t'Host: 000.00.000.185',\n\t\t\t'Content-Type: text/xml; charset=utf-8',\n\t\t\t'Content-Length: ' . strlen($content),\n\t\t\t'SOAPAction: \"http://tempuri.org/product_search\"',\n\t\t);\n\t\t\n\t\treturn $this->_init_curl($content, $this->url, $headers);\n\t\t\n\t}",
"public function search(Request $request)\n {\n $this->validate($request, [\n 'term' => 'required|string',\n 'category_id' => 'required|integer|min:0',\n ]);\n $searchResults = Product::hydrate(Searchy::products([\n 'name_en', 'name_ar',\n 'description_en', 'description_ar',\n 'short_description_en', 'short_description_ar',\n ])->query($request->term)->get()->toArray())->where('active', 1);\n $category = SubSubCategory::find($request->category_id);\n $latest_products = Product::orderBy('created_at', 'desc')->active()->get()->take(5);\n if ($category) {\n $category_products = $category->active()->first()->products()->active()->get();\n $searchResults = $searchResults->intersect($category_products);\n }\n return view('user.products.search', compact('searchResults', 'latest_products'));\n }",
"function getSearchProducts($bdd, $search, $order = 0){\n\t$query = 'SELECT * FROM products WHERE name LIKE :search ORDER BY price';\n\tif($order){\n\t\t$query .= ' DESC';\n\t}\n\t$reponse = $bdd->prepare($query);\n\t$reponse->bindValue(':search', '%' . $search . '%', PDO::PARAM_INT);\n\t$reponse->execute();\n\treturn $reponse->fetchAll();\n\n}",
"public function search(string $name): JsonResponse\n {\n try {\n $products = Product::query()->where('name', 'like', '%'.$name.'%')->get();\n\n return response()->json([\n 'data' => $products,\n 'success' => true\n ]);\n } catch (Throwable $error) {\n return response()->json([\n 'data' => null,\n 'success' => false,\n 'message' => $error->getMessage()\n ]);\n }\n }",
"public function cari(Request $request)\n {\n // dd($request);\n // Get the search value from the request\n $search = $request->search_text;\n\n // Search in the title and body columns from the posts table\n $results = Product::where('product_name', 'LIKE', \"%\".$search.\"%\")->orWhere('product_short_desc', 'LIKE', \"%\".$search.\"%\")->orWhere('product_long_desc', 'LIKE', \"%\".$search.\"%\")->orWhere('product_category', 'LIKE', \"%\".$search.\"%\")->get();\n // dd($results); \n return view('user.cari',compact(\"results\", \"search\"));\n }",
"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\tif(isset($this->searchText) && !empty($this->searchText))\n\t\t{\n\t\t\t$this->productSpecGroupId = $this->searchText;\n\t\t\t$this->productId = $this->searchText;\n\t\t\t$this->title = $this->searchText;\n\t\t\t$this->description = $this->searchText;\n\t\t\t$this->image = $this->searchText;\n\t\t\t$this->parentId = $this->searchText;\n\t\t\t$this->type = $this->searchText;\n\t\t\t$this->sortOrder = $this->searchText;\n\t\t\t$this->status = $this->searchText;\n\t\t\t$this->createDateTime = $this->searchText;\n\t\t\t$this->updateDateTime = $this->searchText;\n\t\t}\n\n\t\t$criteria->compare('productSpecGroupId', $this->productSpecGroupId, true, 'OR');\n\t\t$criteria->compare('productId', $this->productId, true, 'OR');\n\t\t$criteria->compare('title', $this->title, true, 'OR');\n\t\t$criteria->compare('description', $this->description, true, 'OR');\n\t\t$criteria->compare('image', $this->image, true, 'OR');\n\t\t$criteria->compare('parentId', $this->parentId, true, 'OR');\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('sortOrder', $this->sortOrder);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('createDateTime', $this->createDateTime, true, 'OR');\n\t\t$criteria->compare('updateDateTime', $this->updateDateTime, true, 'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function searchableAs()\n {\n return 'product';\n }",
"public function search_lookbook() {\n\n\t\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$keyword = isset($_GET['keyword'])? sanitize_text_field($_GET['keyword']):'';\n\n\t\tif ( empty( $keyword ) ) {\n\t\t\tdie();\n\t\t}\n\t\t$arg = array(\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'woocommerce-lookbook',\n\t\t\t'posts_per_page' => 50,\n\t\t\t's' => $keyword\n\n\t\t);\n\t\t$the_query = new WP_Query( $arg );\n\t\t$found_products = array();\n\t\tif ( $the_query->have_posts() ) {\n\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t$the_query->the_post();\n\n\t\t\t\t$product = array( 'id' => get_the_ID(), 'text' => get_the_title() );\n\t\t\t\t$found_products[] = $product;\n\t\t\t}\n\t\t}\n\t\twp_send_json( $found_products );\n\t\tdie;\n\t}",
"public function test_search_item_result_with_keyword(){\n $this->browse(function (Browser $browser) {\n $browser->visit('/item-search')\n ->assertPathIs('/item-search')\n ->select('type', 1)\n ->value('#keyword', 'truck')\n ->value('#minprice', '10000')\n ->value('#maxprice', '20000')\n ->click('button[type=\"submit\"]')\n ->assertPathIs('/item-search-result')\n ->assertSee(\"Details\");\n });\n }",
"public function search(Request $request)\n {\n $data = Product::where('name','LIKE','%'.$request->input('query').'%')->get();\n return view('search',compact('data'));\n }",
"public function searchItem($title) {\n \n //Create Database conexion\n }",
"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_product',$this->id_product);\n\t\t$criteria->compare('name_product',$this->name_product,true);\n\t\t$criteria->compare('barcode_product',$this->barcode_product,true);\n\t\t$criteria->compare('detail_product',$this->detail_product,true);\n\t\t$criteria->compare('pic1',$this->pic1,true);\n\t\t$criteria->compare('pic2',$this->pic2,true);\n\t\t$criteria->compare('pic3',$this->pic3,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('id_type',$this->id_type);\n\t\t$criteria->compare('id_color',$this->id_color);\n\t\t$criteria->compare('id_size',$this->id_size);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"function searchInventory ($searchValue) {\n global $db;\n \n \n //$stmt = $db->prepare(\"SELECT * FROM schools WHERE $column LIKE :search\");\n\n \n \n $results = [];\n $stmt = $db->prepare(\"SELECT idItem, `name`, amount, unitPrice, salesPrice, parAmount FROM inventory WHERE name LIKE :search\");\n $search = '%'.$searchValue.'%';\n $binds = array(\n \":search\" => $search\n );\n\n if ( $stmt->execute($binds) && $stmt->rowCount() > 0 ) {\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n }\n\n return ($results);\n }",
"public function index(Request $request)\n {\n return SearchProductCollection::collection( Product::where('name', 'LIKE','%'.$request->s.'%')->select('id', 'name')->get());\n }",
"function search( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_SEARCH,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}",
"function ciniki_wineproduction_searchProductNames($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 'start_needle'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Search'), \n 'limit'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Limit'), \n 'customer_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Customer'), \n 'category_id'=>array('required'=>'no', 'default'=>'0', 'blank'=>'yes', 'name'=>'Category'),\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', 'wineproduction', 'private', 'checkAccess');\n $rc = ciniki_wineproduction_checkAccess($ciniki, $args['tnid'], 'ciniki.wineproduction.searchProductNames'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // If a customer is specified, search through past orders to find preferences for customer\n //\n if( $args['start_needle'] == '' && isset($args['customer_id']) && $args['customer_id'] > 0 ) {\n $strsql = \"SELECT ciniki_wineproduction_products.id, \"\n . \"ciniki_wineproduction_products.name AS wine_name, \"\n . \"ciniki_wineproductions.wine_type, \"\n . \"ciniki_wineproductions.kit_length, \"\n . \"order_flags \"\n . \"FROM ciniki_wineproductions, ciniki_wineproduction_products \"\n . \"WHERE ciniki_wineproductions.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_wineproductions.customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND ciniki_wineproductions.product_id = ciniki_wineproduction_products.id \"\n . \"AND ciniki_wineproduction_products.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_wineproduction_products.status = 10 \";\n } \n\n //\n // If no customer specified, but a search string is, then search through products for \n // matching names\n //\n else if( $args['start_needle'] != '' ) {\n $strsql = \"SELECT ciniki_wineproduction_products.id, ciniki_wineproduction_products.name AS wine_name, \"\n . \"ciniki_wineproduction_products.wine_type, \"\n . \"ciniki_wineproduction_products.kit_length, \"\n . \"0 AS order_flags \"\n . \"FROM ciniki_wineproduction_products \"\n . \"WHERE ciniki_wineproduction_products.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (ciniki_wineproduction_products.name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \" \n . \"OR ciniki_wineproduction_products.name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \" \n . \") \"\n . \"AND ciniki_wineproduction_products.status = 10 \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.19', 'msg'=>'No search specified'));\n }\n\n $strsql .= \"GROUP BY ciniki_wineproduction_products.id \"\n . \"ORDER BY ciniki_wineproduction_products.name \"\n// . \"ORDER BY COUNT(ciniki_wineproductions.id) DESC \"\n . \"\";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \"; // is_numeric verified\n } else {\n $strsql .= \"LIMIT 25\";\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbRspQuery');\n return ciniki_core_dbRspQuery($ciniki, $strsql, 'ciniki.wineproduction', 'names', 'name', array('stat'=>'ok', 'names'=>array()));\n}",
"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('product_id',$this->product_id);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('product_description',$this->product_description,true);\n\t\t$criteria->compare('product_barCode',$this->product_barCode,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('product_iva',$this->product_iva);\n\t\t$criteria->compare('product_price',$this->product_price);\n\t\t$criteria->compare('unit_id',$this->unit_id);\n\t\t$criteria->compare('product_min_stock',$this->product_min_stock);\n\t\t$criteria->compare('product_max_stock',$this->product_max_stock);\n\t\t$criteria->compare('product_inventory_max_days',$this->product_inventory_max_days);\n\t\t$criteria->compare('product_image',$this->product_image,true);\n\t\t$criteria->compare('product_iscomponent',$this->product_iscomponent);\n\t\t$criteria->compare('product_enable',$this->product_enable);\n\t\t$criteria->compare('product_remarks',$this->product_remarks,true);\n\t\t$criteria->compare('product_status',$this->product_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function findProduct(Request $request)\n {\n $user = auth()->user();\n $limite = 3;\n if ($request->limit) {\n $limite = 10;\n }\n $product = '%'.$request->product.'%';\n $products = DB::select('SELECT products.name,products.id,\n products.code,products.price\n FROM products\n INNER JOIN users ON users.id = products.created_by_id\n WHERE products.name LIKE ? OR products.code LIKE ? AND users.organization_id = ? LIMIT ?',\n [$product,$product,$user->organization_id,$limite]);\n if ($request->limit) {\n $returnHTML = view('product.searchedDataModal',['products'=> $products])->render();\n } else {\n $returnHTML = view('product.searchedData',['products'=> $products])->render();\n }\n return response()->json(array('success' => true, 'html'=>$returnHTML));\n }",
"function getProductByCategorySearch($category_id, $keyword){\r\n\t\t$unix_product = array();\r\n\t\t//$has_printed = false;\r\n\t\t$total_product_1 = 0;\r\n\t\t$total_product_2 = 0;\r\n\t\t$keyword=strtolower($keyword);\r\n\t\t\r\n\t\tif($category_id!=0){\r\n\t\t\t$q_category = getResultSet(\"SELECT DISTINCT(category_id) FROM \".DB_PREFIX.\"category WHERE parent_id=\".$category_id);\t\r\n\t\t}\r\n\t\telseif($category_id==0){\r\n\t\t\t$q_category = getResultSet(\"SELECT DISTINCT(category_id) FROM \".DB_PREFIX.\"category\");\t\r\n\t\t}\r\n\t\twhile($rc=mysql_fetch_array($q_category)){\r\n\t\t\t$cat_id = $rc['category_id'];\r\n\t\t\t//if($category_id!=0){\r\n\t\t\t$q_product_id=getResultSet(\"SELECT DISTINCT(C.product_id) FROM \".DB_PREFIX.\"product_to_category AS C\r\n\t\t\t\t\t\t\t\t\tINNER JOIN \".DB_PREFIX.\"product_description AS D ON C.product_id = D.product_id \r\n\t\t\t\t\t\t\t\t\tWHERE C.category_id=\".$cat_id.\" AND lower(D.name) LIKE '%$keyword%'\");\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t$total_product_1 = mysql_num_rows($q_product_id);\t\t\t\t\t\t\t\t\t\r\n\t\t\twhile($rp=mysql_fetch_array($q_product_id)){\r\n\t\t\t\t$product_id = $rp['product_id'];\r\n\t\t\t\t$product = new product($product_id);\r\n\t\t\t\tif(!in_array($product_id, $unix_product)){\r\n\t\t\t\techo '<div class=\"item\">';\r\n\t\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\t\techo '<div class=\"item_name\" >'.$product->getProductName().'_'.$total_product_1.'</div>';\r\n\t\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'store/image/icon/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$product->getShopName().'</span></div>';\r\n\t\t\t\t\t\techo '<div class=\"price\" >$'.$product->getProductPrice().'</div>';\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\t\techo '<a href=\"?page=productdetail&product='.$product_id.'\">';\r\n\t\t\t\t\techo '<img src=\"'.$product->getProductImage().'\">';\r\n\t\t\t\t\techo '</a>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\t}\r\n\t\t\t\t$unix_product[] = $rp['product_id'];\r\n\t\t\t\t$unix_product = array_unique($unix_product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Search Child Category\r\n\t\t$q_child_product_id=getResultSet(\"SELECT DISTINCT(C.product_id) FROM \".DB_PREFIX.\"product_to_category AS C\r\n\t\t\t\t\t\t\t\t\t\tINNER JOIN \".DB_PREFIX.\"product_description AS D ON C.product_id = D.product_id \r\n\t\t\t\t\t\t\t\t\t\tWHERE C.category_id=\".$category_id.\" AND lower(D.name) LIKE '%$keyword%'\");\r\n\t\t$total_product_2 = mysql_num_rows($q_child_product_id);\r\n\t\twhile($rp=mysql_fetch_array($q_child_product_id)){\r\n\t\t\t$product_id = $rp['product_id'];\r\n\t\t\t$product = new product($product_id);\r\n\t\t\tif(!in_array($product_id, $unix_product)){\r\n\t\t\techo '<div class=\"item\">';\r\n\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\techo '<div class=\"item_name\" >'.$product->getProductName().$total_product_2.'</div>';\r\n\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'store/image/icon/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$product->getShopName().'</span></div>';\r\n\t\t\t\t\techo '<div class=\"price\" >$'.$product->getProductPrice().'</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\techo '<a href=\"?page=productdetail&product='.$product_id.'\">';\r\n\t\t\t\techo '<img src=\"'.$product->getProductImage().'\">';\r\n\t\t\t\techo '</a>';\r\n\t\t\techo '</div>';\r\n\t\t\t}\r\n\t\t\t$unix_product[] = $rp['product_id'];\r\n\t\t\t$unix_product = array_unique($unix_product);\r\n\t\t}\r\n\t\t//Info if Search No Result \r\n\t\t/*\r\n\t\tif($total_product_1==0 && $total_product_2==0){\r\n\t\t\techo '<div class=\"no_item\" style=\"height:200px;padding: 10px 10px 10px 20px; color: #CCC; font-size: 20px;\">';\r\n\t\t\t\techo 'No Result! RUn'.$total_product_1.'_'.$total_product_2;\r\n\t\t\t\t//echo ':)'.$rLanguage->text(\"Logout\");\t\r\n\t\t\techo '</div>';\r\n\t\t}\r\n\t\t*/\r\n\t}",
"function search_product_result($conditions_array=array(),$rows_per_page=10,$start=0){\n\t\t$this->db->from('red_support_product as rsp');\n\t\t$this->db->where($conditions_array);\n\t\tif($this->input->post('search_text')){\n\t\t\t$search_text=$this->input->post('search_text');\n\t\t}else{\n\t\t\t$search_text=\"\";\n\t\t}\n\t\t$this->db->where(\"(product like'%$search_text%' or description like'%$search_text%')\");\n\t\t$this->db->limit($rows_per_page, $start);\n\t\t$result=$this->db->get();\n\t\tforeach($result->result_array() as $row)\n\t\t{\n\t\t\t$rows[]=$row;\n\t\t}\n\t\treturn $rows;\n\t}"
] | [
"0.7037194",
"0.6914308",
"0.68668985",
"0.68640274",
"0.68614966",
"0.68442464",
"0.6747434",
"0.67449933",
"0.66041446",
"0.6599186",
"0.6482557",
"0.647466",
"0.64701426",
"0.6462877",
"0.6438939",
"0.64340615",
"0.6429461",
"0.64115316",
"0.6410219",
"0.6372476",
"0.6365507",
"0.6349903",
"0.63449234",
"0.6336234",
"0.6331655",
"0.6327217",
"0.6320713",
"0.63108385",
"0.6305535",
"0.62922806",
"0.6262443",
"0.6261443",
"0.6238556",
"0.6231281",
"0.6206538",
"0.6194414",
"0.6193747",
"0.6182357",
"0.6177105",
"0.61685425",
"0.6163348",
"0.61618423",
"0.6152965",
"0.6118205",
"0.6113915",
"0.61073595",
"0.6104634",
"0.60997397",
"0.60886866",
"0.60721177",
"0.60681635",
"0.6066733",
"0.6059693",
"0.6049674",
"0.6044401",
"0.60387605",
"0.6032205",
"0.6027377",
"0.6013836",
"0.59832025",
"0.59807163",
"0.5972213",
"0.5967041",
"0.59663725",
"0.5947376",
"0.5940823",
"0.59328145",
"0.5924422",
"0.5920865",
"0.5916366",
"0.5902768",
"0.59027326",
"0.59027326",
"0.5892283",
"0.58866584",
"0.58843005",
"0.5881203",
"0.5879871",
"0.58614117",
"0.58583945",
"0.58578753",
"0.5857002",
"0.585142",
"0.5844972",
"0.5844657",
"0.5838988",
"0.5832979",
"0.58308905",
"0.5817764",
"0.5815055",
"0.58013904",
"0.5795812",
"0.5787656",
"0.57871646",
"0.5776868",
"0.57676446",
"0.5761074",
"0.57556814",
"0.57515043",
"0.5743775"
] | 0.6111054 | 45 |
Show all user accounts | public function showAccounts($orderby = 'name', $order = 'ASC')
{
$this->db->execute("SELECT id, name, email, gravatar, role FROM users ORDER BY $orderby $order");
$res = $this->db->fetchAll();
// executeFetchAll
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }",
"function displayAllUser() {\n\t\t$sql = \"SELECT * FROM accounts\";\n\t\t$result = $this->connection->query($sql);\n\t\techo \"Displays all users\";\n\t\techo '<table style=\"border-style: ridge; border-width:6px\">';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">ID</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Email</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">First Name</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Last Name</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Phone</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Birthday</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Gender</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Password</th>';\n\t\techo '</tr>';\n\t\t\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td>\".$row[\"id\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"email\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"fname\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"lname\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"phone\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"birthday\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"gender\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"password\"].\"</td>\";\n\t\t\techo \"</tr>\";\n \t}\n \techo \"</table>\";\n\t\techo \"<br>\";\n\t}",
"public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }",
"public function index()\n {\n return $this->user->all();\n }",
"public function index()\n {\n\t\t\n\t\t$users = \\App\\User::all();\n\n return view('auth.editAccountAll',['users'=>$users]);\n }",
"public function index()\n {\n $users = User::all();\n }",
"public function index()\n {\n $user = $this->permission(User::all(), 'id');\n\n return $this->showAll($user,User::class);\n }",
"public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }",
"public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }",
"public function user_index_account()\n {\n $detailkpr = Detailkpr::paginate(20);\n return view('admin.account.user.index', [\n 'accounts' => $detailkpr\n // 'pangkats' => Pangkat::get()\n ]);\n }",
"public function showAllUsers()\n {\n // añadir condicion de if para admins y clients\n $tipo = request()->get('tipo');\n if (isset($tipo))\n {\n if ($tipo == 'administradores') {\n $users = User::all()->where('is_admin', 1);\n } else {\n $users = User::all()->where('is_admin', 0);\n }\n } else {\n $users = User::all();\n }\n return view('users.list', compact('users'));\n }",
"public function showListAction() {\n $users = $this->getDoctrine()\n ->getRepository(User::class)\n ->findAll();\n return $this->render(':Security\\User:users.html.twig', [\n 'users' => $users\n ]);\n }",
"public function index()\n {\n $this->user_list();\n }",
"public function listofUser()\n {\n return view('Admin.ShowallUser');\n }",
"public function index()\n {\n $users = User::orderBy('name')->paginate(10);\n return view('accounts.index')->with('users', $users);\n }",
"public function index()\n {\n $data['users'] = User::latest()->get();\n return view('cp.accounts.index', $data);\n }",
"public function index()\n {\n $this->userlist();\n }",
"public function index()\n {\n $users = Base::user()->paginate();\n\n return view('admin::auth.users.index')->with(compact('users'));\n }",
"public function ShowAll( )\n {\n $dataArray = array(\n );\n \n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/ShowAll/123\", \"json\" );\n \n return $response;\n }",
"public function index()\n {\n $users = User::All();\n return $this->showAll($users);\n }",
"public function index()\n {\n // show list user\n }",
"public function index()\n {\n $accounts = $this->accounts->getAllOfUser();\n\n return view(\n 'account::accounts.index',\n [\n 'accounts' => $accounts,\n ]\n );\n }",
"public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }",
"public function index()\n {\n $users = User::all();\n return $this->showAll($users);\n }",
"public function index()\n {\n $account = new User();\n\n $view = new View('account/overview.twig');\n return $view->setData([\n 'account' => $account->find($_SESSION['user'])\n ])->build();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n\n return User::all();\n }",
"public function index()\n {\n $this->authorize('viewAny', User::class);\n\n // List the users...\n }",
"public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }",
"public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }",
"public function getAllUsers() {\n self::isAdmin404();\n\n $users = User::get();\n\n return view('users', ['users' => $users]);\n }",
"public function index()\n {\n return view('administration::user.index')\n ->withUsers($this->user->all());\n }",
"public function actionIndex() {\n //redirect a user if not super admin\n if (!Yii::$app->CustomComponents->check_permission('all_users')) {\n return $this->redirect(['site/index']);\n }\n\n $query = DvUsers::find();\n $count = $query->count();\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 50]);\n $models = $query->offset($pagination->offset)->limit($pagination->limit)->all();\n return $this->render('index', [ 'users' => $models, 'total_records' => $count, 'pages' => $pagination]);\n }",
"public function indexAction(){\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $perpage = 2;\n $count = \\R::count('user');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $users = \\R::findAll('user', \"LIMIT $start, $perpage\");\n\n $this->setMeta('All users');\n $this->setData(compact('users', 'pagination', 'count'));\n }",
"public function printUserAll()\n\t{\n\t\t$data['reklame'] = $this->madmin->printReklameAll('users')->result();\n\t\t// print_r($data);\n\n\t\t$this->load->view('cetak/cetakuser.php',$data);\n\t}",
"public function allUsers()\n\t{\n\t\t$data['users'] = $this->MainModel->selectAll('users', 'first_name');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('template/all-users', $data);\n\t\t$this->load->view('layout/footer');\n\t}",
"public function all_user()\n {\n $this->res->SetObject(RCD::SC, RCD::SC, FALSE, $this->db->get('user')->result());\n }",
"public function all_users()\n {\n $users = User::all();\n return view('pages.allusers')->with('users', $users);\n }",
"public function index()\n {\n //\n return User::all();\n }",
"public function showAllUsers()\n {\n return response()->json(Users::all());\n }",
"public function index(){\n\t\t$users = $this->User->find(\"users\", \"all\");\t\n\t\t$this->set(\"users\", $users);\n\t}",
"public function indexAction()\n {\n // Get a query of listing all users from user service\n $pages = $this->get('app.user.service')->getUsers();\n \n // Get pagination\n $pagination = $this->get('app.service')->paginate($pages);\n \n // Render and return the view\n return $this->render(\n '::admin/user/users.html.twig',\n array(\n 'pagination' => $pagination\n )\n );\n }",
"public function index()\n {\n $users = DB::table('users')->where('isAdmin', '=', false)->get();\n\n return view('admin.user.all')->with('users', $users);\n }",
"public function index()\n {\n return view('admin/user-table/all-user');\n }",
"public function index()\n {\n return User::all()->toArray();\n }",
"public function index(){\n\t\treturn view(Config::get('boxtar.viewUsers'))->with('users', User::latest()->get());\n\t}",
"public function index()\n {\n return view(\"users.users\")->with([\"read_users\"=>User::all()->where('company_id',\\Auth::user()->company_id),'title'=>\"List of users\"]);\n }",
"public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }",
"public function index()\n {\n // return collection of all users\n return UserIndexResource::collection(User::info()->get());\n }",
"public function index()\n {\n return Account::all();\n }",
"public function showUsers()\n {\n $userRepo = $this->getDoctrine()->getRepository(User::class);\n $users = $userRepo->getUsersOrderByAsc();\n\n return $this->render('admin/list-of-users.html.twig', [\n 'users' => $users\n ]);\n }",
"public function index()\n {\n return $this->userRepo->getUsers();\n }",
"public function index()\n {\n $this->authorize('viewAny', User::class);\n $users = User::paginate(40);\n return view('admin.users.index', compact('users'));\n }",
"public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }",
"public function index()\n {\n $data['users'] = $this->user->all();\n return view('backend.user.list')->with($data);\n }",
"public function index()\n {\n return view('backend.user.list_user');\n }",
"public function indexAction()\n {\n $this->get('Services')->setMenuItem('user');\n\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('WbcAdministratorBundle:User')->findAll();\n\n return $this->render('WbcAdministratorBundle:User:index.html.twig', array(\n 'users' => $users,\n ));\n }",
"public function index()\n {\n $accounts = Account::all();\n return view('accounts')->with(compact('accounts'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $users = $em->getRepository('AppBundle:User')->findAll();\n\n return $this->render('users_list.html.twig', array('users' => $users));\n }",
"public function allUsers()\n {\n $users = User::all();\n $role=0;\n return view('admin/users/index', [\n 'users' => $users,\n 'role' => $role\n ]);\n }",
"public function index()\n {\n return $this->showCollectionResponse(User::all(), 200);\n }",
"public function index()\n {\n return response()->responseUtil(User::all(['id', 'name', 'realName', 'openId', 'nickName', 'avatarUrl', 'cellphone', 'officephone','regTime', 'email']));\n }",
"public function index()\n {\n //\n\t\t $users = DB::table('users')->get();\n\t\t print_r($users); die;\n }",
"public function index()\n {\n $accounts = Account::Paginate(15);\n return view('demo.admin.account.index',compact('accounts'));\n }",
"public function index() {\n\t\t$this->accessible();\n\t\t$users = User::paginate(5);\n\n\t\treturn view('users.list', compact('users'));\n\t}",
"public function index()\n\t{\n\t\t$users = $this->user->active()->paginate(10);\n\n\t\treturn $this->view->make('users.index', compact('users'));\n\t}",
"public function index()\n\t{\n\t\treturn view('users')->with('users', User::All());\n\t}",
"public function index()\n {\n return view(\"backend.account.account.view\", [\n \"accounts\" => Account::all(),\n ]);\n }",
"public function index()\n {\n $users = User::all();\n \n\n return view('admin.user.listar')->with(compact('users'));\n }",
"public function index()\n {\n $users = User::all();\n //show the users list, mostly advanced users\n return view('users.index')->with('users', $users);\n }",
"public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }",
"public function index()\n {\n $user = User::all();\n return view('admin.user.list',compact('user'));\n }",
"public function index()\n {\n return user::get();\n }",
"public function index()\n {\n $this->authorize('index', User::class);\n return view('theme.backoffice.pages.user.index', [\n 'users' => auth()->user()->visible_users()\n ]);\n }",
"public function index()\n {\n return $this->respond(User::_(User::all()->toArray()));\n }",
"public function index()\n {\n\n $usersList = User::all();\n\n return view('dash.users')->with( compact('usersList') );\n }",
"public function index()\n {\n return UserResource::collection(User::paginate(20));\n }",
"public function index()\n\t {\n\t $accounts = $this->Accounts->find('all');\n\t $this->set(compact('accounts'));\n\t }",
"public function index()\n {\n $usuarios = User::simplePaginate(10);\n return view('admin.usuarios', compact(\"usuarios\"));\n }",
"public function index(){\n\t\t$usuarios = $this->User->find('all');\n\t\t$this->set('usuarios', $usuarios);\n\t}",
"public function index()\n {\n //\n $_users = User::all();\n return view('admin.users.list', ['users' => $_users ]);\n }",
"public function index()\n {\n return Utils::success(User::all()->toArray());\n }",
"public function index()\n {\n $users = User::all();\n return view('backend.user.list', compact(['users']));\n }",
"public function index()\n {\n $count = \\App\\User::count();\n $users = \\App\\User::orderBy('id', 'desc')->paginate(10);\n\n return view('webcontrol.user.list', compact('count', 'users'));\n }",
"public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}",
"public function index()\n {\n $users = User::paginate();\n return view('manage.users.index')->withUsers($users);\n }",
"public function index()\n\t{\n\t\t$users = $this->user->all();\n\t\t//show the index page\n\t\treturn View::make('settings.users')\n\t\t\t\t->with('users',$users);\n\t}",
"public function index()\n {\n //\n //return User::all();\n return view('admin.users', ['users' => User::all()]);\n }",
"static function getAllUsers(){\n $users = User::where('email','<>','admin')->paginate(4);\n\n if(count($users) != 0){\n return view('partials.adminUsersList')->with('users',$users);\n } else {\n echo \"Aún no hay usuarios registrados.\";\n }\n\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function index()\n {\n $users = \\App\\User::paginate(20);\n\n return view('admin.users', ['users' => $users]);\n }",
"public function index()\n {\n return view('admin.users.index')->with('users', User::all());\n }"
] | [
"0.80555576",
"0.77406096",
"0.762703",
"0.75738955",
"0.7534897",
"0.7504366",
"0.74898595",
"0.748887",
"0.748887",
"0.74568874",
"0.7433274",
"0.74007285",
"0.73866457",
"0.7367021",
"0.7366568",
"0.7359326",
"0.7354032",
"0.73539466",
"0.73515534",
"0.7340846",
"0.7339855",
"0.7329738",
"0.7314794",
"0.7311316",
"0.7301567",
"0.729446",
"0.729446",
"0.729446",
"0.729446",
"0.729446",
"0.729446",
"0.729446",
"0.729446",
"0.7289588",
"0.7286183",
"0.728057",
"0.7278713",
"0.7274493",
"0.72587824",
"0.72527474",
"0.7252328",
"0.7234871",
"0.72311336",
"0.72264606",
"0.7225436",
"0.721069",
"0.7207602",
"0.72066444",
"0.7182891",
"0.71744657",
"0.7171691",
"0.7160734",
"0.7158727",
"0.71552765",
"0.7154628",
"0.71531",
"0.7151054",
"0.714436",
"0.71405387",
"0.7138209",
"0.7137827",
"0.7133753",
"0.71314096",
"0.71277994",
"0.71239316",
"0.7120828",
"0.71019083",
"0.70926636",
"0.70926005",
"0.70899993",
"0.70846075",
"0.70829153",
"0.708287",
"0.7081929",
"0.7080902",
"0.7078671",
"0.7070692",
"0.70672333",
"0.7060904",
"0.7059815",
"0.70563686",
"0.7049018",
"0.70421886",
"0.70417506",
"0.7040958",
"0.70392054",
"0.70390195",
"0.7037753",
"0.7036426",
"0.7027002",
"0.70210916",
"0.7019835",
"0.70021236",
"0.6994823",
"0.699109",
"0.6990901",
"0.6990129",
"0.6989723",
"0.69876105",
"0.69858015",
"0.69835734"
] | 0.0 | -1 |
Create navigation among pages. | public function getPageNavigation($page, $max, $min = 1)
{
$nav = "<a href='" . $this->getQueryString(array('page' => $min)) . "'><<</a> ";
$nav .= "<a href='" . $this->getQueryString(array('page' => ($page > $min ? $page - 1 : $min) )) . "'><</a> ";
for ($i=$min; $i<=$max; $i++) {
$nav .= "<a href='" . $this->getQueryString(array('page' => $i)) . "'>$i</a> ";
}
$nav .= "<a href='" . $this->getQueryString(array('page' => ($page < $max ? $page + 1 : $max) )) . "'>></a> ";
$nav .= "<a href='" . $this->getQueryString(array('page' => $max)) . "'>>></a> ";
return $nav;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generate_page_nav ( $db ){\n\t\treturn \"\n\t\t\t\t\".generate_site_nav($db);\n\t}",
"function _navSetup()\n\t{\n\t\t// get the path to the current page\n\t\t$this->path = $this->getPath($this->area, $this->page);\n\t\t\n\t\t// reset the navigational elements\n\t\t$this->nav = array();\n\t\t\n\t\t// we use the view URL a lot\n\t\t$view_url = $this->parse->getRenderConf('xhtml', 'wikilink', 'view_url');\n\t\t\n\t\t// is there a path? (if not, the page is not on the map)\n\t\tif (count($this->path) > 0) {\n\t\t\t\n\t\t\t// get nav elements leading to this page...\n\t\t\tforeach ($this->path as $key => $val) {\n\t\t\t\t\t\n\t\t\t\tif ($key == 0) {\n\t\t\t\t\n\t\t\t\t\t// get the map tops\n\t\t\t\t\t$this->nav[$key] = $this->_tops($val, $view_url);\n\t\t\t\t\t\n\t\t\t\t} elseif (isset($this->path[$key-1])) {\n\t\t\t\t\n\t\t\t\t\t// get children\n\t\t\t\t\t$prev_page = $this->path[$key-1];\n\t\t\t\t\t$this->nav[$key] = $this->_kids($prev_page, $val, $view_url);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// and get the first nav element below this page.\n\t\t\t$prev_page = $val;\n\t\t\t$this->nav[$key+1] = $this->_kids($prev_page, $this->page,\n\t\t\t\t$view_url, true);\n\t\t\t\n\t\t} else {\n\n\t\t\t// Set the nav element to the top level page list for the area, so\n\t\t\t// that the list of top level pages is shown even if we move outside\n\t\t\t// the area map.\n\t\t\t$this->nav[0] = $this->_tops(\"\", $view_url);\n\t\t}\n\t\t\t\n\t\t\n\t\t// nav to AreaMap, edit, history, and links\n\t\t$this->nav['map'] =\tsprintf($view_url, 'AreaMap');\n\t\t$this->nav['history'] = sprintf($view_url, $this->page) . '&view=history';\n\t\t$this->nav['links'] = sprintf($view_url, $this->page) . '&view=links';\n\t\t$this->nav['source'] = sprintf($view_url, $this->page) . '&view=source';\n\t\t$this->nav['rss'] = sprintf($this->conf['absolute_url'].\"rss.php?area=%s&page=%s\", $this->area, $this->page);\n\t\t$this->nav['edit'] = sprintf($this->conf['absolute_url'].\"edit.php?area=%s&page=%s\", $this->area, $this->page);\n\t}",
"function add_navigation($tp, $page, $npages, $order, $mode, $extra_params)\n{\n #\n # Display links to change mode or ordering\n #\n $params = [\n 'page' => 1,\n 'order' => $order,\n ];\n $params = array_merge($params, $extra_params);\n\n if ($mode == \"thumbnail\") {\n $params[\"mode\"] = \"listing\";\n $tp['alt_display_label'] = 'Listing';\n } else {\n $params[\"mode\"] = \"thumbnail\";\n $tp['alt_display_label'] = 'Thumbnails';\n }\n $tp['ne_alt_display_url'] = encode_argv_url($params);\n\n $params = [\n 'page' => 1,\n 'mode' => $mode,\n ];\n $params = array_merge($params, $extra_params);\n\n if ($order == \"location\") {\n $params[\"order\"] = \"year\";\n $tp['alt_order_label'] = 'Year';\n } else {\n $params[\"order\"] = \"location\";\n $tp['alt_order_label'] = 'Location';\n }\n $tp['ne_alt_order_url'] = encode_argv_url($params);\n\n if ($npages <= 1) {\n return $tp;\n }\n\n if ($mode == \"thumbnail\") {\n #\n # Instantiate the page navigation templates for the top and bottom of\n # the page\n #\n $tp['page'] = $page;\n $tp['npages'] = $npages;\n\n $params = [\n 'mode' => $mode,\n 'order' => $order,\n ];\n $params = array_merge($params, $extra_params);\n\n if ($page > 1) {\n $params['page'] = 1;\n $tp['ne_nav_first_page_url'] = encode_argv_url($params);\n $params['page'] = $page - 1;\n $tp['ne_nav_prev_page_url'] = encode_argv_url($params);\n }\n\n if ($page < $npages) {\n $params['page'] = $page + 1;\n $tp['ne_nav_next_page_url'] = encode_argv_url($params);\n $params['page'] = $npages;\n $tp['ne_nav_last_page_url'] = encode_argv_url($params);\n }\n }\n\n return $tp;\n}",
"private function gen_nav_links()\n\t{\n\t\t$this->template->assign_block_vars('navlinks', array(\n\t\t\t'S_IS_CAT'\t\t=> true,\n\t\t\t'S_IS_LINK'\t\t=> false,\n\t\t\t'S_IS_POST'\t\t=> false,\n\t\t\t'FORUM_NAME'\t=> $this->user->lang('BLOG_MAIN'),\n\t\t\t'FORUM_ID'\t\t=> -1,\n\t\t\t'U_VIEW_FORUM'\t=> append_sid('blog'),\n\t\t));\n\t}",
"public function getNav() \n {\n //@return : $stri_html : affichage du html de la navigation\n \n\t\t$stri_html =\"\";\n \n //**** START - navigation previous\n //si la page précédente > 1 alors affichage du lien sinon affichage du label (if previous page > 1 then put link else label)\n\t\t$stri_html .= ($this->int_page_prev > 0) ? $this->obj_a_prev->htmlValue() : $this->obj_lb_prev->htmlValue(); \n\t\t$stri_html .= \" | \";\n\t\t//**** END - navigation previous\n\t\t\n\t\t\n //**** DEBUT corps navigator\n\n // calcule le milieu pour les liens de page dans le but d'avoir la page courante au centre de la navigation (determine the middle of link to post courant page in middle)\n\t\t$int_middle = floor($this->int_limit_page / 2);\n\n\t\t// calcule la page minimum à afficher dans les liens (determine the min page)\n $minpage = (($this->int_page - $int_middle)<1) ? 1 : $this->int_page - $int_middle;\t\t\n\n // calcule la page maximum à afficher dans les liens (determine the max page)\n\t\t$maxpage = (($this->int_page + $int_middle)> $this->int_pages)? $this->int_pages : ($this->int_page + $int_middle);\n\n // pour chaque lien de navigation (post each page)\n\t\tforeach (range($minpage, $maxpage) as $i) \n {\n\t\t\tif ($i == $this->int_page) \n { \n // selected page\n $this->obj_lb_courant_page->setValue($i);\n\t\t\t\t$stri_html .= $this->obj_lb_courant_page->htmlValue(); \n\t\t\t} \n else \n {\n // other page\n $this->obj_a_page->setValue($i);\n $this->obj_a_page->setOnClick(\"document.form_page.start.value=\".$i.\";document.form_page.submit();\");\n \n\t\t\t\t$stri_html.=\" \".$this->obj_a_page->htmlValue().\" \";\n\t\t\t}\n\t\t}\n\n //**** END corps navigation\n \n \n //**** START - navigation next\n //si la page suivante <= nb de pages alors affichage du lien sinon affichage du label (if next page <= number of page then put link else label)\n\t\t$stri_html .= \" | \";\n\t\t$stri_html .= ($this->int_page_next <= $this->int_pages) ? $this->obj_a_next->htmlValue() : $this->obj_lb_next->htmlValue(); \n //**** END - navigation next\n\n\t\treturn $stri_html;\n\t}",
"function page_nav() {\n global $user;\n global $xtpl;\n \n $xtpl->assign('nav_base', trim(simpleid_url(' ', '', true)));\n \n if ($user != NULL) {\n if (isset($user['administrator']) && ($user['administrator'] == 1)) $xtpl->parse('main.nav.nav_admin');\n \n }\n $xtpl->parse('main.nav');\n}",
"private function stepNav() {\n $course = $this->step->course;\n\t\t$root = $course->root;\n\t\t$stepUrl = $this->step->url;\n\n\t\t$prev = $this->stepSection->prev;\n\t\t$prevUrl = $prev !== null ? $prev->url : $stepUrl;\n\n\t\t$next = $this->stepSection->next;\n\t\t$nextUrl = $next !== null ? $next->url : $stepUrl;\n\t\t\n\t\t$html = <<<END1\n<div class=\"cl-stepnav-div\"><nav class=\"cl-stepnav cl-nav\"><div><ul>\n<li><a href=\"$stepUrl\"><span>Return to Step Page</span>\n<img alt=\"Return to Step\" width=\"28\" height=\"25\" src=\"$root/vendor/cl/step/img/returnstep.png\" /></a></li>\nEND1;\n\n\t\t// Extra menu items here\n\t\tforeach($this->step->menuExtra as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\n\t\t$html .= <<<HTML\n<li><a href=\"$prevUrl\"><span>Previous Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/previcon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\"><span>Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/nexticon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\" class=\"cl-step-completed-next\"><span>Mark Completed and Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/checknext.png\" width=\"40\" /></a></li>\n<li class=\"cl-step-progress\"></li>\nHTML;\n\n\t\t// Appended menu items here\n\t\tforeach($this->step->menuAppend as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\t\t\n\t\t/*\n\t\t * End of menu bar \n\t\t */\n\t\t$html .= <<<HTML\n</ul></div>\n</nav></div>\nHTML;\n\t\n\t\treturn $html;\n\t}",
"public function run() {\n foreach (self::$NAVIGATIONS as $NAVIGATION) {\n Navigation::create($NAVIGATION);\n }\n }",
"public static function getNavigator($currentPage) {\n\t\tif (strcmp ( $currentPage, \"/\" ) == 0) {\n\t\t\theader ( \"Location: \".ConfigUtil::getSiteName());\n\t\t\tdie ();\n\t\t}\n\t\t\n\t\t// if (! UserLoginUtils::isLogin ()) {\n\t\t// $this->redirect ( Yii::app ()->createUrl ( 'Site/login' ) );\n\t\t// }\n\t\t\n\t\t$currentPage = str_replace ( ConfigUtil::getAppName (), \"\", $currentPage );\n\t\t\n\t\t$link = explode ( \"/\", $currentPage );\n\t\t\n\t\t$_tmpPage = \"\";\n\t\tswitch (count ( $link )) {\n\t\t\tcase 3 :\n\t\t\t\tbreak;\n\t\t\tcase 4 :\n\t\t\t\t$_tmpPage = \"/\" . $link [3];\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$nav = \"\";\n\t\t\n\t\t$nav = $nav . \"<li>\";\n\t\t$nav = $nav . \"<i class=\\\"fa fa-home\\\"></i>\";\n\t\t$nav = $nav . \"<a href=\\\"\" . \"#\" . \"\\\">Home</a>\";\n\t\t$nav = $nav . \"</li>\";\n\t\t\n\t\t$criMenu = new CDbCriteria ();\n\t\t$criMenu->condition = \"URL_NAVIGATE = '/\" . $link [1] . \"/\" . $link [2] . ($link [2] == \"Report\" ? \"/\" . $link [3] : \"\") . \"'\";\n\t\t\n\t\t// echo \"<font color='red'>/\" . $link [1] . \"/\" . $link [2] . $_tmpPage .' ('.count($link).\")\". \"</font>\";\n\t\t\n\t\t$childs = Menu::model ()->findAll ( $criMenu );\n\t\tif (isset ( $childs )) {\n\t\t\t\n\t\t\tforeach ( $childs as $child ) {\n\t\t\t\t\n\t\t\t\tif (0 === strpos ( $currentPage, $child->URL_NAVIGATE )) {\n\t\t\t\t\t\n\t\t\t\t\t$criMenuParent = new CDbCriteria ();\n\t\t\t\t\t$criMenuParent->condition = \"MENU_ID = \" . $child->PREVIOUS_MENU_ID;\n\t\t\t\t\t\n\t\t\t\t\t$parent = Menu::model ()->findAll ( $criMenuParent );\n\t\t\t\t\tif (isset ( $parent [0] )) {\n\t\t\t\t\t\t$nav = $nav . \"<li>\";\n\t\t\t\t\t\t$nav = $nav . \"<i class=\\\"fa fa-angle-right\\\"></i>\";\n\t\t\t\t\t\t$nav = $nav . \"<a href=\\\"\" . (ConfigUtil::getAppName () . $child->URL_NAVIGATE) . \"\\\">\" . $parent [0]->MENU_NAME . \"</a>\";\n\t\t\t\t\t\t$nav = $nav . \"</li>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$nav = $nav . \"<li>\";\n\t\t\t\t\t$nav = $nav . \"<i class=\\\"fa fa-angle-right\\\"></i>\";\n\t\t\t\t\t$nav = $nav . \"<a href=\\\"#\\\">\" . $child->MENU_NAME . \"</a>\";\n\t\t\t\t\t$nav = $nav . \"</li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $nav;\n\t}",
"function getPagesLinks()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$lang =& JFactory::getLanguage();\n\n\t\t// Build the page navigation list\n\t\t$data = $this->_buildDataObject();\n\n\t\t$list = array();\n\n\t\t$itemOverride = false;\n\t\t$listOverride = false;\n\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\n\t\tif (file_exists($chromePath))\n\t\t{\n\t\t\trequire_once ($chromePath);\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\n\t\t\t\t$itemOverride = true;\n\t\t\t}\n\t\t\tif (function_exists('pagination_list_render')) {\n\t\t\t\t$listOverride = true;\n\t\t\t}\n\t\t}\n\n\t\t// Build the select list\n\t\tif ($data->all->base !== null) {\n\t\t\t$list['all']['active'] = true;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\n\t\t} else {\n\t\t\t$list['all']['active'] = false;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\n\t\t}\n\n\t\tif ($data->start->base !== null) {\n\t\t\t$list['start']['active'] = true;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\n\t\t} else {\n\t\t\t$list['start']['active'] = false;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\n\t\t}\n\t\tif ($data->previous->base !== null) {\n\t\t\t$list['previous']['active'] = true;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\n\t\t} else {\n\t\t\t$list['previous']['active'] = false;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\n\t\t}\n\n\t\t$list['pages'] = array(); //make sure it exists\n\t\tforeach ($data->pages as $i => $page)\n\t\t{\n\t\t\tif ($page->base !== null) {\n\t\t\t\t$list['pages'][$i]['active'] = true;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\n\t\t\t} else {\n\t\t\t\t$list['pages'][$i]['active'] = false;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\n\t\t\t}\n\t\t}\n\n\t\tif ($data->next->base !== null) {\n\t\t\t$list['next']['active'] = true;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\n\t\t} else {\n\t\t\t$list['next']['active'] = false;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\n\t\t}\n\t\tif ($data->end->base !== null) {\n\t\t\t$list['end']['active'] = true;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\n\t\t} else {\n\t\t\t$list['end']['active'] = false;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\n\t\t}\n\n\t\tif($this->total > $this->limit){\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\n\t\t}\n\t\telse{\n\t\t\treturn '';\n\t\t}\n\t}",
"function pageNav($page, $lastPage, $pageType){\n\n\t\t/* Lets work with integers */\n\t\t$page = (int)$page;\n\n\t\t/* Build navigation */\n\t\t$prev = $page - 1;\n\t\t$next = $page + 1;\n\n\t\t/* Changes URL prefix based on Page Type */\n\t\t$prefix = $_GET[$pageType];\n\n\t\t/* Start HTML */\n\t\t$output = '<nav class=\"pagenav\"><ul>';\n\t\tif($prev !== 0) $output .= '<li class=\"prev\"><a href=\"#!/'.$pageType.'='.$prefix.'&page='.$prev.'\">Previous</a></li>';\n\t\t$output .= '<li class=\"current\"><span class=\"current_page\">'.$page.'</span> of <span class=\"last\">'.$lastPage.'</span></li>';\n\t\tif($page < $lastPage)$output .= '<li class=\"next\"><a href=\"#!/'.$pageType.'&page='.$next.'\">Next</a></li>';\n\t\t$output .= '</ul></nav>';\n\t\t\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}",
"function makeLinks($nav1)\n{\n $myReturn = '';\n foreach($nav1 as $url => $text){\n \n if($url == THIS_PAGE){\n $myReturn .= \"<li><a class=\\\"selected\\\" href=\\\"$url\\\">$text</a></li>\";\n }else{\n $myReturn .= \"<li><a href=\\\"$url\\\">$text</a></li>\";\n }\n }\n \n return $myReturn;\n}",
"function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}",
"function navigation($subject_array, $page_array){\n\t\t$html_string = \"<ul class =\\\"subjects\\\">\";\n\t\t $subject_result = find_all_subjects(false);\n\t\t\t\t// Show output Database\n\t\t\t\twhile ($subject = mysqli_fetch_assoc($subject_result)){\n\t\t\t\n\t\t\t\t\t$html_string .= \"<li\";\n\t\t\t\t\tif ($subject_array && $subject[\"id\"] == $subject_array[\"id\"]) {\n\t\t\t\t\t\t$html_string .= \" class=\\\"selected\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\t$html_string .= \">\";\n\t\t\t\t$html_string .= \"<a href =\\\"manage_content.php?subject=\";\n\t\t\t\t$html_string .= urlencode($subject[\"id\"]); \n\t\t\t\t$html_string .= \"\\\">\";\n\t\t\t\t$html_string .= htmlentities($subject[\"menu_name\"]);\n\t\t\t\t$html_string .= \"</a></li>\";\n\t\t\t\t$page_result = find_pages($subject[\"id\"],false); \n\t\t\t\t$html_string .= \"<ul class =\\\"pages\\\">\";\n\t\t\t\t while ($page = mysqli_fetch_assoc($page_result)){ \n\t\t\t\t\t $html_string .= \"<li\";\n\t\t\t\t\t\tif ($page_array && $page[\"id\"] == $page_array[\"id\"]){ \n\t\t\t\t\t\t\t$html_string .= \" class=\\\"selected\\\"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$html_string .= \">\";\n\t\t\t\t\t\n\t\t\t\t$html_string .= \"<a href =\\\"manage_content.php?page=\";\n\t\t\t\t$html_string .= urlencode($page[\"id\"]);\n\t\t\t\t$html_string .= \"\\\">\";\n\t\t\t\t$html_string .= htmlentities($page[\"menu_name\"]);\n\t\t\t\t$html_string .= \"</a></li>\";\t\n\t\t\t}\n\t\t\t\t mysqli_free_result($page_result); // release the page data.\n\t\t\t$html_string .= \"</ul>\";\n\t\t\n\t } \n\t\t mysqli_free_result($subject_result); // release the subject data. \n\t\t$html_string .= \"</ul>\";\n\t\treturn $html_string;\n\t}",
"private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }",
"function makeLinks($nav1)\r\n{\r\n $myReturn = '';\r\n foreach($nav1 as $url => $text){\r\n \r\n if($url == THIS_PAGE){\r\n $myReturn .= \"<li><a class=\\\"selected\\\" href=\\\"$url\\\">$text</a></li>\";\r\n }else{\r\n $myReturn .= \"<li><a href=\\\"$url\\\">$text</a></li>\";\r\n }\r\n }\r\n \r\n return $myReturn;\r\n\r\n \r\n}",
"public function appendNavigation(){\n\t\t\t$nav = $this->getNavigationArray();\n\n\t\t\t/**\n\t\t\t * Immediately before displaying the admin navigation. Provided with the\n\t\t\t * navigation array. Manipulating it will alter the navigation for all pages.\n\t\t\t *\n\t\t\t * @delegate NavigationPreRender\n\t\t\t * @param string $context\n\t\t\t * '/backend/'\n\t\t\t * @param array $nav\n\t\t\t * An associative array of the current navigation, passed by reference\n\t\t\t */\n\t\t\tSymphony::ExtensionManager()->notifyMembers('NavigationPreRender', '/backend/', array('navigation' => &$nav));\n\n\t\t\t$xNav = new XMLElement('ul');\n\t\t\t$xNav->setAttribute('id', 'nav');\n\n\t\t\tforeach($nav as $n){\n\t\t\t\tif($n['visible'] == 'no') continue;\n\n\t\t\t\t$can_access = false;\n\n\t\t\t\tif(!isset($n['limit']) || $n['limit'] == 'author')\n\t\t\t\t\t$can_access = true;\n\n\t\t\t\telseif($n['limit'] == 'developer' && Administration::instance()->Author->isDeveloper())\n\t\t\t\t\t$can_access = true;\n\n\t\t\t\telseif($n['limit'] == 'primary' && Administration::instance()->Author->isPrimaryAccount())\n\t\t\t\t\t$can_access = true;\n\n\t\t\t\tif($can_access) {\n\t\t\t\t\t$xGroup = new XMLElement('li', $n['name']);\n\t\t\t\t\tif(isset($n['class']) && trim($n['name']) != '') $xGroup->setAttribute('class', $n['class']);\n\n\t\t\t\t\t$hasChildren = false;\n\t\t\t\t\t$xChildren = new XMLElement('ul');\n\n\t\t\t\t\tif(is_array($n['children']) && !empty($n['children'])){\n\t\t\t\t\t\tforeach($n['children'] as $c){\n\t\t\t\t\t\t\tif($c['visible'] == 'no') continue;\n\n\t\t\t\t\t\t\t$can_access_child = false;\n\n\t\t\t\t\t\t\tif(!isset($c['limit']) || $c['limit'] == 'author')\n\t\t\t\t\t\t\t\t$can_access_child = true;\n\n\t\t\t\t\t\t\telseif($c['limit'] == 'developer' && Administration::instance()->Author->isDeveloper())\n\t\t\t\t\t\t\t\t$can_access_child = true;\n\n\t\t\t\t\t\t\telseif($c['limit'] == 'primary' && Administration::instance()->Author->isPrimaryAccount())\n\t\t\t\t\t\t\t\t$can_access_child = true;\n\n\t\t\t\t\t\t\tif($can_access_child) {\n\t\t\t\t\t\t\t\t$xChild = new XMLElement('li');\n\t\t\t\t\t\t\t\t$xChild->appendChild(\n\t\t\t\t\t\t\t\t\tWidget::Anchor($c['name'], SYMPHONY_URL . $c['link'])\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$xChildren->appendChild($xChild);\n\t\t\t\t\t\t\t\t$hasChildren = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($hasChildren){\n\t\t\t\t\t\t\t$xGroup->appendChild($xChildren);\n\t\t\t\t\t\t\t$xNav->appendChild($xGroup);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->Header->appendChild($xNav);\n\t\t\tAdministration::instance()->Profiler->sample('Navigation Built', PROFILE_LAP);\n\t\t}",
"function simple_pages_navigation($parentId = 0, $sort = 'order', $requiresIsPublished = true)\n{\n $html = '';\n $childPageLinks = simple_pages_get_links_for_children_pages($parentId, $sort, $requiresIsPublished);\n if ($childPageLinks) {\n $html .= '<div class=\"simple-pages-navigation\">' . \"\\n\";\n $html .= nav($childPageLinks);\n $html .= '</div>' . \"\\n\";\n }\n return $html;\n}",
"public function buildNavigation()\r\n\t{\r\n\t\t$uri\t=\tDunUri :: getInstance( 'SERVER', true );\r\n\t\t$uri->delVars();\r\n\t\t$uri->setVar( 'module', 'intouch' );\r\n\t\t\r\n\t\t$data\t\t=\t'<ul class=\"nav nav-pills\">';\r\n\t\t$actions\t=\tarray( 'default', 'syscheck', 'groups', 'configure', 'updates', 'license' );\r\n\t\t\r\n\t\tforeach( $actions as $item ) {\r\n\t\t\tif ( $item == $this->action && in_array( $this->task, array( 'default', 'save' ) ) ) {\r\n\t\t\t\t$data .= '<li class=\"active\"><a href=\"#\">' . t( 'intouch.admin.navbar.' . $item ) . '</a></li>';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t\t$data .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'intouch.admin.navbar.' . $item ) . '</a></li>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data\t.= '</ul>';\r\n\t\treturn $data;\r\n\t}",
"public function pageNav()\n {\n $pager = $this->getPublisher()->getPagination()['pager'];\n $html = \"\\n<nav>\\n <ul class=\\\"pagination\\\">\";\n\n if ($pager['pages']['prev']) {\n $html .= \"\\n <li><a href=\\\"\".$pager['pages']['prev'].\n \"\\\" aria-label=\\\"\".$this->getConfig()->ls('ui.nav.previous').\n \"\\\"><span aria-hidden=\\\"true\\\">«</span></a><li>\";\n } else\n $html .= \"\\n <li class=\\\"disabled\\\"><span><span aria-hidden=\\\"true\\\">«</span></span></li>\";\n\n $pages = $this->getPublisher()->getPagination()['page_menu']['pages'];\n foreach($pages as $page_num => $data) {\n if ($data['url']) // not the current page\n $html .= \"\\n <li><a href=\\\"\".$data['url'].\"\\\">\".$page_num.\"</a></li>\";\n else\n $html .= \"\\n <li class=\\\"active\\\"><span>\".$page_num.\"<span class=\\\"sr-only\\\">(current)</span></span></li>\";\n }\n\n if ($pager['pages']['next']) {\n $html .= \"\\n <li><a href=\\\"\".$pager['pages']['next'].\n \"\\\" aria-label=\\\"\".$this->getConfig()->ls('ui.nav.next').\n \"\\\"><span aria-hidden=\\\"true\\\">»</span></a><li>\";\n } else\n $html .= \"\\n <li class=\\\"disabled\\\"><span><span aria-hidden=\\\"true\\\">»</span></span></li>\";\n\n $html .= \"\\n </ul>\\n</nav>\\n\\n\";\n\n return $html;\n }",
"function internal_generate_navigation() {\n $nav = 'internal_navigation_item';\n\n // Output\n $output = <<<HEREDOC\n<header class=\"global-header\">\n\t<nav>\n\t\t<ul>\n {$nav(\"Home\", \"index.php\")}\n {$nav(\"Cheese Map\", \"map.php\")}\n {$nav(\"Recipes\", \"recipes.php\")}\n {$nav(\"About\", \"about.php\")}\n {$nav(\"Shop\", \"shop.php\")}\n\t\t</ul>\n\t</nav>\n</header>\nHEREDOC;\n\n // Return Output\n echo $output;\n}",
"function show_navigation()\n {\n }",
"public function onNavigationMainSecond($event) {\n $pages = PageProvider::navigation();\n\n // separate the first page\n $this->home = $pages[0];\n unset($pages[0]);\n\n // add the pages to the nav bar\n foreach ($pages as $page) {\n // each page slug is preppended by 'pages/'\n $page['slug'] = 'pages/'.$page['slug'];\n // add each page to the main nav bar\n Navigation::addMain('default', $page);\n }\n }",
"function honeycomb_post_nav() {\n\t\t$args = array(\n\t\t\t'next_text' => '%title',\n\t\t\t'prev_text' => '%title',\n\t\t\t);\n\t\tthe_post_navigation( $args );\n\t}",
"public function getPagesLinks()\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t// Yjsg instance\r\n\t\t$yjsg = Yjsg::getInstance(); \r\n\t\t\r\n\t\t// Build the page navigation list.\r\n\t\t$data = $this->_buildDataObject();\r\n\r\n\t\t$list = array();\r\n\t\t$list['prefix'] = $this->prefix;\r\n\r\n\t\t$itemOverride = false;\r\n\t\t$listOverride = false;\r\n\r\n\t\t$chromePath \t= JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php';\r\n\t\t//yjsg start\r\n\t\tif (!file_exists($chromePath)){\r\n\t\t\tif($yjsg->preplugin()){\r\n\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'legacy' . YJDS . 'html' . YJDS . 'pagination.php';\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'includes' . YJDS . 'html' . YJDS . 'pagination.php';\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//yjsg end\r\n\t\tif (file_exists($chromePath))\r\n\t\t{\r\n\t\t\tinclude_once $chromePath;\r\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive'))\r\n\t\t\t{\r\n\t\t\t\t$itemOverride = true;\r\n\t\t\t}\r\n\t\t\tif (function_exists('pagination_list_render'))\r\n\t\t\t{\r\n\t\t\t\t$listOverride = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Build the select list\r\n\t\tif ($data->all->base !== null)\r\n\t\t{\r\n\t\t\t$list['all']['active'] = true;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['all']['active'] = false;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\r\n\t\t}\r\n\r\n\t\tif ($data->start->base !== null)\r\n\t\t{\r\n\t\t\t$list['start']['active'] = true;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['start']['active'] = false;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\r\n\t\t}\r\n\t\tif ($data->previous->base !== null)\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = true;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = false;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\r\n\t\t}\r\n\r\n\t\t$list['pages'] = array(); //make sure it exists\r\n\t\tforeach ($data->pages as $i => $page)\r\n\t\t{\r\n\t\t\tif ($page->base !== null)\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = true;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = false;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($data->next->base !== null)\r\n\t\t{\r\n\t\t\t$list['next']['active'] = true;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['next']['active'] = false;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\r\n\t\t}\r\n\r\n\t\tif ($data->end->base !== null)\r\n\t\t{\r\n\t\t\t$list['end']['active'] = true;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['end']['active'] = false;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\r\n\t\t}\r\n\r\n\t\tif ($this->total > $this->limit)\r\n\t\t{\r\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}",
"function pagenavigation($folderID,$npages,$page=0,$delim=' | ') {\n\t\tif ($npages < 2) return;\n\n\t\t// INITIALISE VALUES\n\t\t$navlink = '<a href=\"%s\">%s</a>';\n\t\t$navarr = array($this->lang['page']);\n\n\t\t// GENERATE PAGE LINKS\n\t\tfor ($i=1; $i <= $npages; $i++) {\n\t\t\tif ($page === $i) {\n\t\t\t\t$navarr[] = $i;\n\t\t\t} else {\n\t\t\t\t$query\t = array('fID'=>$folderID,'page'=>$i);\n\t\t\t\t$navarr[] = sprintf($navlink, $this->getGalleryLink($query), $i);\n\t\t\t}\n\t\t}\n\n\t\t// ALL PAGES LINK\n\t\tif ($page === 'all') {\n\t\t\t$navarr[] = $this->lang['all'];\n\t\t} else {\n\t\t\t$query\t = array('fID'=>$folderID, 'page'=>'all');\n\t\t\t$navarr[] = sprintf($navlink, $this->getGalleryLink($query),$this->lang['all']);\n\t\t}\n\n\t\t// BUILT NAVIGATION STRING\n\t\treturn implode($delim, $navarr);\n\t}",
"public function nav()\n {\n $PagesAdmin=new LaraPagesController;\n $PagesAdmin->modelId='media';\n return $PagesAdmin->nav();\n }",
"public function registerNavigation() {\n\t\t//$this->addNavigationSubGroup('Subgroup Name', 'moduleName.ReportName', 'Anchor Text', order (int, optional),'privlege (optional)', 'Group Name (optional)');\n\t\t// Note that moduleName.reportName should match the report you want the subgroup to link to\n\t\t// E.g.: example.reportDashboard links to the report controlled by reportDashboard.php\n\t\t$this->addNavigationSubGroup('Example', 'example.reportDashboard', 'Example');\n\t\t\n\t\t// (same args as addNavigationSubgroup)\n\t\t$this->addNavigationLinkInSubGroup('Example','example.subReport','Example Subreport',1);\n\t\t$this->addNavigationLinkInSubGroup('Example','example.reportCharts','Assorted Charts',2);\n\t\t\n\t}",
"function create_navigation($userID) {\n return create_element(\"div\", true, [ \"contents\" => [\n create_element(\"a\", true, [\n \"href\" => \"http://$_SERVER[HTTP_HOST]/dz2\",\n \"contents\" => \"Početna stranica\"\n ]),\n \" \",\n create_element(\"a\", true, [\n \"href\" => \"http://$_SERVER[HTTP_HOST]/dz2/createGallery.php\",\n \"contents\" => \"Dodaj galeriju\"\n ]),\n \" \",\n create_element(\"a\", true, [\n \"href\" => \"http://$_SERVER[HTTP_HOST]/dz2/photoUpload.php\",\n \"contents\" => \"Prijenos slika\"\n ]),\n \" \",\n create_element(\"a\", true, [\n \"href\" => \"http://$_SERVER[HTTP_HOST]/dz2/listPhotos.php?id=\".$userID,\n \"contents\" => \"Pregled slika\"\n ])\n ]]);\n}",
"public function main_navigation(){\r\n\r\n echo \"<ul>\";\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n echo \"<li>\";\r\n echo \"<a href='$value'>$key</a>\";\r\n echo \"</li>\";\r\n }\r\n\r\n }\r\n\r\n echo \"</ul>\";\r\n\r\n }",
"function makeNav($conn, $loggedIn, $thisPagename){\n $sql = \"SELECT pagename, pagetitle FROM test.navigation\";\n $result = $conn->query($sql);\n\n if($loggedIn == \"logged in\"){\n $loggedInClass = \"loggedin\";\n } else {\n $loggedInClass = \"notloggedin\";\n }\n\n echo \"<ul class='\" . $loggedInClass . \"'>\";\n\n // outputs the rows of results from the navigation,\n // setting the active variable for the page that is active\n while ( $row = $result->fetch_assoc() ) {\n if ( $thisPagename == $row['pagename']){\n $active = \"active\";\n } else {\n $active = \"\";\n }\n\n echo \"<li class='\" . $active . \"''><a href='\" . $row['pagename'] . \"'>\" .$row['pagetitle']. \"</a></li>\";\n }\n\n // Outputs the login links\n if ($loggedIn == \"not logged in\"){\n echo \"<li><a href='login.php'>Log In</a></li>\";\n } else {\n echo \"<li><a href='logout.php'>Log Out \" . $_SESSION[\"realname\"] . \"</a></li>\";\n }\n echo \"</ul>\";\n }",
"function create_custom_pages() {\n $custom_pages = array(\n 'issues' => 'Issues',\n 'weeklies' => 'Weeklies',\n 'artists' => 'Artists',\n 'contributors' => 'Contributors',\n 'incubator' => 'Incubator',\n 'about' => 'About',\n 'shop' => 'Shop',\n 'contribute' => 'How to Contribute',\n 'contact' => 'Contact Us',\n 'faq' => 'FAQ',\n 'definitions' => 'Definitions',\n 'terms-and-conditions' => 'Terms & Conditions',\n 'bag' => 'Bag',\n );\n foreach($custom_pages as $page_name => $page_title) {\n $page = get_page_by_path($page_name);\n if( empty($page) ) {\n wp_insert_post( array(\n 'post_type' => 'page',\n 'post_title' => $page_title,\n 'post_name' => $page_name,\n 'post_status' => 'publish'\n ));\n }\n }\n}",
"protected function init_pages() {\r\n\t\t\t$include_array = [];\r\n\r\n\t\t\t$files = glob( $this->include_path . '/Page/*.php' );\r\n\t\t\t$obj = new ReflectionClass( $this );\r\n\r\n\t\t\tforeach ( $files as $file ) {\r\n\t\t\t\t$name = basename( $file );\r\n\t\t\t\t$not_included = array();\r\n\t\t\t\tif ( ! in_array( $name, $not_included ) ) {\r\n\t\t\t\t\t$name = str_replace( '.php', '', $name );\r\n\t\t\t\t\t$namespace = $obj->getNamespaceName();\r\n\t\t\t\t\tarray_push( $include_array, $namespace . '\\\\Page\\\\' . $name );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach ( $include_array as $page ) {\r\n\t\t\t\tnew $page( $this->include_path );\r\n\t\t\t}\r\n\r\n\t\t}",
"function createPage();",
"function template_navigation() {\n\t\t$_ENV['menu'] = array();\n\t\t$_ENV['menu']['Main'] = _URL_;\n\t\tModule::includes('menus');\n\t\t$_ENV['menu']['Preferences'] = '?module=prefs';\n\t\t$_ENV['menu']['Logout'] = '?logout=true';\n\n\t\t$buffer = '<ul><li><h2>';\n\t\t$buffer .= array_key_exists('Menu',$_ENV['imgs']['menu']) \n\t\t\t? '<img src=\"'.$_ENV['imgs']['menu']['Menu'].'\" border=\"0\" /> ' : ' ';\n\t\t$buffer .= ' Main Menu</h2><ul>';\n\t\tforeach ($_ENV['menu'] as $module => $items) {\n\t\t\tif (is_array($items)) {\n\t\t\t\t$buffer .= '<li><a href=\"#\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.'</a><ul>';\n\t\t\t\tforeach ($items as $label => $url) {\n\t\t\t\t\t$buffer .= '<li><a href=\"'.$url.'\">';\n\t\t\t\t\t$buffer .= array_key_exists($label,$_ENV['imgs']['menu'])\n\t\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$label].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t\t$buffer .= $label.'</a></li>';\n\t\t\t\t}\n\t\t\t\t$buffer .= '</ul></li>';\n\t\t\t} else {\n\t\t\t\t$buffer .= '<li><a href=\"'.$items.'\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.' </a></li>';\n\t\t\t}\t\n\t\t}\n\t\t$buffer .= '</ul></li></ul>';\n\t\treturn $buffer;\n\t}",
"function page_navigation2($cpage=1,$url)\r\n{\r\n if($cpage<1||$cpage>$this->page_count) $cpage=1;\r\n if($cpage>1)\r\n {\r\n $before=$cpage-1;\r\n $str=\"<a href='\".str_replace(\"{page}\",$before,$url).\" '>Previous</a>\";\r\n }\r\n if($cpage<$this->page_count){\r\n\t$next=$cpage+1;\r\n\t$str.=\" <a href='\".str_replace(\"{page}\",$next,$url).\" '>Next</a> \";\r\n }\r\n $ib=($cpage-$this->prepage)>1?($cpage-$this->prepage):1 ;\r\n $ie=($cpage + $this->nextpage)<=$this->page_count ? ($cpage + $this->nextpage):$this->page_count; \r\n for($i=$ib;$i<=$ie;$i++){\r\n if($i== $cpage)\r\n $str .= \" <a href='\".str_replace(\"{page}\",$i,$url).\"'><font color=red>\".$i.\"</font></a> \";\r\n else{\r\n $str .= \" <a href='\".str_replace(\"{page}\",$i,$url).\"'>\".$i.\"</a> \";\r\n }\r\n }\r\n $str.=' Total Records:'.$this->item_count;\r\nreturn $str;\r\n\r\n}",
"public function exampleNavigation()\n {\n /*\n $config = array(\n array(\n 'label' => 'Home',\n 'module' => 'example',\n 'controller' => 'index',\n 'action' => 'index',\n ),\n\n array(\n 'label' => 'Coding Guidelines',\n 'module' => 'example',\n 'controller' => 'index',\n 'action' => 'guideslines',\n ),\n\n array(\n 'label' => 'Libraries',\n 'module' => 'example',\n 'controller' => 'index',\n 'action' => 'index',\n 'pages' => array(\n array(\n 'label' => 'Blueprint',\n 'module' => 'example',\n 'controller' => 'library',\n 'action' => 'blueprint',\n ),\n ),\n ),\n );\n\n $container = new Zend_Navigation($config);\n\t\t$this->setContainer($container);\n\n return $this;\n\n */\n $menus = array(\n\n '' => array(\n '/example' => 'Home',\n '/example/index/guideslines' => 'Coding Guidelines',\n ),\n\n 'Libraries' => array(\n //'/example/library/zend' => 'Zend Framework',\n '/example/library/blueprint' => 'Blueprint',\n '/example/library/mootools' => 'Mootools',\n ),\n\n 'Tools' => array(\n '/example/tools/debug' => 'Debug',\n '/example/tools/makefile' => 'MakeFile',\n ),\n\n 'CSS Elements' => array(\n '/example/css/menus' => 'Menus',\n '/example/css/buttons' => 'Fancy Buttons',\n '/example/css/box' => 'Round Box',\n ),\n\n 'JS Elements' => array(\n '/example/javascript/ajaxlink' => 'Ajax Link',\n '/example/javascript/ajaxform' => 'Ajax Form',\n '/example/javascript/lightbox' => 'LightBox',\n '/example/javascript/uwa' => 'UWA Widget',\n ),\n\n 'Form Elements' => array(\n '/example/form/index' => 'Showcases',\n '/example/form/fancyselect' => 'Fancy Select',\n '/example/form/dateselect' => 'Date Select',\n '/example/form/autocompleter' => 'Auto Completer',\n //'/example/form/rangeselect' => 'Range Select Element',\n //'/example/form/contactselect' => 'Contact List Element',\n ),\n\n 'View Helpers' => array(\n '/example/helper/geshi' => 'GeShi',\n '/example/helper/googleanalytics' => 'Google Analytics',\n ),\n\n 'Services' => array(\n '/example/service/xmlrpc' => 'Simple XMLRPC',\n ),\n\n 'Core Classes' => array(\n '/example/core/error' => 'Error Handler',\n '/example/core/controller' => 'Controller Abstract',\n '/example/core/archive' => 'Archive',\n '/example/core/template' => 'Template',\n '/example/core/notify' => 'Notify',\n '/example/core/stitem' => 'StItem/StCollection',\n '/example/core/dbitem' => 'DbItem/DbCollection',\n '/example/core/dbsearch' => 'DbSearch',\n ),\n );\n\n $xhtml = array();\n foreach ($menus as $menu => $links) {\n\n if (strlen($menu) > 0) {\n $xhtml[] = '<h4>' . $this->view->escape($menu) . '</h4>';\n }\n\n $xhtml[] = '<ul>';\n foreach ($links as $link => $label) {\n $xhtml[] = '<li><a href=\"' . $link . '\">' . $this->view->escape($label) . '</a></li>';\n }\n $xhtml[] = '</ul>';\n }\n\n return implode(\"\\n\", $xhtml);\n }",
"function nav_main() {\n\n\techo '\n\t\n\t\t<ul>\n\t\t\t<li><a href=\"index.php?page=home\">Home</a></li>\n\t\t\t<li><a href=\"index.php?page=gallery\">Gallery</a></li>\n\t\t\t<li><a href=\"index.php?page=blog\">Blog</a></li>\n\t\t\t<li><a href=\"index.php?page=newpage\">New Page</a></li>\n\t\t\t<li><a href=\"index.php?page=contact\">Contact Us</a></li>\n\t\t</ul>\n\t\t\n\t';\t\n\t\n}",
"function c12_page_nav( $active ) {\n\t\t\n\t\t$c12_page_nav = '';\n\t\t\n\t\t$items = array(\n\t\t\t'about' => 'à propos',\n\t\t\t'audio' => 'audio',\n\t\t\t'bio' => 'bio',\n\t\t\t'credits' => 'crédits',\n\t\t\t// 'presse' => 'presse',\n\t\t\t'order' => 'commander'\n\t\t);\n\t\t\n\t\t$c12_page_nav = c12_page_nav_global( $items, $active );\n\t\t\n\t\treturn $c12_page_nav;\n\t\t\n\t}",
"private function _getNavigation()\r\n\t{\r\n\t\tglobal $action, $whmcs;\r\n\t\t\r\n\t\t$uri\t= DunUri :: getInstance('SERVER', true );\r\n\t\t$uri->delVar( 'task' );\r\n\t\t$uri->delVar( 'submit' );\r\n\t\t\r\n\t\t$html\t= '<ul class=\"nav nav-pills\">';\r\n\t\t\r\n\t\tforeach( array( 'themes', 'config', 'license' ) as $item ) {\r\n\t\t\t\r\n\t\t\tif ( $item == $action ) {\r\n\t\t\t\tif ( array_key_exists( 'task', $whmcs->input ) ) {\r\n\t\t\t\t\tif ( $whmcs->input['task'] != 'edittheme' ) {\r\n\t\t\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\t\t\tcontinue;\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\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t$html .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t.= '</ul>';\r\n\t\treturn $html;\r\n\t}",
"function public_nav_main()\n{\n $view = get_view();\n $nav = new Omeka_Navigation;\n $nav->loadAsOption(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_OPTION_NAME);\n $nav->addPagesFromFilter(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_FILTER_NAME);\n return $view->navigation()->menu($nav);\n}",
"private function _getNavigation()\r\n\t{\r\n\t\t$input\t= dunloader( 'input', true );\r\n\t\t$action\t= $input->getVar( 'action', 'themes' );\r\n\t\t$task\t= $input->getVar( 'task', null );\r\n\t\t\r\n\t\t$uri\t= DunUri :: getInstance('SERVER', true );\r\n\t\t$uri->delVars();\r\n\t\t$uri->setVar( 'module', 'themer' );\r\n\t\t\r\n\t\t$html\t= '<ul class=\"nav nav-pills\">';\r\n\t\t\r\n\t\tforeach( array( 'themes', 'config', 'license' ) as $item ) {\r\n\t\t\t\r\n\t\t\tif ( $item == $action && $task != 'edittheme' ) {\r\n\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t$html .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t.= '</ul>';\r\n\t\treturn $html;\r\n\t}",
"public function setPages() {\n $this->pages = array(\n array(\n 'page_title' => 'Open Badge',\n 'menu_title' => 'Open Badge',\n 'capability' => 'manage_options',\n 'menu_slug' => self::SLUG_PLUGIN,\n 'callback' => array(DashboardTemp::class, 'main'),\n 'icon_url' => 'dashicons-awards',\n 'position' => '110'\n )\n );\n }",
"function c12_page_nav( $active ) {\n\t\t\n\t\t$c12_page_nav = '';\n\t\t\n\t\t$items = array(\n\t\t\t'about' => 'à propos',\n\t\t\t'about2' => 'about',\n\t\t\t'credits' => 'crédits',\n\t\t\t'bio' => 'bio',\n\t\t\t'order' => 'commander'\n\t\t);\n\t\t\n\t\t$c12_page_nav = c12_page_nav_global( $items, $active );\n\t\t\n\t\treturn $c12_page_nav;\n\t\t\n\t}",
"function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_forn,$totalRows_rs_forn;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_forn\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_forn) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_forn >= $totalRows_rs_forn) ? $totalRows_rs_forn : ($a*$maxRows_rs_forn);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}",
"function get_pageNavHtml($page, $totalPages, $urlPrefix, $showPagesNums = 11)\n{\n if ($totalPages <= 0 || $page <= 0)\n return \"\";\n if ($showPagesNums <3 || $showPagesNums%2 === 0)\n return \"\";\n $pageNavHtml = \"\";\n\n $sideShowPages = floor($showPagesNums/2);\n $start = ($page - $sideShowPages) > 1? $page-$sideShowPages : 1;\n $end = ($page + $sideShowPages) < $totalPages? $page+$sideShowPages : $totalPages;\n\n for ($i = $start; $i<=$end; $i++)\n {\n $eachPageUrl = $urlPrefix.\"page=\".$i;\n $pageNavHtml .= \"<a href='$eachPageUrl' id='page_num_$i'>$i</a> \";\n }\n return $pageNavHtml;\n}",
"function makeLinks($nav){\n \n $myReturn = '';\n foreach($nav as $key => $value){\n \n if(THIS_PAGE == $key)\n {//current page add active class \n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link active\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n \n }else{//add formatting\n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n }\n \n }\n \n return $myReturn;\n \n}",
"function app_template_navigation() {\n global $Auth, $App;\n $user = $Auth->get_user_data();\n $navigation = NULL;\n\n if ( ! empty($user) ) {\n $user_id = $user['is_super'] ? false : $user['user_id'];\n $Menu = new AdminMenu($user_id, $user['is_super']);\n $nav = $Menu->generate();\n $navigation = array(\n 'selector' \t=> $App->config('page_content_id'),\n 'pos_func' \t=> 'insertAfter',\n 'html'\t\t=> $nav['navigation'].$nav['search']\n );\n }\n return $navigation;\n}",
"public function generateNavi()\n {\n // Connect to the model\n $doors = new Door;\n $doors = $doors->get();\n\n $config = new Config;\n if(isset($_GET['userId']))\n {\n $userId = $_GET['userId'];\n }\n else\n {\n $userId = $config->defaultUser.';';\n }\n\n if(isset($_GET['doorId']))\n {\n $this->activeDoor = $_GET['doorId'];\n }\n else\n {\n $this->activeDoor = $config->defaultDoor;\n }\n foreach($doors as $door)\n {\n if($door->door_id == $this->activeDoor) { $active = \"active\"; } else { $active = \"\"; }\n echo '<a href=\"?doorId='.$door->door_id.'&userId='.$userId.'\"><div class=\"col-xs-4 naviEntry '.$active.'\">'.$door->door_name.'</div></a>';\n }\n }",
"function navigation (){\n}",
"function post_navigation() {\n\t\techo '<div class=\"navigation\">';\n\t\techo '\t<div class=\"next-posts\">'.get_next_posts_link('« Older Entries').'</div>';\n\t\techo '\t<div class=\"prev-posts\">'.get_previous_posts_link('Newer Entries »').'</div>';\n\t\techo '</div>';\n\t}",
"function post_navigation() {\n\t\techo '<div class=\"navigation\">';\n\t\techo '\t<div class=\"next-posts\">'.get_next_posts_link('« Older Entries').'</div>';\n\t\techo '\t<div class=\"prev-posts\">'.get_previous_posts_link('Newer Entries »').'</div>';\n\t\techo '</div>';\n\t}",
"function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_novinky,$totalRows_rs_novinky;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($_GET)){\n\t\t\t\t$_GET = empty($_GET) ? $_GET : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_novinky\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_novinky) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_novinky >= $totalRows_rs_novinky) ? $totalRows_rs_novinky : ($a*$maxRows_rs_novinky);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}",
"protected function _getPages(){\n $pages = array(\n array(\n 'main' => array(\n 'label' => 'Dashboard',\n 'controller' => 'dashboard',\n 'action' => 'index'\n ),\n 'pages' => array(\n array(\n 'label' => 'Summary',\n 'controller' => 'dashboard',\n 'action' => 'index',\n ),\n array(\n 'label' => 'Profile',\n 'controller' => 'profile',\n 'action' => 'index',\n ),\n \tarray(\n \t\t'label' => 'Phpinfo',\n \t\t'controller' => 'system',\n \t\t'action' => 'phpinfo',\n \t),\n ),\n ),\n array(\n 'main' => array(\n 'label' => 'System',\n 'controller' => 'system',\n 'action' => 'index'\n ),\n 'pages' => array(\n array(\n 'label' => 'Groups',\n 'controller' => 'groups',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'Users',\n 'controller' => 'users',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'Privileges',\n 'controller' => 'privileges',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'Flags',\n 'controller' => 'flags',\n 'action' => 'index',\n 'scope' => '*'\n ),\n ),\n\n ),\n array(\n 'main' => array(\n 'label' => 'Parameters',\n 'controller' => 'portails',\n 'action' => 'index'\n ),\n 'pages' => array(\n array(\n 'label' => 'Portails',\n 'controller' => 'portails',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'PortailUrl',\n 'controller' => 'portailurl',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'Paramètres',\n 'controller' => 'params',\n 'action' => 'index',\n //'scope' => '*'\n ),\n array(\n 'label' => 'Mails',\n 'controller' => 'mails',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'Exporter',\n 'controller' => 'params',\n 'action' => 'exportparam',\n //'scope' => 'export'\n ),\n ),\n ),\n array(\n 'main' => array(\n 'label' => 'Tools',\n 'controller' => 'tools',\n 'action' => 'index'\n ),\n 'pages' => array(\n array(\n 'label' => 'Generate Models',\n 'controller' => 'generate',\n 'action' => 'index',\n 'scope' => '*'\n ),\n array(\n 'label' => 'Clear Cache',\n 'controller' => 'tools',\n 'action' => 'cleancache',\n //'scope' => '*'\n ),\n array(\n 'label' => 'Bdd',\n 'controller' => 'tools',\n 'action' => 'adminer',\n //'scope' => '*'\n ),\n\n ),\n ),\n array(\n 'main' => array(\n 'label' => 'Backups',\n 'controller' => 'backup',\n 'action' => 'index'\n ),\n 'pages' => array(\n array(\n 'label' => 'Backup Bdd',\n 'controller' => 'backup',\n 'action' => 'bdd',\n //'scope' => '*'\n ),\n array(\n 'label' => 'Backup Files',\n 'controller' => 'backup',\n 'action' => 'files',\n //'scope' => '*'\n ),\n\n ),\n ),\n array(\n 'main' => array(\n 'label' => 'Benchmark',\n 'controller' => 'benchmark',\n 'action' => 'index'\n ),\n 'pages' => array(\n array(\n 'label' => 'Benchmark 1',\n 'controller' => 'benchmark',\n 'action' => 'benchmark1',\n //'scope' => '*'\n ),\n array(\n 'label' => 'Benchmark 2',\n 'controller' => 'benchmark',\n 'action' => 'benchmark2',\n //'scope' => '*'\n ),\n\n ),\n ),\n array(\n 'main' => array(\n 'label' => 'Examples',\n 'controller' => 'system',\n 'action' => 'example'\n ),\n 'pages' => array(\n array(\n 'label' => 'Theme',\n 'controller' => 'system',\n 'action' => 'example',\n //'scope' => '*'\n ),\n array(\n 'label' => 'Errors',\n 'controller' => 'system',\n 'action' => 'example-errors',\n //'scope' => '*'\n ),\n\n ),\n\n ),\n );\n\n return $pages;\n }",
"public function list_pages() {\n\t\t$this->print_prev();\n\n\t\tif ($this->current_page+2 >= $this->total_pages-1) {\n\t\t\t$this->pages_right();\n\t\t} else {\n\t\t\t$this->pages_left();\n\t\t}\n\n\t\t$this->print_next();\n\t}",
"function _setNavigation()\r\n {\r\n global $_ARRAYLANG;\r\n\r\n $ckEditorFuncNum = isset($_GET['CKEditorFuncNum']) ? '&CKEditorFuncNum='.contrexx_raw2xhtml($_GET['CKEditorFuncNum']) : '';\r\n $ckEditor = isset($_GET['CKEditor']) ? '&CKEditor='.contrexx_raw2xhtml($_GET['CKEditor']) : '';\r\n\r\n $this->_objTpl->addBlockfile('FILEBROWSER_NAVIGATION', 'fileBrowser_navigation', 'module_fileBrowser_navigation.html');\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_MEDIA_TYPE_MENU' => $this->_getMediaTypeMenu('fileBrowserType', $this->_mediaType, 'onchange=\"window.location.replace(\\''. \\Cx\\Core\\Csrf\\Controller\\Csrf::enhanceURI('index.php?cmd=FileBrowser').'&standalone=true&langId='.$this->_frontendLanguageId.'&type=\\'+this.value+\\''.$ckEditorFuncNum.'\\')\"'),\r\n 'TXT_FILEBROWSER_PREVIEW' => $_ARRAYLANG['TXT_FILEBROWSER_PREVIEW']\r\n ));\r\n\r\n if ($this->_mediaType != 'webpages') {\r\n // only show directories if the files should be displayed\r\n if (count($this->_arrDirectories) > 0) {\r\n foreach ($this->_arrDirectories as $arrDirectory) {\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_FILE_PATH' => \"index.php?cmd=FileBrowser&standalone=true&langId={$this->_frontendLanguageId}&type={$this->_mediaType}&path={$arrDirectory['path']}\" . $ckEditor . $ckEditorFuncNum,\r\n 'FILEBROWSER_FILE_NAME' => $arrDirectory['name'],\r\n 'FILEBROWSER_FILE_ICON' => $arrDirectory['icon']\r\n ));\r\n $this->_objTpl->parse('navigation_directories');\r\n }\r\n }\r\n }\r\n $this->_objTpl->parse('fileBrowser_navigation');\r\n }",
"function create_pages() {\r\n\r\n $wpc_pages = $this->pre_set_pages();\r\n\r\n $wpc_client_page = get_page_by_title( 'Portal' );\r\n\r\n if ( !isset( $wpc_client_page ) || 0 >= $wpc_client_page->ID ) {\r\n\r\n $current_user = wp_get_current_user();\r\n //Construct args for the new page\r\n $args = array(\r\n 'post_title' => 'Portal',\r\n 'post_status' => 'publish',\r\n 'post_author' => $current_user->ID,\r\n 'post_content' => '[wpc_redirect_on_login_hub]',\r\n 'post_type' => 'page',\r\n 'ping_status' => 'closed',\r\n 'comment_status' => 'closed'\r\n );\r\n $parent_page_id = wp_insert_post( $args );\r\n }\r\n\r\n $settings = get_option( 'wpc_settings' );\r\n\r\n foreach( $wpc_pages as $wpc_page ) {\r\n\r\n $wpc_client_page = get_page_by_title( $wpc_page['name'] );\r\n\r\n if ( !isset( $wpc_client_page ) || 0 >= $wpc_client_page->ID ) {\r\n\r\n $current_user = wp_get_current_user();\r\n //Construct args for the new page\r\n $args = array(\r\n 'post_title' => $wpc_page['name'],\r\n 'post_status' => 'publish',\r\n 'post_author' => $current_user->ID,\r\n 'post_content' => $wpc_page['content'],\r\n 'post_type' => 'page',\r\n 'ping_status' => 'closed',\r\n 'comment_status' => 'closed',\r\n 'post_parent' => $parent_page_id,\r\n );\r\n $page_id = wp_insert_post( $args );\r\n\r\n $settings['pages'][$wpc_page['id']] = $page_id;\r\n }\r\n\r\n\r\n }\r\n\r\n update_option( 'wpc_settings', $settings );\r\n\r\n }",
"public function createNavigation() {\n\t \n\t // 1. Gruppen auslesen\n\t\t$groups = array();\n\t\t$items = array();\n\t\n\t $items = $this->applicationHandler->getApplications(array(\n\t \t'groups' => true,\n\t \t'isVisible' => 1\n\t ));\n\n\t // 2. Elemente auslesen und parsen\n\t foreach ($items as $g) {\n\t \t\n\t \t$groupIsEmpty = true;\n\t \t$groupSelected = false;\n\n\t \tforeach ($g['cmtApplications'] as $r) {\n\t\n\t \t\t// Zugriffsrechte prüfen\n\t\t \tif (!$this->user->checkUserAccessRight($r['id'])) {\n\t\t \t\tcontinue;\t\n\t\t \t}\n\t\t \t\n\t\t\t\t// Da ist was drin in der Gruppe!\n\t\t\t\t$groupIsEmpty = false;\n\t\t\t\t$itemSelected = false;\n\t\t\t\t\t\t\n\t\t\t\t// Default-Einstellungen holen, sofern es welche gibt.\n\t\t\t\tif ($r['cmt_type'] == 'table') {\n\t\t\t\t\t$settingsPath = 'app_showtable/';\n\t\t\t\t} else {\n\t\t\t\t\t$a = explode('.', $r['cmt_include']);\n\t\t\t\t\t$settingsPath = $a[0].'/';\n\t\t\t\t\tunset ($a);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$itemSettings = $r['cmt_tablesettings'];\n\t\t\t\t\n\t\t\t\tif (!isset($itemSettings['icon'])) {\n\t\t\t\t\t$itemSettings['icon'] = 'default';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch ($itemSettings['icon']) {\n\t\t\t\t\tcase 'otherIcon':\n\t\t\t\t \t$itemIcon = CMT_TEMPLATE.$itemSettings['iconPath'];\n\t\t\t\t \tbreak;\n\t\t\t\t\n\t\t\t\t\tcase 'none':\n\t\t\t\t\t\t$itemIcon = '';\n\t\t\t\t\t\tunset ($itemSettings['iconPath']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (isset($itemSettings['iconPath']) && is_file(CMT_TEMPLATE.$settingsPath.$itemSettings['iconPath'])) {\n\t\t\t\t\t\t\t$itemIcon = CMT_TEMPLATE.$settingsPath.$itemSettings['iconPath'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$itemIcon = CMT_TEMPLATE.'general/img/'.str_replace('table', $r['cmt_type'], 'cmt_defaulttableicon_16px.png');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$itemSettings['icon'] = 'default';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Das 16px große Icon anzeigen\n\t\t\t\tif (!strstr($itemIcon, 'cmt_default')) {\n\t\t\t\t\t$iconParts = explode('.', (basename($itemIcon)));\n\t\t\t\t\t$itemIcon = dirname($itemIcon).'/'.array_shift($iconParts).'_16px.'.implode('.', $iconParts);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_file($itemIcon)) {\n\t\t\t\t\t$itemIcon = CMT_TEMPLATE.'general/img/'.str_replace('table', $r['cmt_type'], 'cmt_defaulttableicon_16px.png');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($r['id'] == $this->selectedApplicationID) {\n\t\t\t\t\t$itemSelected = true;\n\t\t\t\t\t$groupSelected = true;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$itemSelected = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// generate query variables\n\t\t\t\t$queryVars = '';\n\t\t\t\tif ($r['cmt_queryvars']) {\n\t\t\t\t\t$queryVars = str_replace(array(\"\\n\", \"\\r\"), array('&', ''), $r['cmt_queryvars']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$parserVars = array(\n\t\t\t\t\t'itemIcon' => $itemIcon,\n\t\t\t\t\t'itemName' => $r['cmt_showname'],\n\t\t\t\t\t'itemId' => $r['id'],\n\t\t\t\t\t'itemSelected' => $itemSelected,\n\t\t\t\t\t'groupSelected' => $groupSelected,\n\t\t\t\t\t'queryVars' => $queryVars\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->parser->setMultipleParserVars($parserVars);\n\t\t\t\t$groupHtml .= $this->parser->parse($this->itemTemplate);\n\t \t}\n\t \t\n\t \t// Falls was in der Gruppe drin ist, dann anzeigen\n\t \tif (!$groupIsEmpty) {\n\t \t\t\n\t \t\t$groupSettings = $g['cmt_groupsettings'];\n\t \t\t\n\t \t\tif (!is_array($groupSettings)) {\n\t \t\t\t$groupSettings = array();\n\t \t\t}\n\t \t\t\n\t\t\t\t// Icon suchen\n\t\t\t switch ($groupSettings['icon']) {\n\t\t\t \tcase 'otherIcon':\n\t\t\t \t\t$groupIcon = CMT_TEMPLATE.$groupSettings['iconPath'];\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \tcase 'none':\n\t\t\t \t\t$groupIcon = '';\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \tdefault:\n\t\t\t \t\tif ($groupSettings['iconPath']) {\n\t\t\t \t\t\t$groupIcon = CMT_TEMPLATE.$groupSettings['iconPath'];\n\t\t\t \t\t} else {\n\t\t\t \t\t\t$groupIcon = CMT_TEMPLATE.'general/img/cmt_defaultgroupicon_32px.png';\n\t\t\t \t\t}\n\t\t\t \t\t$groupSettings['icon'] = 'default';\n\t\t\t \t\tbreak;\n\t\t\t }\n\t\t\t \n\t\t\t // Das 32px große Icon auswählen\n\t\t\t if (!strstr($groupIcon, 'cmt_defaultgroupicon_32px.png') && $groupIcon != '') {\n\t\t\t \t$iconParts = explode('.', (basename($groupIcon)));\n\t\t\t \t$groupIcon = dirname($groupIcon).'/'.array_shift($iconParts).'_32px.'.implode('.', $iconParts);\n\t\t\t }\n\t\t\t \n\t\t\t if ($groupIcon != '' && !is_file($groupIcon)) {\n\t\t\t \t$groupIcon = CMT_TEMPLATE.'general/img/cmt_defaultgroupicon_32px.png';\n\t\t\t }\n\t\t\t \n\t\t\t // Gruppentemplate parsen\n\t\t\t $this->parserVars = array(\n\t\t \t\t'groupIcon' => $groupIcon,\n\t\t\t\t\t'groupName' => $g['cmt_groupname'],\n\t\t\t\t\t'groupId' => $g['id'],\n\t\t\t\t\t'groupHtml' => $groupHtml,\n\t\t \t\t'groupSelected' => $groupSelected\n\t\t\t \t);\n\t\t\t\t\t\t\n\t\t\t $this->parser->SetMultipleParserVars($this->parserVars);\n\t\t\t $navigation .= $this->parser->parse($this->groupTemplate);\n\t\t\t \n\t\t\t unset($groupHtml);\n\t \t}\n\t }\n\t $this->parser->setParserVar('cmtNavigationGroups', $navigation);\t \n\t return $this->parser->parseTemplate('administration/cmt_navigation.tpl');\n\t}",
"function nav ($arguments = \"\") {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tnav');\n return $rc->newInstanceArgs( $arguments ); \n}",
"function generate_page_links($user_search, $sort, $cur_page, $num_pages) {\n $page_links = '<p>';\n\n // Generate \"previous page\" link if page is not the first page\n if ($cur_page > 1) {\n // Generate back arrow as an HTML link\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . ($cur_page - 1) . '\"><-</a> ';\n } else {\n // Generate back arrow as a non-HTML link\n $page_links .= '<- ';\n }\n\n // Generate page links for each individual page\n for ($index = 1; $index <= $num_pages; $index++) {\n // Generate clickable link if page is not current page\n if ($index == $cur_page) {\n $page_links .= ' ' . $index;\n } else {\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . $index . '\"> ' . $index . '</a> ';\n }\n }\n\n // Generate clickable link if current page is not the last page\n if ($cur_page < $num_pages) {\n // Generate back arrow as an HTML link\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . ($cur_page + 1) . '\"> -></a> ';\n } else {\n // Generate back arrow as a non-HTML link\n $page_links .= ' ->';\n }\n\n $page_links .= '</p>';\n\n return $page_links;\n }",
"function makeLinks($nav)\r\n{\r\n$myReturn='';\r\n foreach($nav as $key => $value){\r\n if(THIS_PAGE == $key){//current page add active class\r\n \r\n $myReturn .='\r\n <li class=\"nav-item \">\r\n <a class=\"nav-link active\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; \r\n \r\n \r\n }else{//add no formatting\r\n \r\n\r\n \r\n $myReturn .='\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; }\r\n \r\n \r\n \r\n }\r\n \r\n \r\n return $myReturn;\r\n\r\n\r\n\r\n}",
"function drawPageNav($usersCanSave=\"\", $currentPage=\"\", $totalPages, $aboveBelow, $nextPageButton, $previousPageButton, $skippedPageMessage, $pageSelectionList) {\n\n\tif($aboveBelow == \"above\") {\n\t\t//navigation options above the form print like this\n\t\tprint \"<br /><div id=\\\"pageNavTable\\\"><table><tr>\\n\";\n\t\tprint \"<td style=\\\"vertical-align: middle; padding-right: 5px;\\\"><nobr><b>\" . _formulize_DMULTI_YOUAREON . \"</b></nobr><br /><nobr>\" . _formulize_DMULTI_PAGE . \" $currentPage \" . _formulize_DMULTI_OF . \" \" . $totalPages . \"</nobr></td>\";\n\t\tprint \"<td style=\\\"vertical-align: middle; padding-right: 5px;\\\">\";\n\t\tprint $previousPageButton;\n\t\tprint \"</td>\";\n\t\tprint \"<td style=\\\"vertical-align: middle; padding-right: 5px;\\\">\";\n print $nextPageButton;\n\t\n\t\tprint \"</td>\";\n\t\tprint \"<td style=\\\"vertical-align: middle;\\\">\";\n\t\tprint _formulize_DMULTI_JUMPTO . \" \" . $pageSelectionList;\n\t\tprint \"</td></tr></table></div></form><br />\";\n } else { \n //navigation options below the form print like this\n print \"<br><div id=\\\"bottomPageNumber\\\"><center><p>\" . _formulize_DMULTI_PAGE . \" $currentPage \" . _formulize_DMULTI_OF . \" \" . $totalPages;\n if(!$usersCanSave) {print \"<br>\" . _formulize_INFO_NOSAVE;}\n if($skippedPageMessage) {\n print \"<br>\". $skippedPageMessage;\n }\n print \"</p></center></div><br><center><form name=\\\"pageNavOptions_$aboveBelow\\\" id==\\\"pageNavOptions_$aboveBelow\\\">\";\n print $previousPageButton;\n print \" \";\n print $nextPageButton;\n print \"</center><br><div id=\\\"bottomJumpList\\\"><p>\". _formulize_DMULTI_JUMPTO . \" \" . $pageSelectionList . \"</p></div>\";\n }\n}",
"function lb_show_make_page() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'make_page',\n\t\t\t'pages' => lb_get_all_pages_from_pages(),\n\t\t)\n\t);\n}",
"function horizon_theme_paging_nav() {\n\t\t$mid = 2; // Total of items that will show along with the current page.\n\t\t$end = 1; // Total of items displayed for the last few pages.\n\t\t$show = false; // Show all items.\n\n\t\techo horizon_theme_pagination( $mid, $end, false );\n\t}",
"private function generateLinks()\n\t{\n\t\t// Additional pages are the total minus the current page\n\t\t$iAdditional\t= $this->iToShow - 1;\n\n\t\t// Figure out how many additional pages to show\n\t\t$iToShow\t\t= ($this->iTotal <= $iAdditional) ? ($this->iTotal - 1) : $iAdditional;\n\n\t\t// Get the pre and post lengths\n\t\tif($iToShow % 2 == 0) {\n\t\t\t$iPre\t= $iToShow / 2;\n\t\t\t$iPost\t= $iPre;\n\t\t} else {\n\t\t\t$iPre\t= floor($iToShow / 2);\n\t\t\t$iPost\t= $iPre + 1;\n\t\t}\n\n\t\t// If the current page is less than the pre pages\n\t\tif($this->iPage <= $iPre)\n\t\t{\n\t\t\t$iPre\t= $this->iPage - 1;\n\t\t\t$iPost\t= $iToShow - $iPre;\n\t\t}\n\t\t// Else if the total pages minus the current page is less than the\n\t\t//\tpost pages\n\t\tif($this->iTotal - $this->iPage <= $iPost)\n\t\t{\n\t\t\t$iPost\t= $this->iTotal - $this->iPage;\n\t\t\t$iPre\t= $iToShow - $iPost;\n\t\t}\n\n\t\t// Init the links array\n\t\t$this->aLinks\t= array(\n\t\t\t'previous'\t\t=> false,\n\t\t\t'first'\t\t\t=> false,\n\t\t\t'pre'\t\t\t=> array(),\n\t\t\t'current'\t\t=> '',\n\t\t\t'post'\t\t\t=> array(),\n\t\t\t'last'\t\t\t=> false,\n\t\t\t'next'\t\t\t=> false\n\t\t);\n\n\t\t// If the page isn't 1\n\t\tif($this->iPage > 1)\n\t\t{\n\t\t\t// Add the previous button\n\t\t\t$this->aLinks['previous'] = array(\n\t\t\t\t'text'\t=> $this->iPage - 1,\n\t\t\t\t'url'\t=> (($this->iPage - 1 == 1) ? $this->aOptions['primary_url'] : $this->sURL . ($this->iPage - 1) . '/') . $this->sQuery,\n\t\t\t\t'index' => (($this->iPage - 1) > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the page is greater than the pre length\n\t\tif($this->iPage - 1 > $iPre)\n\t\t{\n\t\t\t// Add the first page\n\t\t\t$this->aLinks['first'] = array(\n\t\t\t\t'text'\t=> 1,\n\t\t\t\t'url'\t=> $this->aOptions['primary_url'] . $this->sQuery,\n\t\t\t\t'index' => (1 > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// Add the previous pages\n\t\tfor($i = $this->iPage - $iPre; $i < $this->iPage; ++$i)\n\t\t{\n\t\t\t$this->aLinks['pre'][]\t= array(\n\t\t\t\t'text'\t=> $i,\n\t\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t\t'index' => ($i > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// Add the current page\n\t\t$this->aLinks['current'] = array(\n\t\t\t'text'\t=> $this->iPage,\n\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t'index' => ($this->iPage > $this->aOptions['index_limit']) ? false : true\n\t\t);\n\n\t\t// Add the next pages\n\t\t$iForCond\t= $this->iPage + $iPost + 1;\n\t\tfor($i = $this->iPage + 1; $i < $iForCond; ++$i)\n\t\t{\n\t\t\t$this->aLinks['post'][] = array(\n\t\t\t\t'text'\t=> $i,\n\t\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t\t'index' => ($i > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the last page isn't visible\n\t\tif($this->iTotal > $this->iPage + $iPost)\n\t\t{\n\t\t\t// And the last page\n\t\t\t$this->aLinks['last']\t= array(\n\t\t\t\t'text'\t=> $this->iTotal,\n\t\t\t\t'url'\t=> $this->sURL . $this->iTotal . '/' . $this->sQuery,\n\t\t\t\t'index' => ($this->iTotal > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the current page isn't the last page\n\t\tif($this->iTotal != $this->iPage)\n\t\t{\n\t\t\t// Show the next page\n\t\t\t$this->aLinks['next']\t= array(\n\t\t\t\t'text'\t=> $this->iPage + 1,\n\t\t\t\t'url'\t=> $this->sURL . ($this->iPage + 1) . '/' . $this->sQuery,\n\t\t\t\t'index' => (($this->iPage + 1) > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\t}",
"function vitero_extend_navigation(navigation_node $navref, stdclass $course, stdclass $module, cm_info $cm) {\n\n}",
"function renderNav(PageArray $items, array $options = array()) {\n\n\tif(!count($items)) return '';\n\n\t$defaults = array(\n\t\t'fields' => array(), // array of other fields you want to display (title is assumed)\n\t\t'class' => '', // class for the <ul>\n\t\t'active' => 'active', // class for active item\n\t\t'dividers' => false, // add an <li class='divider'> between each item?\n\t\t'tree' => false, // render tree to reach current $page?\n\t\t);\n\n\t$options = array_merge($defaults, $options); \n\t$page = wire('page');\n\t$out = \"<ul class='$options[class]'>\";\n\t$divider = $options['dividers'] ? \"<li class='divider'></li>\" : \"\";\n\n\tforeach($items as $item) {\n\n\t\t// if this item is the current page, give it an 'active' class\n\t\t$class = $item->id == $page->id ? \" class='$options[active]'\" : \"\";\n\t\tif(($item->id > 1 && $page->parents->has($item)) || $page->id == $item->id) $class = \" class='active' \";\n\t\t// render linked item title\n\t\t$out .= \"$divider<li$class><a href='$item->url'>$item->title</a> \"; \n\n\t\t// render optional extra fields wrapped in named spans\n\t\tif(count($options['fields'])) foreach($options['fields'] as $name) {\n\t\t\t$out .= \"<span class='$name'>\" . $item->get($name) . \"</span> \";\n\t\t}\n\n\t\t// optionally render a tree recursively to current $page \n\t\tif($options['tree']) {\n\t\t\tif($page->parents->has($item) || $item->id == $page->id) {\n\t\t\t\t$out .= renderNav($item->children(\"limit=50\"), array(\n\t\t\t\t\t'fields' => $options['fields'],\n\t\t\t\t\t'tree' => true,\n\t\t\t\t\t)); \n\t\t\t}\n\t\t}\n\n\t\t$out .= \"</li>\";\n\t}\n\n\t$out .= \"</ul>\";\n\treturn $out; \t\n}",
"public function createNestedPagesAndCopyLiveParentPage() {}",
"function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_video,$totalRows_rs_video;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_video\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_video=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_video) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_video >= $totalRows_rs_video) ? $totalRows_rs_video : ($a*$maxRows_rs_video);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_video=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_video=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}",
"function viewNav() {\n\t$view = new viewModel();\n\t$view->showNav();\t\n}",
"function bones_page_navi()\n{\n\tglobal $wp_query;\n\t$bignum = 999999999;\n\tif ($wp_query->max_num_pages <= 1)\n\t\treturn;\n\techo '<nav class=\"pagination\">';\n\techo paginate_links(array(\n\t\t'base' => str_replace($bignum, '%#%', esc_url(get_pagenum_link($bignum))),\n\t\t'format' => '',\n\t\t'current' => max(1, get_query_var('paged')),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => '←',\n\t\t'next_text' => '→',\n\t\t'type' => 'list',\n\t\t'end_size' => 0,\n\t\t'mid_size' => 1\n\t));\n\techo '</nav>';\n}",
"function create_custom_pages() {\n $custom_pages = array(\n 'home' => 'Home',\n );\n foreach($custom_pages as $page_name => $page_title) {\n $page = get_page_by_path($page_name);\n if( empty($page) ) {\n wp_insert_post( array(\n 'post_type' => 'page',\n 'post_title' => $page_title,\n 'post_name' => $page_name,\n 'post_status' => 'publish'\n ));\n }\n }\n\n // Set static Homepage\n $home = get_page_by_path('home');\n update_option( 'page_on_front', $home->ID );\n update_option( 'show_on_front', 'page' );\n}",
"function printNavbar($calling_page) {\n session_start();\n $pages['crategame'] = \"Play\";\n $pages['puzzlelist'] = \"Puzzle List\";\n\n require_once \"authenticate.php\";\n if (challengeAuth()) {\n $pages['logout'] = \"Welcome, {$_SESSION['tag']}! (Logout)\";\n } else {\n $pages['signup'] = \"Sign Up\";\n $pages['login'] = \"Login\";\n }\n\n $nav = \"\";\n foreach ($pages as $key => $page) {\n $selected = strpos($calling_page, $key);\n $nav .= \"<li class='\" . ($selected ? \"selected\" : \"\") . \"'><a class='\" . ($selected ? \"selected\" : \"\");\n // Set tab link. If crategame, choose random int for id.\n $nav .= \"' href='$key.php\" . ($key === \"crategame\" ? (\"?id=\" . rand()) : \"\") . \"'>$page</a></li>\";\n }\n return $nav;\n}",
"function nav($anchor, $link, $navClass, $ulClass){\n \n $size = count($anchor);\n $i = 0;\n \n echo '<nav class=\"' . $navClass . '\"><ul class=\"' . $ulClass .'\">';\n \n for($i; $i<$size; $i++)\n {\n $navigation = '<li class=\"navigation\"><a href=\"';\n $navigation .= $link[$i];\n $navigation .= '\">';\n $navigation .= $anchor[$i];\n $navigation .= '</a></li>';\n \n echo $navigation;\n }\n \n echo '</ul></nav>'; \n}",
"function _getNav()\n {\n }",
"protected function setupPage() {}",
"function makeNav($active,$AdminEdit,$userObj)\r\n{\r\n $navArray = array(\r\n \"Resume Archive\" => \"ResumeArchive.php\",\r\n \"Address\" => \"AddressEdit.php\",\r\n \"Phone\" => \"PhoneEdit.php\",\r\n \"Job\" => \"JobEdit.php\",\r\n \"Help/Info\" => \"help.html\",\r\n \"Admin\" => \"Admin.php\"\r\n \r\n );\r\n \r\n \r\n //if they are not an admin delete the admin link\r\n if(!$userObj->isAdmin)\r\n {\r\n unset( $navArray[\"Admin\"]);\r\n }\r\n \r\n //if they are a guest then remove the multiple resume capability and admin link\r\n if($userObj->isGuest)\r\n {\r\n unset($navArray[\"Admin\"]);\r\n unset($navArray[\"Resume Archive\"]);\r\n $navArray = array(\"Create Resume\" => \"ResumeEdit.php\") + $navArray;\r\n \r\n }\r\n \r\n //BUILDS THE MENU\r\n //sets the begining of the menu\r\n $result = \"\r\n <!--Menu-->\r\n <div id='cssmenu'>\r\n <ul>\";\r\n \r\n \r\n //iterates through the array and adds additional items\r\n foreach ($navArray as $key => $value) \r\n { \r\n \r\n $selection = ($active == $value) ? \" class='active'\" : \"\";\r\n $result = $result . \"<li $selection><a href='$value'><span>$key</span></a></li>\";\r\n }\r\n //add closing brace\r\n $result = $result . \" \r\n </ul>\r\n </div>\";\r\n \r\n return $result;//return the nave menu\r\n}",
"function build_pagelinks($data)\n\t{\n\t\t$data['leave_out'] = isset($data['leave_out']) ? $data['leave_out'] : '';\n\t\t$data['no_dropdown'] = isset($data['no_dropdown']) ? intval( $data['no_dropdown'] ) : 0;\n\t\t$data['USE_ST']\t\t = isset($data['USE_ST'])\t? $data['USE_ST']\t : '';\n\t\t$work = array( 'pages' => 0, 'page_span' => '', 'st_dots' => '', 'end_dots' => '' );\n\t\t\n\t\t$section = !$data['leave_out'] ? 2 : $data['leave_out']; // Number of pages to show per section( either side of current), IE: 1 ... 4 5 [6] 7 8 ... 10\n\t\t\n\t\t$use_st = !$data['USE_ST'] ? 'st' : $data['USE_ST'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the number of pages\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $data['TOTAL_POSS'] > 0 )\n\t\t{\n\t\t\t$work['pages'] = ceil( $data['TOTAL_POSS'] / $data['PER_PAGE'] );\n\t\t}\n\t\t\n\t\t$work['pages'] = $work['pages'] ? $work['pages'] : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$work['total_page'] = $work['pages'];\n\t\t$work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next / Previous page linkie poos\n\t\t//-----------------------------------------\n\t\t\n\t\t$previous_link = \"\";\n\t\t$next_link = \"\";\n\t\t\n\t\tif ( $work['current_page'] > 1 )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] - $data['PER_PAGE'];\n\t\t\t$previous_link = $this->compiled_templates['skin_global']->pagination_previous_link(\"{$data['BASE_URL']}&$use_st=$start\");\n\t\t}\n\t\t\n\t\tif ( $work['current_page'] < $work['pages'] )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] + $data['PER_PAGE'];\n\t\t\t$next_link = $this->compiled_templates['skin_global']->pagination_next_link(\"{$data['BASE_URL']}&$use_st=$start\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Loppy loo\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($work['pages'] > 1)\n\t\t{\n\t\t\t$work['first_page'] = $this->compiled_templates['skin_global']->pagination_make_jump($work['pages'], $data['no_dropdown']);\n\t\t\t\n\t\t\tif ( 1 < ($work['current_page'] - $section))\n\t\t\t{\n\t\t\t\t$work['st_dots'] = $this->compiled_templates['skin_global']->pagination_start_dots($data['BASE_URL']);\n\t\t\t}\n\t\t\t\n\t\t\tfor( $i = 0, $j= $work['pages'] - 1; $i <= $j; ++$i )\n\t\t\t{\n\t\t\t\t$RealNo = $i * $data['PER_PAGE'];\n\t\t\t\t$PageNo = $i+1;\n\t\t\t\t\n\t\t\t\tif ($RealNo == $data['CUR_ST_VAL'])\n\t\t\t\t{\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_current_page( ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($PageNo < ($work['current_page'] - $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Instead of just looping as many times as necessary doing nothing to get to the next appropriate number, let's just skip there now\n\t\t\t\t\t\t$i = $work['current_page'] - $section - 2;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If the next page is out of our section range, add some dotty dots!\n\t\t\t\t\t\n\t\t\t\t\tif ($PageNo > ($work['current_page'] + $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t$work['end_dots'] = $this->compiled_templates['skin_global']->pagination_end_dots(\"{$data['BASE_URL']}&$use_st=\".($work['pages']-1) * $data['PER_PAGE']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_page_link(\"{$data['BASE_URL']}&$use_st={$RealNo}\", ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$work['return'] = $this->compiled_templates['skin_global']->pagination_compile($work['first_page'],$previous_link,$work['st_dots'],$work['page_span'],$work['end_dots'],$next_link,$data['TOTAL_POSS'],$data['PER_PAGE'], $data['BASE_URL'], $data['no_dropdown'], $use_st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$work['return'] = $data['L_SINGLE'];\n\t\t}\n\t\n\t\treturn $work['return'];\n\t}",
"function go_page_list() {\n\t\tglobal $ROW, $TEMPLATE;\n\t\tLOG_MSG('INFO',\"go_page_list(): START \");\n\t\t// Do we have a search string?\n\t\t// Get all the args from $_GET\n\t\t$name=get_arg($_GET,\"name\");\n\t\t$title=get_arg($_GET,\"title\");\n\t\t$type=get_arg($_GET,\"type\");\n\t\tLOG_MSG('DEBUG',\"go_page_list(): Got args\");\n\t\t// Validate parameters as normal strings \n\t\tLOG_MSG('DEBUG',\"go_page_list(): Validated args\");\n\t\t// Rebuild search string for future pages\n\t\t$search_str=\"name=$name&title=$title&type=$type\";\n\t\t$ROW=$this->admin_model->db_page_select(\n\t\t\t\"\",\n\t\t\t\t$name,\n\t\t\t\t$title,\n\t\t\t\t'',\n\t\t\t\t$type);\n\n\t\tif ( $ROW[0]['STATUS'] != \"OK\" ) {\n\t\t\tadd_msg(\"ERROR\",\"There was an error loading the Pages. Please try again later. \");\n\t\t\treturn;\n\t\t}\n\t\t\t\t$this->data['rows'] = $ROW;\n\t\t\t\t$this->load->view('admin/html/header', $this->data,'');\n\t\t\t\t$this->load->view('admin/html/topbar', $this->data);\n\t\t\t\t$this->load->view('admin/html/leftnav', $this->data);\n\t\t\t\t$this->load->view('admin/page/list', $this->data);\n\t\t\t\t$this->load->view('admin/html/footer', $this->data);\n\t\tLOG_MSG('INFO',\"go_page_list(): END\");\n\t}",
"static function navigation($pages, $depth=1) {\n\t\t$active = false;\n\t\t$elements = $classes = array();\n\t\tforeach ($pages as $page) {\n\t\t\t$class = '';\n\t\t\t\n\t\t\t//get selected\n\t\t\tif (http::request('path_query') == $page['url']) {\n\t\t\t\t$class = 'active';\n\t\t\t\t$active = true;\n\t\t\t}\n\t\t\t\n\t\t\t$return = self::a($page['url'], $page['title']);\n\t\t\t\n\t\t\tif (isset($page['children']) && count($page['children'])) {\n\t\t\t\tlist($content, $descendant_active) = self::navigation($page['children'], $depth + 1);\n\t\t\t\t$return .= $content;\n\t\t\t\tif ($descendant_active) {\n\t\t\t\t\t$class = 'descendant-active';\n\t\t\t\t\t$active = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$classes[] = $class;\n\t\t\t$elements[] = $return;\n\t\t}\n\t\t\t\n\t\t$return = self::ul($elements, false, $classes);\n\t\tif ($depth == 1) return $return;\n\t\treturn array($return, $active); //have to pass the fact that there was a selected item up the chain\n\t}",
"static public function createPage() {\n $session = Application::getInstance(\"session\");\n $config = Application::getConfig();\n\n if (isset($config[\"system\"][\"customPageClass\"])) {\n require $config[\"system\"][\"pages-folder\"] . \"/\" . $config[\"system\"][\"customPageClass\"] . \".php\";\n }\n\n include_once $config[\"system\"][\"pages-folder\"] . \"/\" . $session->currentPage . \".page.php\";\n $pageClass = $config[\"system\"][\"namespace\"] . \"\\\\pages\\\\Page\" . ucfirst($session->currentPage);\n\n\n $page = new $pageClass();\n\n Application::setInstance(\"page\", $page);\n }",
"public function getPageNav($tab, $isImportPage = false) {\n $this->loadTemplatePart('navigation', array(\n 'tab' => $tab,\n 'isImportPage' => $isImportPage\n ));\n }",
"function honeycomb_paging_nav() {\n\t\tglobal $wp_query;\n\n\t\t$args = array(\n\t\t\t'type' \t => 'list',\n\t\t\t'next_text' => _x( 'Next', 'Next post', 'honeycomb' ),\n\t\t\t'prev_text' => _x( 'Previous', 'Previous post', 'honeycomb' ),\n\t\t\t);\n\n\t\tthe_posts_pagination( $args );\n\t}",
"function acitpo_content_nav($html_id) {\n\tglobal $wp_query;\n\n\tif ($wp_query->max_num_pages > 1) {\n\t\tprintf('<nav id=\"%s\" class=\"navigation nav-below\" role=\"navigation\">', esc_attr($html_id));\n\t\tprintf('<h3 class=\"assistive-text\">%s</h3>', __('Post navigation', 'acitpo'));\n\t\techo '<div class=\"nav-next alignleft\">';\n\t\tprevious_posts_link(__('Previous', 'acitpo'));\n\t\techo '</div>';\n\t\techo '<div class=\"nav-previous alignright\">';\n\t\tnext_posts_link(__('Next Page', 'acitpo'));\n\t\techo '</div>';\n\t\techo '<div class=\"clear-fix\"></div>';\n\t\techo '</nav>';\n\t}\n}",
"function SetupMultiPages() {\r\n\t\t$pages = new cSubPages();\r\n\t\t$pages->Add(0);\r\n\t\t$pages->Add(1);\r\n\t\t$pages->Add(2);\r\n\t\t$pages->Add(3);\r\n\t\t$pages->Add(4);\r\n\t\t$pages->Add(5);\r\n\t\t$pages->Add(6);\r\n\t\t$this->MultiPages = $pages;\r\n\t}",
"function nav(array $navLinks, $name = null, array $args = array())\n{\n if ($name !== null) {\n $navLinks = apply_filters($name, $navLinks, $args);\n }\n\n $menu = get_view()->navigation()->menu(new Omeka_Navigation($navLinks));\n\n if ($acl = get_acl()) {\n $menu->setRole(current_user())->setAcl($acl);\n }\n\n return $menu;\n}",
"function side_navigation()\n\t{\n\t\t//side navigation\n\t\t$nav['dashboard'] = array(\n\t\t\t'name' => trans('admin_messages.dashboard'),\n\t\t\t'icon' => 'assessment',\n\t\t\t'has_permission' => true,\n\t\t\t'route' => route('admin.dashboard'),\n\t\t\t'active' => navigation_active('admin.dashboard'),\n\t\t);\n\n\t\t$nav['admin_management'] = array(\n\t\t\t'name' => trans('admin_messages.admin_user_management'),\n\t\t\t'icon' => 'supervised_user_circle',\n\t\t\t'has_permission' => checkPermission('view-admin'),\n\t\t\t'route' => route('admin.view_admin'),\n\t\t\t'active' => navigation_active('admin.view_admin')\n\t\t);\n\n\t\t$nav['role_management'] = array(\n\t\t\t'name' => trans('admin_messages.role_management'),\n\t\t\t'icon' => 'lock',\n\t\t\t'has_permission' => checkPermission('view-role'),\n\t\t\t'route' => route('admin.view_role'),\n\t\t\t'active' => navigation_active('admin.view_role')\n\t\t);\n\n\t\t$nav['user_management'] = array(\n\t\t\t'name' => trans('admin_messages.user_management'),\n\t\t\t'icon' => 'account_circle',\n\t\t\t'has_permission' => checkPermission('view-user'),\n\t\t\t'route' => route('admin.view_user'),\n\t\t\t'active' => navigation_active('admin.view_user')\n\t\t);\n\t\t\n\t\t$nav['driver_management'] = array(\n\t\t\t'name' => trans('admin_messages.driver_management'),\n\t\t\t'icon' => 'drive_eta',\n\t\t\t'has_permission' => checkPermission('view-driver'),\n\t\t\t'route' => route('admin.view_driver'),\n\t\t\t'active' => navigation_active('admin.view_driver')\n\t\t);\n\t\t\n\t\t$nav['home_banner'] = array(\n\t\t\t'name' => trans('admin_messages.home_banner'),\n\t\t\t'icon' => 'merge_type',\n\t\t\t'has_permission' => checkPermission('view-home_banner'),\n\t\t\t'route' => route('admin.home_banner'),\n\t\t\t'active' => navigation_active('admin.home_banner')\n\t\t);\n\t\t\n\t\t$nav['cuisine_management'] = array(\n\t\t\t'name' => trans('admin_messages.cuisine_management'),\n\t\t\t'icon' => 'category',\n\t\t\t'has_permission' => checkPermission('view-category'),\n\t\t\t'route' => route('admin.cuisine'),\n\t\t\t'active' => navigation_active('admin.cuisine')\n\t\t);\n\t\t\n\t\t$nav['restaurant_management'] = array(\n\t\t\t'name' => trans('admin_messages.store_management'),\n\t\t\t'icon' => 'restaurant',\n\t\t\t'has_permission' => checkPermission('view-restaurant'),\n\t\t\t'route' => route('admin.view_restaurant'),\n\t\t\t'active' => navigation_active('admin.view_restaurant')\n\t\t);\n\t\t\n\t\t$nav['send_message'] = array(\n\t\t\t'name' => trans('admin_messages.send_message'),\n\t\t\t'icon' => 'email',\n\t\t\t'has_permission' => checkPermission('manage-send_message'),\n\t\t\t'route' => route('admin.send_message'),\n\t\t\t'active' => navigation_active('admin.send_message')\n\t\t);\n\t\t\n\t\t$nav['order_management'] = array(\n\t\t\t'name' => trans('admin_messages.order_managemnt'),\n\t\t\t'icon' => 'add_shopping_cart',\n\t\t\t'has_permission' => checkPermission('manage-orders'),\n\t\t\t'route' => route('admin.order'),\n\t\t\t'active' => navigation_active('admin.order')\n\t\t);\n\t\t\n\t\t$nav['restaurant_payout_management'] = array(\n\t\t\t'name' => trans('admin_messages.store_payout_management'),\n\t\t\t'icon' => 'euro_symbol',\n\t\t\t'has_permission' => checkPermission('manage-payouts'),\n\t\t\t'route' => route('admin.payout', 1),\n\t\t\t'active' => navigation_active('admin.payout', 1)\n\t\t);\n\t\t\n\t\t$nav['driver_payout_management'] = array(\n\t\t\t'name' => trans('admin_messages.driver_payout_management'),\n\t\t\t'icon' => 'motorcycle',\n\t\t\t'has_permission' => checkPermission('manage-payouts'),\n\t\t\t'route' => route('admin.payout', 2),\n\t\t\t'active' => navigation_active('admin.payout', 2)\n\t\t);\n\t\t\n\t\t$nav['driver_owe_amount'] = array(\n\t\t\t'name' => trans('admin_messages.owe_amount'),\n\t\t\t'icon' => 'attach_money',\n\t\t\t'has_permission' => checkPermission('manage-owe_amount'),\n\t\t\t'route' => route('admin.owe_amount'),\n\t\t\t'active' => navigation_active('admin.owe_amount')\n\t\t);\n\t\t\n\t\t$nav['restaurant_owe_amount'] = array(\n\t\t\t'name' => trans('admin_messages.store_owe_amount'),\n\t\t\t'icon' => 'attach_money',\n\t\t\t'has_permission' => checkPermission('manage-restaurant_owe_amount'),\n\t\t\t'route' => route('admin.restaurant_owe_amount'),\n\t\t\t'active' => navigation_active('admin.restaurant_owe_amount')\n\t\t);\n\n\n\t\t$nav['penality'] = array(\n\t\t\t'name' => trans('admin_messages.penalty'),\n\t\t\t'icon' => 'thumb_down',\n\t\t\t'has_permission' => checkPermission('manage-penality'),\n\t\t\t'route' => route('admin.penality'),\n\t\t\t'active' => navigation_active('admin.penality')\n\t\t);\n\t\t\n\t\t$nav['promo_management'] = array(\n\t\t\t'name' => trans('admin_messages.promo_management'),\n\t\t\t'icon' => 'card_giftcard',\n\t\t\t'has_permission' => checkPermission('view-promo'),\n\t\t\t'route' => route('admin.promo'),\n\t\t\t'active' => navigation_active('admin.promo')\n\t\t);\n\t\t\n\t\t$nav['static_page_management'] = array(\n\t\t\t'name' => trans('admin_messages.static_page_management'),\n\t\t\t'icon' => 'description',\n\t\t\t'has_permission' => checkPermission('view-static_page'),\n\t\t\t'route' => route('admin.static_page'),\n\t\t\t'active' => navigation_active('admin.static_page')\n\t\t);\n\t\t\n\t\t$nav['home_slider'] = array(\n\t\t\t'name' => trans('admin_messages.home_slider'),\n\t\t\t'icon' => 'description',\n\t\t\t'has_permission' => checkPermission('view-restaurant_slider'),\n\t\t\t'route' => route('admin.view_home_slider'),\n\t\t\t'active' => navigation_active('admin.view_home_slider')\n\t\t);\n\t\t\n\t\t$nav['country_management'] = array(\n\t\t\t'name' => trans('admin_messages.country_management'),\n\t\t\t'icon' => 'language',\n\t\t\t'has_permission' => checkPermission('view-country'),\n\t\t\t'route' => route('admin.country'),\n\t\t\t'active' => navigation_active('admin.country')\n\t\t);\n\t\t\n\t\t$nav['currency_management'] = array(\n\t\t\t'name' => trans('admin_messages.currency_management'),\n\t\t\t'icon' => 'euro_symbol',\n\t\t\t'has_permission' => checkPermission('view-currency'),\n\t\t\t'route' => route('admin.currency'),\n\t\t\t'active' => navigation_active('admin.currency')\n\t\t);\n\t\t\n\t\t\n\t\t$nav['language_management'] = array(\n\t\t\t'name' => trans('admin_messages.language_management'),\n\t\t\t'icon' => 'translate',\n\t\t\t'has_permission' => checkPermission('view-language'),\n\t\t\t'route' => route('admin.languages'),\n\t\t\t'active' => navigation_active('admin.languages')\n\t\t);\n\t\t\n\t\t$nav['cancel_reason'] = array(\n\t\t\t'name' => trans('admin_messages.cancel_reason'),\n\t\t\t'icon' => 'cancel',\n\t\t\t'has_permission' => checkPermission('view-cancel_reason'),\n\t\t\t'route' => route('admin.order_cancel_reason'),\n\t\t\t'active' => navigation_active('admin.order_cancel_reason')\n\t\t);\n\t\t\n\t\t$nav['review_issue_type'] = array(\n\t\t\t'name' => trans('admin_messages.review_issue_type'),\n\t\t\t'icon' => 'report_problem',\n\t\t\t'has_permission' => checkPermission('view-review_issue_type'),\n\t\t\t'route' => route('admin.issue_type'),\n\t\t\t'active' => navigation_active('admin.issue_type')\n\t\t);\n\t\t\n\t\t$nav['review_vehicle_type'] = array(\n\t\t\t'name' => trans('admin_messages.manage_vehicle_type'),\n\t\t\t'icon' => 'drive_eta',\n\t\t\t'has_permission' => checkPermission('view-vehicle_type'),\n\t\t\t'route' => route('admin.vehicle_type'),\n\t\t\t'active' => navigation_active('admin.vehicle_type')\n\t\t);\n\t\t\n\t\t$nav['food_receiver'] = array(\n\t\t\t'name' => trans('admin_messages.food_receiver'),\n\t\t\t'icon' => 'receipt',\n\t\t\t'has_permission' => checkPermission('view-recipient'),\n\t\t\t'route' => route('admin.food_receiver'),\n\t\t\t'active' => navigation_active('admin.food_receiver')\n\t\t);\n\t\t\n\t\t$nav['help_category'] = array(\n\t\t\t'name' => trans('admin_messages.help_category'),\n\t\t\t'icon' => 'help',\n\t\t\t'has_permission' => checkPermission('view-help_category'),\n\t\t\t'route' => route('admin.help_category'),\n\t\t\t'active' => navigation_active('admin.help_category')\n\t\t);\n\t\t\n\t\t$nav['help_subcategory'] = array(\n\t\t\t'name' => trans('admin_messages.help_subcategory'),\n\t\t\t'icon' => 'help',\n\t\t\t'has_permission' => checkPermission('view-help_subcategory'),\n\t\t\t'route' => route('admin.help_subcategory'),\n\t\t\t'active' => navigation_active('admin.help_subcategory')\n\t\t);\n\t\t\n\t\t$nav['help'] = array(\n\t\t\t'name' => trans('admin_messages.help'),\n\t\t\t'icon' => 'help',\n\t\t\t'has_permission' => checkPermission('view-help'),\n\t\t\t'route' => route('admin.help'),\n\t\t\t'active' => navigation_active('admin.help')\n\t\t);\n\t\t\n\t\t$nav['site_setting'] = array(\n\t\t\t'name' => trans('admin_messages.site_setting'),\n\t\t\t'icon' => 'settings',\n\t\t\t'has_permission' => checkPermission('manage-site_setting'),\n\t\t\t'route' => route('admin.site_setting'),\n\t\t\t'active' => navigation_active('admin.site_setting')\n\t\t);\n\n\n\t\t$nav['support'] = array(\n\t\t\t'name' => trans('admin_messages.support'),\n\t\t\t'icon' => 'support_agent',\n\t\t\t'has_permission' => checkPermission('view-support'),\n\t\t\t'route' => route('admin.support'),\n\t\t\t'active' => navigation_active('admin.support')\n\t\t);\n\n\t\treturn $nav;\n\t}",
"function _wp_auto_add_pages_to_menu($new_status, $old_status, $post)\n {\n }",
"public function createNavigator() {\r\n // TODO: Implement createNavigator() method.\r\n }",
"function pages($translation=null) {\r\n if(strlen($translation)==0){\r\n $translation=\"pages\";\r\n }\r\n return \"<a href=\\\"javascript:void(0)\\\">\".$this->pages.\" \".ucfirst($translation).\"</a>\";\r\n }",
"function public_navigation($current_subject, $current_page) {\r\n\t\t$output = \"<ul class=\\\"subjects\\\">\";\r\n\t\t$subject_set = find_all_subjects(true);\r\n\t\t\t// Using returned data (from db query) to create a list of menu_names from the subjects table\r\n\t\t\t// (setting it within the new $subject array)\r\n\r\n\t\twhile($subject = mysqli_fetch_assoc($subject_set)) {\r\n\t\t\t$output .= \"<li\";\r\n\t\t\tif ($current_subject && $subject[\"id\"] == $current_subject[\"id\"]) {\r\n\t\t\t\t$output .= \" class=\\\"selected\\\"\";\r\n\t\t\t}\r\n\t\t\t$output .= \">\";\r\n\t\t\t$output .= \"<a href=\\\"index.php?subject=\";\r\n\t\t\t$output .= urlencode($subject[\"id\"]); \r\n\t\t\t$output .= \"\\\">\";\r\n\t\t\t$output .= htmlentities($subject[\"menu_name\"]);\r\n\t\t\t$output .= \"</a>\";\r\n\t\t\t\r\n\t\t\tif($current_subject[\"id\"] == $subject[\"id\"] || $current_page[\"subject_id\"] == $subject[\"id\"]) {\r\n\t\t\t\t$page_set = find_pages_for_subject($subject[\"id\"]);\r\n\t\t\t\t$output .= \"<ul class=\\\"pages\\\">\";\r\n\t\t\t\twhile($page = mysqli_fetch_assoc($page_set)) {\r\n\t\t\t\t\t$output .= \"<li\";\r\n\t\t\t\t\tif ($current_page && $page[\"id\"] == $current_page[\"id\"]) {\r\n\t\t\t\t\t\t$output .= \" class=\\\"selected\\\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$output .= \">\";\r\n\t\t\t\t\t$output .= \"<a href=\\\"index.php?page=\";\r\n\t\t\t\t\t$output .= urlencode($page[\"id\"]);\r\n\t\t\t\t\t$output .= \"\\\">\";\r\n\t\t\t\t\t$output .= htmlentities($page[\"menu_name\"]);\r\n\t\t\t\t\t$output .= \"</a>\";\r\n\t\t\t\t\t$output .= \"</li>\"; \r\n\t\t\t\t}\r\n\t\t\t\t$output .= \"</ul>\";\r\n\t\t\t\tmysqli_free_result($page_set);\r\n\t\t\t}\r\n\t\t\t$output .= \"</li>\";\r\n\t\t}\r\n\t\tmysqli_free_result($subject_set);\r\n\t\t$output .= \"</ul>\";\r\n\t\treturn $output;\r\n\t}",
"public function actionbar_navigation() {\n $currentpage = format_flexpage_cache()->get_current_page();\n $options = array();\n foreach (format_flexpage_cache()->get_pages() as $page) {\n $options[$page->get_id()] = $this->pad_page_name($page, true);\n }\n\n if ($prevpage = format_flexpage_cache()->get_previous_page($currentpage)) {\n $previcon = new pix_icon('t/moveleft', get_string('gotoa', 'format_flexpage', format_string($prevpage->get_name())));\n $prevpage = $this->output->action_icon($prevpage->get_url(), $previcon);\n $prevpage = html_writer::tag('span', $prevpage, array('id' => 'format_flexpage_prevpage'));\n } else {\n $prevpage = '';\n }\n if ($nextpage = format_flexpage_cache()->get_next_page($currentpage)) {\n $nexticon = new pix_icon('t/removeright', get_string('gotoa', 'format_flexpage', format_string($nextpage->get_name())));\n $nextpage = $this->output->action_icon($nextpage->get_url(), $nexticon);\n $nextpage = html_writer::tag('span', $nextpage, array('id' => 'format_flexpage_nextpage'));\n } else {\n $nextpage = '';\n }\n $jumpselect = new single_select($this->page->url, 'pageid', $options, $currentpage->get_id(), array(), 'jumptopageid');\n $jumpselect->set_label(get_string('jumptoflexpage', 'format_flexpage'), array('class' => 'accesshide'));\n\n $jumptopage = html_writer::tag('span', $this->output->render($jumpselect), array('id' => 'format_flexpage_jumptopage'));\n $helpicon = $this->pix_icon('help', get_string('help'), 'moodle', array('id' => 'format_flexpage_actionbar_help'));\n $helpicon = html_writer::tag('span', $helpicon);\n\n return html_writer::tag('div', $prevpage.$jumptopage.$nextpage.$helpicon, array('id' => 'format_flexpage_actionbar_nav'));\n }",
"function create_links()\n\t{\n\t\t$totalItems = $this->total_records;\n\t\t$perPage = $this->size;\n\t\t$currentPage = $this->page;\n\t\t$link = $this->link;\n\t\t$totalPages = floor($totalItems / $perPage);\n\t\t$totalPages += ($totalItems % $perPage != 0) ? 1 : 0;\n\n\t\tif ($totalPages < 1 || $totalPages == 1){\n\t\t\treturn null;\n\t\t}\n\n\t\t$output = null;\t\t\t\t\n\t\t$loopStart = 1; \n\t\t$loopEnd = $totalPages;\n\n\t\tif ($totalPages > 5)\n\t\t{\n\t\t\tif ($currentPage <= 3)\n\t\t\t{\n\t\t\t\t$loopStart = 1;\n\t\t\t\t$loopEnd = 5;\n\t\t\t}\n\t\t\telse if ($currentPage >= $totalPages - 2)\n\t\t\t{\n\t\t\t\t$loopStart = $totalPages - 4;\n\t\t\t\t$loopEnd = $totalPages;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$loopStart = $currentPage - 2;\n\t\t\t\t$loopEnd = $currentPage + 2;\n\t\t\t}\n\t\t}\n\n\t\tif ($loopStart != 1){\n\t\t\t$output .= sprintf('<li class=\"disabledpage\"> <a href=\"' . $link . '\">«</a> </li>', '1');\n\t\t}\n\t\t\n\t\tif ($currentPage > 1){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._previous_.'</a> </li>', $currentPage - 1);\n\t\t}\n\t\t\n\t\tfor ($i = $loopStart; $i <= $loopEnd; $i++)\n\t\t{\n\t\t\tif ($i == $currentPage){\n\t\t\t\t$output .= '<li class=\"currentpage\">' . $i . '</li> ';\n\t\t\t} else {\n\t\t\t\t$output .= sprintf('<li><a href=\"' . $link . '\">', $i) . $i . '</a> </li> ';\n\t\t\t}\n\t\t}\n\n\t\tif ($currentPage < $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._next_.'</a> </li>', $currentPage + 1);\n\t\t}\n\t\t\n\t\tif ($loopEnd != $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">»</a> </li>', $totalPages);\n\t\t}\n\n\t\treturn '<div class=\"pagination\"><ul>' . $output . '</ul></div>';\n\t}",
"function makeNavigation($activeTab) //function to make the navigation \n{\n\t$hpactive='none';\n\t$intraactive='none';\n\t$adminactive='none';\n\t$loginactive='none';\n\t\n\tif($activeTab=='Homepage')\n\t{\n\t\t$hpactive='active';\n\t}\n\telseif($activeTab=='Intranet')\n\t{\n\t\t$intraactive='active';\n\t}\n\telseif($activeTab=='Admin')\n\t{\n\t\t$adminactive='active';\n\t}\n\telseif($activeTab=='login')\n\t{\n\t\t$loginactive='active';\n\t}\n\t\n\t\n\t\n\techo \t\"<nav>\n\t\t\t\t<ul class='left'>\n\t\t\t\t\t<li><a href='index.php?\". SID .\"' class=$hpactive>Homepage</a></li> <!-- Echoing SID to ensure session id is maintained --> \n\t\t\t\t\t<li><a href='intranet.php?\". SID .\"' class=$intraactive>Intranet</a></li> \n\t\t\t\t\t<li><a href='admin.php?\". SID .\"' class=$adminactive>Admin</a></li>\n\t\t\t\t</ul>\n\t\t\t\t\n\t\t\t\t<ul class='right'>\";\n\t\t\t\t\tif(isset($_SESSION['uname'])) //if session exists \n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t\t <li><a href='logout.php?\". SID .\"' >Log Out</a></li>\n\t\t\t\t\t\t\t <li><a href='login.php\". SID .\"' >\".htmlentities($_SESSION['uname'],ENT_QUOTES,'UTF-8').\" | </a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<li><a href='login.php?\". SID .\"' class=$loginactive>Login for Staff</a></li>\";\n\t\t\t\t\t}\n\techo\t\t\"</ul>\n\t\t\t</nav>\";\n}",
"function getNavMenu() {\r\r\n\t$PView = new PView;\r\r\n\t$Appl = $PView -> getAppl();\r\r\n\t$page = 1;\r\r\n\r\r\n\tglobal $applImages;\r\r\n\t$imagesData = $PView->sortApplImages($applImages);\r\r\n\t\r\r\n\tforeach($imagesData as $key => $dataset){\r\r\n\t\tif ($dataset['imageId'] == $Appl[1]){\r\r\n\t\t\t$currImage = $key;\r\r\n\t\t}\r\r\n\t}\r\r\n\t//back to list\r\r\n\t$currImageData = $PView->getImageData($Appl[1]);\r\r\n\twhile ($PView->getPView_config(\"pics_per_page\")*$page < $currImage + 1){\r\r\n\t\t$page++;\r\r\n\t}\r\r\n\tif (isset($_GET['view'])) {\r\r\n\t\t$view = $_GET['view'];\r\r\n\t}else{\r\r\n\t\t$view = \"\";\r\r\n\t}\r\r\n\tswitch ($view) {\r\r\n\t\tcase \"cat\":\r\r\n\t\t\t$backTo = \"cat=\".$currImageData['cat'].\"&page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_51;\r\r\n\t\tbreak;\r\r\n\t\tcase \"user\":\r\r\n\t\t\t$backTo = \"user=\".$currImageData['uploaderUserId'].\"&page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_52;\r\r\n\t\tbreak;\t\t\r\r\n\t\tcase \"album\":\r\r\n\t\t\t$backTo = \"album=\".$currImageData['albumId'].\"&page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_8;\r\r\n\t\tbreak;\r\r\n\t\tcase \"\":\r\r\n\t\t\t// default for call from menu or a direct link\r\r\n\t\t\t$backTo = \"album=\".$currImageData['albumId'].\"&page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_8;\r\r\n\t\tbreak;\t\t\r\r\n\t}\r\r\n\t\r\r\n\r\r\n\t//first image\r\r\n\t$imageFirst = $imagesData[0]['imageId'];\r\r\n\r\r\n\t//last image\r\r\n\t$imageLast = $imagesData[count($imagesData) - 1]['imageId'];\r\r\n\t//previous image\r\r\n\t$imagePrev = $imagesData[$currImage - 1]['imageId'];\r\r\n\t//next image\r\r\n\t$imageNext = $imagesData[$currImage + 1]['imageId'];\r\r\n\r\r\n\t$NavMenu = \"<table width='95%'><tr>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'><a href='pviewgallery.php?image=\".$imageFirst.\"&view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/back.png' border='0px'></a></td>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'>\";\r\r\n\tif ($imagePrev) {\r\r\n\t\t$NavMenu.= \"<a href='pviewgallery.php?image=\".$imagePrev.\"&view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_prev.png' border='0px'></a>\";\r\r\n\t}\r\r\n\t$NavMenu.= \" </td>\";\r\r\n\t$NavMenu.= \"<td width='28%' style='text-align:center;'><a href='pviewgallery.php?\".$backTo.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/up.png' border='0px'></a></td>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'>\";\r\r\n\tif ($imageNext) {\r\r\n\t\t$NavMenu.= \"<a href='pviewgallery.php?image=\".$imageNext.\"&view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_next.png' border='0px'></a>\";\r\r\n\t}\r\r\n\t$NavMenu.= \" </td>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'><a href='pviewgallery.php?image=\".$imageLast.\"&view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/next.png' border='0px'></a></td>\";\r\r\n\t$NavMenu.= \"</tr></table>\";\r\r\n\treturn $NavMenu;\r\r\n}",
"function page_navi($before = '', $after = '') {\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ( $numposts <= $posts_per_page ) { return; }\n\tif(empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show-1;\n\t$half_page_start = floor($pages_to_show_minus_1/2);\n\t$half_page_end = ceil($pages_to_show_minus_1/2);\n\t$start_page = $paged - $half_page_start;\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif(($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\techo $before.'<nav class=\"page-navigation\"><ol class=\"grav_page_navi clearfix\">'.\"\";\n\tif ($start_page >= 2 && $pages_to_show < $max_page) {\n\t\t$first_page_text = \"First\";\n\t\techo '<li class=\"bpn-first-page-link\"><a href=\"'.get_pagenum_link().'\" title=\"'.$first_page_text.'\">'.$first_page_text.'</a></li>';\n\t}\n\techo '<li class=\"bpn-prev-link\">';\n\tprevious_posts_link('<<');\n\techo '</li>';\n\tfor($i = $start_page; $i <= $end_page; $i++) {\n\t\tif($i == $paged) {\n\t\t\techo '<li class=\"bpn-current\">'.$i.'</li>';\n\t\t} else {\n\t\t\techo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"bpn-next-link\">';\n\tnext_posts_link('>>');\n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = \"Last\";\n\t\techo '<li class=\"bpn-last-page-link\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"'.$last_page_text.'\">'.$last_page_text.'</a></li>';\n\t}\n\techo '</ol></nav>'.$after.\"\";\n}",
"function content_nav() {\n\t\t$current_individual_nav_items = 0;\n\t\t$max_individual_nav_items = 4;\n\t\t\n\t\tforeach($this->data['content_actions'] as $key => $item) :\n\t\t\tif ( $current_individual_nav_items == $max_individual_nav_items ) { ?>\n\t\t\t\t<?\n\t\t\t}\n\t\t\t\n\t\t\techo $this->makeListItem( $key, $item );\n\t\t\t$current_individual_nav_items++;\n\t\tendforeach;\n\t\t\n\t\t?></ul></li><?\n\t}",
"public function __buildNavigation(){\n\t\t\t$nav = array();\n\t\t\t$xml = simplexml_load_file(ASSETS . '/navigation.xml');\n\n\t\t\t// Loop over the default Symphony navigation file, converting\n\t\t\t// it into an associative array representation\n\t\t\tforeach($xml->xpath('/navigation/group') as $n){\n\n\t\t\t\t$index = (string)$n->attributes()->index;\n\t\t\t\t$children = $n->xpath('children/item');\n\t\t\t\t$content = $n->attributes();\n\n\t\t\t\t// If the index is already set, increment the index and check again.\n\t\t\t\t// Rinse and repeat until the index is not set.\n\t\t\t\tif(isset($nav[$index])){\n\t\t\t\t\tdo{\n\t\t\t\t\t\t$index++;\n\t\t\t\t\t}while(isset($nav[$index]));\n\t\t\t\t}\n\n\t\t\t\t$nav[$index] = array(\n\t\t\t\t\t'name' => __(strval($content->name)),\n\t\t\t\t\t'index' => $index,\n\t\t\t\t\t'children' => array()\n\t\t\t\t);\n\n\t\t\t\tif(strlen(trim((string)$content->limit)) > 0){\n\t\t\t\t\t$nav[$index]['limit'] = (string)$content->limit;\n\t\t\t\t}\n\n\t\t\t\tif(count($children) > 0){\n\t\t\t\t\tforeach($children as $child){\n\t\t\t\t\t\t$item = array(\n\t\t\t\t\t\t\t'link' => (string)$child->attributes()->link,\n\t\t\t\t\t\t\t'name' => __(strval($child->attributes()->name)),\n\t\t\t\t\t\t\t'visible' => ((string)$child->attributes()->visible == 'no' ? 'no' : 'yes'),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$limit = (string)$child->attributes()->limit;\n\t\t\t\t\t\tif(strlen(trim($limit)) > 0) $item['limit'] = $limit;\n\n\t\t\t\t\t\t$nav[$index]['children'][] = $item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Build the section navigation, grouped by their navigation groups\n\t\t\t$sections = Symphony::Database()->fetch(\"SELECT * FROM `tbl_sections` ORDER BY `sortorder` ASC\");\n\t\t\tif(is_array($sections) && !empty($sections)){\n\t\t\t\tforeach($sections as $s){\n\n\t\t\t\t\t$group_index = self::__navigationFindGroupIndex($nav, $s['navigation_group']);\n\n\t\t\t\t\tif($group_index === false){\n\t\t\t\t\t\t$group_index = General::array_find_available_index($nav, 0);\n\n\t\t\t\t\t\t$nav[$group_index] = array(\n\t\t\t\t\t\t\t'name' => $s['navigation_group'],\n\t\t\t\t\t\t\t'index' => $group_index,\n\t\t\t\t\t\t\t'children' => array()\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$nav[$group_index]['children'][] = array(\n\t\t\t\t\t\t'link' => '/publish/' . $s['handle'] . '/',\n\t\t\t\t\t\t'name' => $s['name'],\n\t\t\t\t\t\t'type' => 'section',\n\t\t\t\t\t\t'section' => array('id' => $s['id'], 'handle' => $s['handle']),\n\t\t\t\t\t\t'visible' => ($s['hidden'] == 'no' ? 'yes' : 'no')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Loop over all the installed extensions to add in other navigation items\n\t\t\t$extensions = Symphony::ExtensionManager()->listInstalledHandles();\n\t\t\tforeach($extensions as $e){\n\t\t\t\t$info = Symphony::ExtensionManager()->about($e);\n\n\t\t\t\tif(isset($info['navigation']) && is_array($info['navigation']) && !empty($info['navigation'])){\n\t\t\t\t\tforeach($info['navigation'] as $item){\n\n\t\t\t\t\t\t$type = (isset($item['children']) ? Extension::NAV_GROUP : Extension::NAV_CHILD);\n\n\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\tcase Extension::NAV_GROUP:\n\n\t\t\t\t\t\t\t\t$index = General::array_find_available_index($nav, $item['location']);\n\n\t\t\t\t\t\t\t\t$nav[$index] = array(\n\t\t\t\t\t\t\t\t\t'name' => $item['name'],\n\t\t\t\t\t\t\t\t\t'index' => $index,\n\t\t\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t\t\t'limit' => (!is_null($item['limit']) ? $item['limit'] : null)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tforeach($item['children'] as $child){\n\t\t\t\t\t\t\t\t\tif(!isset($child['relative']) || $child['relative'] == true){\n\t\t\t\t\t\t\t\t\t\t$link = '/extension/' . $e . '/' . ltrim($child['link'], '/');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t$link = '/' . ltrim($child['link'], '/');\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$nav[$index]['children'][] = array(\n\t\t\t\t\t\t\t\t\t\t'link' => $link,\n\t\t\t\t\t\t\t\t\t\t'name' => $child['name'],\n\t\t\t\t\t\t\t\t\t\t'visible' => ($child['visible'] == 'no' ? 'no' : 'yes'),\n\t\t\t\t\t\t\t\t\t\t'limit' => (!is_null($child['limit']) ? $child['limit'] : null)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Extension::NAV_CHILD:\n\n\t\t\t\t\t\t\t\tif(!isset($item['relative']) || $item['relative'] == true){\n\t\t\t\t\t\t\t\t\t$link = '/extension/' . $e . '/' . ltrim($item['link'], '/');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t$link = '/' . ltrim($item['link'], '/');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif(!is_numeric($item['location'])){\n\t\t\t\t\t\t\t\t\t// is a navigation group\n\t\t\t\t\t\t\t\t\t$group_name = $item['location'];\n\t\t\t\t\t\t\t\t\t$group_index = self::__navigationFindGroupIndex($nav, $item['location']);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// is a legacy numeric index\n\t\t\t\t\t\t\t\t\t$group_index = $item['location'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$child = array(\n\t\t\t\t\t\t\t\t\t'link' => $link,\n\t\t\t\t\t\t\t\t\t'name' => $item['name'],\n\t\t\t\t\t\t\t\t\t'visible' => ($item['visible'] == 'no' ? 'no' : 'yes'),\n\t\t\t\t\t\t\t\t\t'limit' => (!is_null($item['limit']) ? $item['limit'] : null)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif ($group_index === false) {\n\t\t\t\t\t\t\t\t\t$group_index = General::array_find_available_index($nav, 0);\n\t\t\t\t\t\t\t\t\t// add new navigation group\n\t\t\t\t\t\t\t\t\t$nav[$group_index] = array(\n\t\t\t\t\t\t\t\t\t\t'name' => $group_name,\n\t\t\t\t\t\t\t\t\t\t'index' => $group_index,\n\t\t\t\t\t\t\t\t\t\t'children' => array($child),\n\t\t\t\t\t\t\t\t\t\t'limit' => (!is_null($item['limit']) ? $item['limit'] : null)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// add new location by index\n\t\t\t\t\t\t\t\t\t$nav[$group_index]['children'][] = $child;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * After building the Navigation properties array. This is specifically\n\t\t\t * for extensions to add their groups to the navigation or items to groups,\n\t\t\t * already in the navigation. Note: THIS IS FOR ADDING ONLY! If you need\n\t\t\t * to edit existing navigation elements, use the `NavigationPreRender` delegate.\n\t\t\t *\n\t\t\t * @deprecated This delegate is deprecated and will be removed in the next\n\t\t\t * major release of Symphony. Extensions are encouraged to use provide the\n\t\t\t * `fetchNavigation` method instead.\n\t\t\t * @delegate ExtensionsAddToNavigation\n\t\t\t * @param string $context\n\t\t\t * '/backend/'\n\t\t\t * @param array $navigation\n\t\t\t */\n\t\t\tSymphony::ExtensionManager()->notifyMembers(\n\t\t\t\t'ExtensionsAddToNavigation', '/backend/', array('navigation' => &$nav)\n\t\t\t);\n\n\t\t\t$pageCallback = Administration::instance()->getPageCallback();\n\n\t\t\t$pageRoot = $pageCallback['pageroot'] . (isset($pageCallback['context'][0]) ? $pageCallback['context'][0] . '/' : '');\n\t\t\t$found = self::__findActiveNavigationGroup($nav, $pageRoot);\n\n\t\t\t// Normal searches failed. Use a regular expression using the page root. This is less\n\t\t\t// efficient and should never really get invoked unless something weird is going on\n\t\t\tif(!$found) self::__findActiveNavigationGroup($nav, '/^' . str_replace('/', '\\/', $pageCallback['pageroot']) . '/i', true);\n\n\t\t\tksort($nav);\n\t\t\t$this->_navigation = $nav;\n\t\t}",
"function nav_pages_struct(&$result, $q_string, $count, $REC_PER_PAGE) {\n \n\tglobal $label;\n\tglobal $list_mode;\n\t\n\tif ($list_mode=='PREMIUM') {\n\t\t$page = 'hot.php';\t\t\n\t} else {\n\t\t$page = $_SERVER[PHP_SELF];\n\t}\n\t$offset = $_REQUEST[\"offset\"];\n\t$show_emp = $_REQUEST[\"show_emp\"];\n\t\n\tif ($show_emp != '') {\n\t $show_emp = (\"&show_emp=$show_emp\");\n\t}\n\t$cat = $_REQUEST[\"cat\"];\n\tif ($cat != '') {\n\t $cat = (\"&cat=$cat\");\n\t}\n\t$order_by = $_REQUEST[\"order_by\"];\n\tif ($order_by != '') {\n\t $order_by = (\"&order_by=$order_by\");\n\t}\n\n\t$cur_page = $offset / $REC_PER_PAGE;\n\t$cur_page++;\n\t// estimate number of pages.\n\t$pages = ceil($count / $REC_PER_PAGE);\n\tif ($pages == 1) {\n\t return;\n\t}\n\t$off = 0;\n\t$p=1;\n\t$prev = $offset-$REC_PER_PAGE;\n\t$next = $offset+$REC_PER_PAGE;\n\n\tif ($prev===0) {\n\t\t$prev='';\n\t}\n\n\tif ($prev > -1) {\n\t $nav['prev'] = \"<a href='\".$page.\"?offset=\".$prev.$q_string.$show_emp.$cat.$order_by.\"'>\".$label[\"navigation_prev\"] .\"</a> \";\n\t \n\t}\n\tfor ($i=0; $i < $count; $i=$i+$REC_PER_PAGE) {\n\t if ($p == $cur_page) {\n\t\t $nav['cur_page'] = $p;\n\t\t \n\t\t \n\t } else {\n\t\t if ($off===0) {\n\t\t\t$off='';\n\t\t}\n\t\t if ($nav['cur_page'] !='') {\n\t\t\t $nav['pages_after'][$p] = $off;\n\t\t } else {\n\t\t\t$nav['pages_before'][$p] = $off;\n\t\t }\n\t }\n\t $p++;\n\t $off = $off + $REC_PER_PAGE;\n\t}\n\tif ($next < $count ) \n\t\t$nav['next'] = \" | <a href='\".$page.\"?offset=\".$next.$q_string.$show_emp.$cat.$order_by.\"'> \".$label[\"navigation_next\"].\"</a>\";\n\n\treturn $nav;\n}",
"function listNavigationItems()\n{\n include('models/navigation.php');\n $items = getAllNavigationItems();\n return [\n 'page' => 'admin/lists/navigation.php',\n 'items' => $items,\n 'edit_link' => 'index.php?p=admin&module=navigation&action=edit&id=',\n 'delete_link' => 'index.php?p=admin&module=navigation&action=delete&id=',\n ];\n}",
"function getNavigation()\n\t{\n\n\n\t\treturn;\n\n\t\tglobal $gMysql;\n\t\tglobal $member_id;\n\t\t# grab these items\n\t\t$num_views\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_views where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_winks\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_winks where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_favs\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_fav where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_messages\t\t=\t$gMysql->queryItem(\"select count(*) from sm_messages where member_id='$member_id'\",__FILE__,__LINE__);\n\n\n\n\t\t$menuArray\t=\tarray(\n\t\tarray(\n\t\t\"title\"\t\t\t=>\t\"Profile\",\n\t\t\"bShowNumber\"\t=>\tfalse,\n\t\t\"number\"\t\t=>\t0,\n\t\t\"bHeader\"\t\t=>\ttrue,\n\t\t\"className\"\t\t=>\t\"icon-user\",\n\t\t\"link\" \t\t\t=>\t\"http://bbc.co.uk\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Search\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-search\",\n\t\t\"link\" \t\t\t =>\t\"search\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Messages\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_messages,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-mail\",\n\t\t\"link\" \t\t\t =>\t\"inbox\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Views\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_views,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-binoculars\",\n\t\t\"link\" \t\t\t =>\t\"views\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Winks\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_winks,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-eye\",\n\t\t\"link\" \t\t\t =>\t\"winks\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Favourites\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_favs,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-bookmarks\",\n\t\t\"link\" \t\t\t =>\t\"favourites\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Matches\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-heart\",\n\t\t\"link\" \t\t\t =>\t\"matches\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Membership\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-unlocked\",\n\t\t\"link\" \t\t\t =>\t\"membership\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Profile\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-user\",\n\t\t\"link\" \t\t\t =>\t\"profile\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t\t=>\t\"Logout\",\n\t\t\"bShowNumber\"\t\t=>\tfalse,\n\t\t\"number\"\t\t\t=>\t0,\n\t\t\"bHeader\"\t\t\t=>\ttrue,\n\t\t\"className\"\t\t\t=>\t\"icon-switch\",\n\t\t\"link\"\t\t\t\t=>\t\"javacript:confirm('app/m/login/logout');\",\n\t\t),\n\t\t);\n\n\t\t$selectedItem\t=\t3;\n\t\t$index\t\t\t=\t0;\n\n\n\t\t$menuString\t=\t' <ul> ';\n\n\n\t\tforeach ($menuArray as $menuItem)\n\t\t{\n\t\t\t# build html of menu\n\t\t\tif\t($selectedItem == $index)\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li class=\"selected\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li>';\n\t\t\t}\n\n\n\t\t\t$menu_line\t.=\t'<a href=\"' . $menuItem['link'] . '\" class=\"' . $menuItem['className'] . '\" >' . $menuItem['title'];\n\t\t\t# numerics?\n\t\t\tif\t($menuItem['bShowNumber'] == true)\n\t\t\t{\n\t\t\t\t$menu_line\t.=\t\t' <span class=\"pip\">' . $menuItem['number'] . '</span>';\n\t\t\t}\n\t\t\t$menu_line .= \"</a></li>\\r\\n\";\n\n\t\t\t$menuString\t.=\t$menu_line;\n\n\t\t\t$index++;\n\t\t}\n\t\t$menuString\t.=\t\"</ul>\";\n\n\t\treturn\t$menuString;\n\t}"
] | [
"0.71068513",
"0.7080048",
"0.7064319",
"0.68888676",
"0.68515664",
"0.68149006",
"0.66705847",
"0.657559",
"0.6574159",
"0.65615386",
"0.6427047",
"0.6393412",
"0.639238",
"0.6347253",
"0.63456297",
"0.63244474",
"0.63088495",
"0.6304778",
"0.62786794",
"0.6277477",
"0.62400305",
"0.62345463",
"0.6226984",
"0.6211984",
"0.620616",
"0.6194844",
"0.617725",
"0.61702293",
"0.61689925",
"0.61676794",
"0.6159547",
"0.6156757",
"0.6146806",
"0.6141636",
"0.61364025",
"0.613459",
"0.61328727",
"0.613257",
"0.6126576",
"0.6105922",
"0.6105527",
"0.60959584",
"0.609468",
"0.6081013",
"0.6074995",
"0.60728323",
"0.60577",
"0.6054682",
"0.6048066",
"0.6037169",
"0.6036368",
"0.6036368",
"0.6028422",
"0.6020858",
"0.6016901",
"0.60131735",
"0.60100347",
"0.59958565",
"0.59946084",
"0.59907293",
"0.5970061",
"0.5964679",
"0.59619504",
"0.59509176",
"0.5946815",
"0.59443843",
"0.5937359",
"0.59314567",
"0.59182763",
"0.59141934",
"0.5902666",
"0.5901494",
"0.5900297",
"0.5900169",
"0.5897607",
"0.5897235",
"0.5892971",
"0.5891367",
"0.58898926",
"0.58876276",
"0.5886997",
"0.58851504",
"0.5880439",
"0.5877737",
"0.5871915",
"0.587047",
"0.58659226",
"0.58624315",
"0.58445483",
"0.5842898",
"0.58425903",
"0.5840113",
"0.583921",
"0.58326447",
"0.58314115",
"0.58222014",
"0.5815554",
"0.5814631",
"0.58106536",
"0.5808002",
"0.5805051"
] | 0.0 | -1 |
Create links for hits per page. | public function getHitsPerPage($hits)
{
$nav = "Träffar per sida: ";
foreach ($hits as $val) {
$nav .= "<a href='" . $this->getQueryString(array('hits' => $val)) . "'>$val</a> ";
}
return $nav;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createPageLinks()\n {\n $pageLinks = array();\n\n if ($this->totalPages > 10) {\n $startRange = $this->page - floor($this->range/2);\n $endRange = $this->page + floor($this->range/2);\n\n //Start range\n if ($startRange <= 0) {\n $startRange = 1;\n $endRange += abs($startRange) + 1;\n }\n\n // End range\n if ($endRange > $this->totalPages) {\n $startRange -= $endRange - $this->totalPages;\n $endRange = $this->totalPages;\n }\n\n // Range\n $range = range($startRange, $endRange);\n\n // Add first page\n $this->pageLinks[] = array(\n 'page' => 1,\n 'uri' => $this->createUri(1)\n );\n\n foreach ($range as $page) {\n // Skip for first and last page\n if ($page == 1 or $page == $this->totalPages) {\n continue;\n }\n\n $this->pageLinks[] = array(\n 'page' => $page,\n 'uri' => $this->createUri($page)\n );\n }\n\n // Add last page\n $this->pageLinks[] = array(\n 'page' => $this->totalPages,\n 'uri' => $this->createUri($this->totalPages)\n );\n } else {\n for ($i = 1; $i <= $this->totalPages; $i++) {\n $this->pageLinks[] = array(\n 'page' => $i,\n 'uri' => $this->createUri($i)\n );\n }\n }\n }",
"private function generateLinks()\n\t{\n\t\t// Additional pages are the total minus the current page\n\t\t$iAdditional\t= $this->iToShow - 1;\n\n\t\t// Figure out how many additional pages to show\n\t\t$iToShow\t\t= ($this->iTotal <= $iAdditional) ? ($this->iTotal - 1) : $iAdditional;\n\n\t\t// Get the pre and post lengths\n\t\tif($iToShow % 2 == 0) {\n\t\t\t$iPre\t= $iToShow / 2;\n\t\t\t$iPost\t= $iPre;\n\t\t} else {\n\t\t\t$iPre\t= floor($iToShow / 2);\n\t\t\t$iPost\t= $iPre + 1;\n\t\t}\n\n\t\t// If the current page is less than the pre pages\n\t\tif($this->iPage <= $iPre)\n\t\t{\n\t\t\t$iPre\t= $this->iPage - 1;\n\t\t\t$iPost\t= $iToShow - $iPre;\n\t\t}\n\t\t// Else if the total pages minus the current page is less than the\n\t\t//\tpost pages\n\t\tif($this->iTotal - $this->iPage <= $iPost)\n\t\t{\n\t\t\t$iPost\t= $this->iTotal - $this->iPage;\n\t\t\t$iPre\t= $iToShow - $iPost;\n\t\t}\n\n\t\t// Init the links array\n\t\t$this->aLinks\t= array(\n\t\t\t'previous'\t\t=> false,\n\t\t\t'first'\t\t\t=> false,\n\t\t\t'pre'\t\t\t=> array(),\n\t\t\t'current'\t\t=> '',\n\t\t\t'post'\t\t\t=> array(),\n\t\t\t'last'\t\t\t=> false,\n\t\t\t'next'\t\t\t=> false\n\t\t);\n\n\t\t// If the page isn't 1\n\t\tif($this->iPage > 1)\n\t\t{\n\t\t\t// Add the previous button\n\t\t\t$this->aLinks['previous'] = array(\n\t\t\t\t'text'\t=> $this->iPage - 1,\n\t\t\t\t'url'\t=> (($this->iPage - 1 == 1) ? $this->aOptions['primary_url'] : $this->sURL . ($this->iPage - 1) . '/') . $this->sQuery,\n\t\t\t\t'index' => (($this->iPage - 1) > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the page is greater than the pre length\n\t\tif($this->iPage - 1 > $iPre)\n\t\t{\n\t\t\t// Add the first page\n\t\t\t$this->aLinks['first'] = array(\n\t\t\t\t'text'\t=> 1,\n\t\t\t\t'url'\t=> $this->aOptions['primary_url'] . $this->sQuery,\n\t\t\t\t'index' => (1 > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// Add the previous pages\n\t\tfor($i = $this->iPage - $iPre; $i < $this->iPage; ++$i)\n\t\t{\n\t\t\t$this->aLinks['pre'][]\t= array(\n\t\t\t\t'text'\t=> $i,\n\t\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t\t'index' => ($i > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// Add the current page\n\t\t$this->aLinks['current'] = array(\n\t\t\t'text'\t=> $this->iPage,\n\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t'index' => ($this->iPage > $this->aOptions['index_limit']) ? false : true\n\t\t);\n\n\t\t// Add the next pages\n\t\t$iForCond\t= $this->iPage + $iPost + 1;\n\t\tfor($i = $this->iPage + 1; $i < $iForCond; ++$i)\n\t\t{\n\t\t\t$this->aLinks['post'][] = array(\n\t\t\t\t'text'\t=> $i,\n\t\t\t\t'url'\t=> (($i == 1) ? $this->aOptions['primary_url'] : $this->sURL . $i . '/') . $this->sQuery,\n\t\t\t\t'index' => ($i > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the last page isn't visible\n\t\tif($this->iTotal > $this->iPage + $iPost)\n\t\t{\n\t\t\t// And the last page\n\t\t\t$this->aLinks['last']\t= array(\n\t\t\t\t'text'\t=> $this->iTotal,\n\t\t\t\t'url'\t=> $this->sURL . $this->iTotal . '/' . $this->sQuery,\n\t\t\t\t'index' => ($this->iTotal > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\n\t\t// If the current page isn't the last page\n\t\tif($this->iTotal != $this->iPage)\n\t\t{\n\t\t\t// Show the next page\n\t\t\t$this->aLinks['next']\t= array(\n\t\t\t\t'text'\t=> $this->iPage + 1,\n\t\t\t\t'url'\t=> $this->sURL . ($this->iPage + 1) . '/' . $this->sQuery,\n\t\t\t\t'index' => (($this->iPage + 1) > $this->aOptions['index_limit']) ? false : true\n\t\t\t);\n\t\t}\n\t}",
"function getHitsPerPage($hits) {\n $nav = \"Träffar per sida: \";\n foreach($hits AS $val) {\n $nav .= \"<a href='\" . getQueryString(array('hits' => $val)) . \"'>$val</a> \";\n } \n return $nav;\n}",
"public function create_links()\n {\n $totalPages = floor($this->total_records / $this->size);\n $totalPages += ($this->total_records % $this->size != 0) ? 1 : 0;\n if($totalPages < 1 || $totalPages == 1)\n return null;\n $output = null;\n $loopStart = 1;\n $loopEnd = $totalPages;\n if($totalPages > 5){\n if($this->page <= 3){\n $loopStart = 1;\n $loopEnd = 5;\n } else if($this->page >= $totalPages - 2){\n $loopStart = $totalPages - 4;\n $loopEnd = $totalPages;\n } else{\n $loopStart = $this->page - 2;\n $loopEnd = $this->page + 2;\n }\n }\n if($loopStart != 1){\n $output .= sprintf('<a id=\"back\" href=\"' . $this->link . '\">«</a>', '1');\n }\n if($this->page > 1){\n $output .= sprintf('<a id=\"prev\" href=\"' . $this->link . '\">' . __('Previous') . '</a>', $this->page - 1);\n }\n for($i = $loopStart; $i <= $loopEnd; $i++){\n if($i == $this->page){\n $output .= '<a class=\"on\">' . $i . '</a>';\n } else{\n $output .= sprintf('<a href=\"' . $this->link . '\">', $i) . $i . '</a>';\n }\n }\n if($this->page < $totalPages){\n $output .= sprintf('<a id=\"next\" href=\"' . $this->link . '\">' . __('Next') . '</a>', $this->page + 1);\n }\n if($loopEnd != $totalPages){\n $output .= sprintf('<a id=\"forward\" href=\"' . $this->link . '\">»</a>', $totalPages);\n }\n return '<div id=\"pagination\"><ul><li>' . $output . '</li></ul></div>';\n }",
"function create_links()\n\t{\n\t\t$totalItems = $this->total_records;\n\t\t$perPage = $this->size;\n\t\t$currentPage = $this->page;\n\t\t$link = $this->link;\n\t\t$totalPages = floor($totalItems / $perPage);\n\t\t$totalPages += ($totalItems % $perPage != 0) ? 1 : 0;\n\n\t\tif ($totalPages < 1 || $totalPages == 1){\n\t\t\treturn null;\n\t\t}\n\n\t\t$output = null;\t\t\t\t\n\t\t$loopStart = 1; \n\t\t$loopEnd = $totalPages;\n\n\t\tif ($totalPages > 5)\n\t\t{\n\t\t\tif ($currentPage <= 3)\n\t\t\t{\n\t\t\t\t$loopStart = 1;\n\t\t\t\t$loopEnd = 5;\n\t\t\t}\n\t\t\telse if ($currentPage >= $totalPages - 2)\n\t\t\t{\n\t\t\t\t$loopStart = $totalPages - 4;\n\t\t\t\t$loopEnd = $totalPages;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$loopStart = $currentPage - 2;\n\t\t\t\t$loopEnd = $currentPage + 2;\n\t\t\t}\n\t\t}\n\n\t\tif ($loopStart != 1){\n\t\t\t$output .= sprintf('<li class=\"disabledpage\"> <a href=\"' . $link . '\">«</a> </li>', '1');\n\t\t}\n\t\t\n\t\tif ($currentPage > 1){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._previous_.'</a> </li>', $currentPage - 1);\n\t\t}\n\t\t\n\t\tfor ($i = $loopStart; $i <= $loopEnd; $i++)\n\t\t{\n\t\t\tif ($i == $currentPage){\n\t\t\t\t$output .= '<li class=\"currentpage\">' . $i . '</li> ';\n\t\t\t} else {\n\t\t\t\t$output .= sprintf('<li><a href=\"' . $link . '\">', $i) . $i . '</a> </li> ';\n\t\t\t}\n\t\t}\n\n\t\tif ($currentPage < $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._next_.'</a> </li>', $currentPage + 1);\n\t\t}\n\t\t\n\t\tif ($loopEnd != $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">»</a> </li>', $totalPages);\n\t\t}\n\n\t\treturn '<div class=\"pagination\"><ul>' . $output . '</ul></div>';\n\t}",
"public function genPageNums()\n\t{\n\t\t$pageLinks = array();\t\n\t\n\t\tfor($i=1; $i<=$this->numofpages; $i++)\n\t\t{\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\t\n\t\n\t\tif(($this->totalrows % $this->limit) != 0)\n\t\t{\n\t\t\t$this->numofpages++;\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\n\t\tksort($pageLinks);\n\t\t$this->pagination['nums'] = $pageLinks;\n\t}",
"private function getLinks(Pagerfanta $pagerFanta)\n {\n $route = $this->request->attributes->get('_route');\n // make sure we read the route parameters from the passed option array\n $defaultRouteParams = array_merge($this->request->query->all(), $this->request->attributes->get('_route_params', array()));\n $createLinkUrl = function ($targetPage) use ($route, $defaultRouteParams) {\n $router = $this->container->get('router');\n\n return $router->generate($route, array_merge(\n $defaultRouteParams,\n array('page' => $targetPage)\n ));\n };\n\n $this->addLink('self', $createLinkUrl($pagerFanta->getCurrentPage()));\n $this->addLink('first', $createLinkUrl(1));\n $this->addLink('last', $createLinkUrl($pagerFanta->getNbPages()));\n\n if ($pagerFanta->hasNextPage()) {\n $this->addLink('next', $createLinkUrl($pagerFanta->getNextPage()));\n }\n\n if ($pagerFanta->hasPreviousPage()) {\n $this->addLink('prev', $createLinkUrl($pagerFanta->getPreviousPage()));\n }\n\n return $this->links;\n }",
"protected function generateLinks()\n {\n if ( ! is_null($this->links) ) {\n foreach ( $this->links as $link ) {\n $this->addLine('<url>');\n $this->addLine('<loc>');\n $this->addLine($this->helpers->url(\n $link->link,\n $this->protocol,\n $this->host\n ));\n $this->addLine('</loc>');\n $this->addLine('<lastmod>' . date_format($link->updated_at, 'Y-m-d') . '</lastmod>');\n $this->addLine('</url>');\n }\n }\n }",
"function pagelinks($base_url, $total_results)\n\t\t{ \n\t\t\tif ($this->mmhclass->info->config['seo_urls'] == '1') {\n\t\t\t\t$base_url .= ((strpos($base_url, \"?\") === false) ? \"\" : \"&\");\n\t\t\t }else{$base_url .= ((strpos($base_url, \"?\") === false) ? \"?\" : \"&\");\n\t\t\t}\n\t\t\t$total_pages = ceil($total_results / $this->mmhclass->info->config['max_results']);\n\t\t\t$current_page = (($this->mmhclass->info->current_page > $total_pages) ? $total_pages : $this->mmhclass->info->current_page); \n\t\t\t\n\t\t\tif ($total_pages < 2) {\n\t\t\t\t$template_html = $this->mmhclass->lang['3384'];\n\t\t\t} else {\n\t\t\t\tif ($this->mmhclass->info->config['seo_urls'] == '1') {\n\t\t\t\t\t$template_html = (($current_page > 1) ? sprintf($this->mmhclass->lang['3484'], sprintf(\"%s%s\", $base_url, ($this->mmhclass->info->current_page - 1))) : NULL);\n\t\t\t\t}else {$template_html = (($current_page > 1) ? sprintf($this->mmhclass->lang['3484'], sprintf(\"%spage=%s\", $base_url, ($this->mmhclass->info->current_page - 1))) : NULL);}\n\t\t\t\tfor ($i = 1; $i <= $total_pages; $i++) {\n\t\t\t\t\tif ($i == $current_page) {\n\t\t\t\t\t\t$template_html .= sprintf(\"<strong>%s</strong>\", $this->mmhclass->funcs->format_number($i));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($i < ($current_page - 5)) { continue; }\n\t\t\t\t\t\tif ($i > ($current_page + 5)) { break; }\n\t\t\t\t\t\tif ($this->mmhclass->info->config['seo_urls'] == '1') {\n\t\t\t\t\t\t\t$template_html .= sprintf(\"<a href=\\\"%s%s\\\">%s</a>\", $base_url, $i, $this->mmhclass->funcs->format_number($i));\n\t\t\t\t\t\t}else{$template_html .= sprintf(\"<a href=\\\"%spage=%s\\\">%s</a>\", $base_url, $i, $this->mmhclass->funcs->format_number($i));}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($this->mmhclass->info->config['seo_urls'] == '1') {\n\t\t\t\t\t$template_html .= (($current_page < $total_pages) ? sprintf($this->mmhclass->lang['5475'], sprintf(\"%s%s\", $base_url, ($this->mmhclass->info->current_page + 1))) : NULL);\n\t\t\t\t}else{\n\t\t\t\t\t$template_html .= (($current_page < $total_pages) ? sprintf($this->mmhclass->lang['5475'], sprintf(\"%spage=%s\", $base_url, ($this->mmhclass->info->current_page + 1))) : NULL);\n\t\t\t\t}\n\t\t\t\t$template_html = sprintf($this->mmhclass->lang['7033'], $current_page, $total_pages, $template_html);\n\t\t\t\t /* Go To Page */\n if(isset($this->mmhclass->input->get_vars['page']) && !is_numeric($this->mmhclass->input->get_vars['page'])){\n // $this->mmhclass->templ->error(\"Page must be a number!<br /><br /><a href=\\\"javascript:void(0);\\\" onclick=\\\"history.go(-1);\\\">Return to Previous Page</a>\", true);\n\t$this->mmhclass->input->get_vars['page'] = 0;\n } else {\n\n $query = $_SERVER[\"QUERY_STRING\"];\n\n $string = ((empty($query)) ? NULL : \"?\" . $query);\n\n $currentFile = $_SERVER[\"SCRIPT_NAME\"];\n $parts = Explode('/', $currentFile);\n $currentFile = $parts[count($parts) - 1];\n $action = $currentFile . $string;\n\n $get_val = $this->mmhclass->input->get_vars['act'];\n $gal_val = (int)$this->mmhclass->input->get_vars['gal'];\n $cat_val = (int)$this->mmhclass->input->get_vars['cat'];\n $get_var = ((empty($get_val)) ? NULL : \"<input type=\\\"hidden\\\" name=\\\"act\\\" value=\\\"{$get_val}\\\">\");\n $gal_var = ((empty($gal_val)) ? NULL : \"<input type=\\\"hidden\\\" name=\\\"gal\\\" value=\\\"{$gal_val}\\\">\");\n $cat_var = ((empty($cat_val)) ? NULL : \"<input type=\\\"hidden\\\" name=\\\"cat\\\" value=\\\"{$cat_val}\\\">\");\n $hidn_vars = $get_var . $gal_var . $cat_var;\n\tif ($this->mmhclass->info->config['seo_urls'] == '1') {\n\t\t// $template_html .= \"<form action=\\\"{$base_url}\\\" method=\\\"get\\\" id=\\\"form\\\">{$hidn_vars} | Go to page: <input type=\\\"text\\\" name=\\\"/\\\" value=\\\"\\\" size=\\\"3\\\"> <input class=\\\"button1\\\" type=\\\"submit\\\" value=\\\"Go\\\" /></form>\";\n\t}else {\n $template_html .= \"<form action=\\\"{$action}\\\" method=\\\"get\\\" id=\\\"form\\\">{$hidn_vars} | Go to page: <input type=\\\"text\\\" name=\\\"page\\\" value=\\\"\\\" size=\\\"3\\\"> <input class=\\\"button1\\\" type=\\\"submit\\\" value=\\\"Go\\\" /></form>\";\n\t}\n }\n /* /END Go To Page */\n\t\t\t}\n\t\t\t\n\t\t\treturn sprintf($this->mmhclass->lang['5834'], $template_html);\n\t\t}",
"function create_links() {\n $total_rows = $this->total_rows;\n if ($total_rows == 0) {\n return '';\n }\n\n // Calculate the total number of pages\n $CI = & get_instance();\n $_quantity = $CI->_quantity;\n $per_page = $this->per_page;\n $num_pages = ceil($total_rows / $per_page);\n\n // Is there only one page? Hm... nothing more to do here then.\n if ($num_pages == 1) {\n return '';\n }\n\n // Determine the current page number.\n $_offset = $CI->_offset;\n $cur_page = $_quantity == -1 ? -1 : floor($CI->_offset / $per_page) + 1;\n\n // And here we go...\n $output = '';\n\n // Render the \"First\" link\n if ($cur_page != 1) {\n $i = 0;\n $output .= $this->first_tag_open . $i . $this->first_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Render the \"previous\" link\n if ($cur_page != 1 && $_quantity != -1) {\n $i = $_offset - $per_page;\n $output .= $this->prev_tag_open . $i . $this->prev_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Write the digit links\n $output .= \"<select tabindex='-1'>\";\n $start = 1;\n $end = $per_page;\n if ($_quantity == -1)\n $output .= '<option selected=\"selected\" > - </option>';\n for ($loop = 1; $loop <= $num_pages; $loop++) {\n if ($end > $total_rows)\n $end = $total_rows;\n $output .= '<option value=\"' . (($loop - 1) * $per_page) . '\" ' . ($loop == $cur_page ? \"selected='selected'\" : \"\") . ' >Trang ' . $loop . '/' . $num_pages . ' ' . $start . \"-\" . $end . '/' . $total_rows . '</option>';\n $start+=$per_page;\n $end+=$per_page;\n }\n $output .= \"</select>\";\n\n // Render the \"next\" link\n if ($cur_page != $num_pages && $_quantity != -1) {\n $i = $_offset + $per_page;\n $output .= $this->next_tag_open . $i . $this->next_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Render the \"Last\" link\n if ($cur_page != $num_pages) {\n $i = ($num_pages - 1) * $per_page;\n $output .= $this->last_tag_open . $i . $this->last_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Add the wrapper HTML if exists\n $output = $this->full_tag_open . $output . str_replace(array(\"{class}\", \"{style}\"), array(($_quantity == -1 ? \"ui-state-hover\" : \"icon\"), ($_quantity == -1 ? \"cursor:default\" : \"\")), $this->full_tag_close);\n\n return $output;\n }",
"public function links()\n {\n return $this->paginator->render(new BootstrapThreePresenter($this->paginator));\n }",
"function create_links()\n\t{\n\t\t$output = '';\n\t\t\n\t\t/*if($this->block > 1){\n\t\t\t$this->prev = $this->first-1; \n\t\t\t$output .= '<a href=\"'.$this->url.'/page/1\" class=\"pBtn prev2\">처음</a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"class=\"pBtn prev2\">처음</a>'.chr(10);\n }*/\n\n\t\tif($this->page>1){\n\t\t\t$this->go_page=$this->page-1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->go_page.$this->querystring.'\"><img src=\"'.$this->theme.'/images/prev1.gif\" alt=\"Prev\" /></a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"><img src=\"'.$this->theme.'/images/prev1.gif\" alt=\"Prev\" /></a>'.chr(10);\n\t\t}\n\t\t\n\t\t$pgNum = '';\n\t\tfor($this->pagelnk=$this->first+1; $this->pagelnk <= $this->last; $this->pagelnk++)\n\t\t{\n\t\t\tif($this->first+1 < $this->pagelnk) $pgNum .= \"\t\"; \n\t\t\tif($this->pagelnk==$this->page){\n\t\t\t\t$pgNum .='<strong>'.$this->pagelnk.'</strong>'.chr(10);\n\t\t\t}else{\n\t\t\t\t$pgNum .='<a href=\"'.$this->url.'/page/'.$this->pagelnk.$this->querystring.'\">'.$this->pagelnk.'</a>'.chr(10);\n\t\t\t}\n \n if($this->paglnk!=$this->first+1 && $this->paglnk!=$this->last){\n $pgNum .= '';\n }\n\t\t}\n\t\t\n\t\t//$output .= $pgNum;\n $output .= '<span class=\"num\">'.$pgNum.'</span>';\n\n\t\tif($this->total_page>$this->page){\n\t\t\t$this->go_page=$this->page+1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->go_page.$this->querystring.'\"><img src=\"'.$this->theme.'/images/next1.gif\" alt=\"Next\" /></a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"><img src=\"'.$this->theme.'/images/next1.gif\" alt=\"Next\" /></a>'.chr(10);\n\t\t}\n\n\t\t/*if($this->block < $this->total_block){\n\t\t\t$this->next=$this->last+1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->total_page.'\" class=\"pBtn next2\">마지막</a>';\n\t\t}else{\n $output .= '<a href=\"javascript:void(0);\" class=\"pBtn next2\">마지막</a>';\n }*/\n\t\t\n\t\tif($this->total_page <= 1) $output =null;\n\n\t\treturn $output;\n\t}",
"function create_links()\n\t{\n\t\t// If our item count or per-page total is zero there is no need to continue.\n\t\tif ($this->total_rows == 0 OR $this->per_page == 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Calculate the total number of pages\n\t\t$num_pages = ceil($this->total_rows / $this->per_page);\n\n\t\t// Is there only one page? Hm... nothing more to do here then.\n\t\tif ($num_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Set the base page index for starting page number\n\t\tif ($this->use_page_numbers)\n\t\t{\n\t\t\t$base_page = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$base_page = 0;\n\t\t}\n\n\t\t// Determine the current page number.\n\t\t$CI =& get_instance();\n\n\t\tif ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)\n\t\t{\n\t\t\tif ($CI->input->get($this->query_string_segment) != $base_page)\n\t\t\t{\n\t\t\t\t$this->cur_page = $CI->input->get($this->query_string_segment);\n\n\t\t\t\t// Prep the current page - no funny business!\n\t\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($CI->uri->segment($this->uri_segment) != $base_page)\n\t\t\t{\n\t\t\t\t$this->cur_page = $CI->uri->segment($this->uri_segment);\n\n\t\t\t\t// Prep the current page - no funny business!\n\t\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set current page to 1 if using page numbers instead of offset\n\t\tif ($this->use_page_numbers AND $this->cur_page == 0)\n\t\t{\n\t\t\t$this->cur_page = $base_page;\n\t\t}\n\n\t\t$this->num_links = (int)$this->num_links;\n\n\t\tif ($this->num_links < 1)\n\t\t{\n\t\t\tshow_error('Your number of links must be a positive number.');\n\t\t}\n\n\t\tif ( ! is_numeric($this->cur_page))\n\t\t{\n\t\t\t$this->cur_page = $base_page;\n\t\t}\n\n\t\t// Is the page number beyond the result range?\n\t\t// If so we show the last page\n\t\tif ($this->use_page_numbers)\n\t\t{\n\t\t\tif ($this->cur_page > $num_pages)\n\t\t\t{\n\t\t\t\t$this->cur_page = $num_pages;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->cur_page > $this->total_rows)\n\t\t\t{\n\t\t\t\t$this->cur_page = ($num_pages - 1) * $this->per_page;\n\t\t\t}\n\t\t}\n\n\t\t$uri_page_number = $this->cur_page;\n\t\t\n\t\tif ( ! $this->use_page_numbers)\n\t\t{\n\t\t\t$this->cur_page = floor(($this->cur_page/$this->per_page) + 1);\n\t\t}\n\n\t\t// Calculate the start and end numbers. These determine\n\t\t// which number to start and end the digit links with\n\t\t$start = (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;\n\t\t$end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;\n\n\t\t// Is pagination being used over GET or POST? If get, add a per_page query\n\t\t// string. If post, add a trailing slash to the base URL if needed\n\t\tif ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)\n\t\t{\n\t\t\t$this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->base_url = rtrim($this->base_url, '/') .'/';\n\t\t}\n\n\t\t// And here we go...\n\t\t$output = '';\n\n\t\t// Render the \"First\" link\n\t\tif ($this->first_link !== FALSE AND $this->cur_page > ($this->num_links + 1))\n\t\t{\n\t\t\t$first_url = ($this->first_url == '') ? $this->base_url : $this->first_url;\n\t\t\t$output .= $this->first_tag_open.'<a '.$this->anchor_class.'href=\"'.$first_url.'\">'.$this->first_link.'</a>'.$this->first_tag_close;\n\t\t}\n\n\t\t// Render the \"previous\" link\n\t\tif ($this->prev_link !== FALSE AND $this->cur_page != 1)\n\t\t{\n\t\t\tif ($this->use_page_numbers)\n\t\t\t{\n\t\t\t\t$i = $uri_page_number - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = $uri_page_number - $this->per_page;\n\t\t\t}\n\n\t\t\tif ($i == 0 && $this->first_url != '')\n\t\t\t{\n\t\t\t\t$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->first_url.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = ($i == 0) ? '' : $this->prefix.$i.$this->suffix;\n\t\t\t\t$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$i.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\n\t\t}\n\n\t\t// Render the pages\n\t\tif ($this->display_pages !== FALSE)\n\t\t{\n\t\t\t// Write the digit links\n\t\t\tfor ($loop = $start -1; $loop <= $end; $loop++)\n\t\t\t{\n\t\t\t\tif ($this->use_page_numbers)\n\t\t\t\t{\n\t\t\t\t\t$i = $loop;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$i = ($loop * $this->per_page) - $this->per_page;\n\t\t\t\t}\n\n\t\t\t\tif ($i >= $base_page)\n\t\t\t\t{\n\t\t\t\t\tif ($this->cur_page == $loop)\n\t\t\t\t\t{\n\t\t\t\t\t\t$output .= $this->cur_tag_open.$loop.$this->cur_tag_close; // Current page\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$n = ($i == $base_page) ? '' : $i;\n\n\t\t\t\t\t\tif ($n == '' && $this->first_url != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->first_url.'\">'.$loop.'</a>'.$this->num_tag_close;\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 = ($n == '') ? '' : $this->prefix.$n.$this->suffix;\n\n\t\t\t\t\t\t\t$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$n.'\">'.$loop.'</a>'.$this->num_tag_close;\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// Render the \"next\" link\n\t\tif ($this->next_link !== FALSE AND $this->cur_page < $num_pages)\n\t\t{\n\t\t\tif ($this->use_page_numbers)\n\t\t\t{\n\t\t\t\t$i = $this->cur_page + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = ($this->cur_page * $this->per_page);\n\t\t\t}\n\n\t\t\t$output .= $this->next_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$this->prefix.$i.$this->suffix.'\">'.$this->next_link.'</a>'.$this->next_tag_close;\n\t\t}\n\n\t\t// Render the \"Last\" link\n\t\tif ($this->last_link !== FALSE AND ($this->cur_page + $this->num_links) < $num_pages)\n\t\t{\n\t\t\tif ($this->use_page_numbers)\n\t\t\t{\n\t\t\t\t$i = $num_pages;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = (($num_pages * $this->per_page) - $this->per_page);\n\t\t\t}\n\t\t\t$output .= $this->last_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$this->prefix.$i.$this->suffix.'\">'.$this->last_link.'</a>'.$this->last_tag_close;\n\t\t}\n\n\t\t// Kill double slashes. Note: Sometimes we can end up with a double slash\n\t\t// in the penultimate link so we'll kill all double slashes.\n\t\t$output = preg_replace(\"#([^:])//+#\", \"\\\\1/\", $output);\n\n\t\t// Add the wrapper HTML if exists\n\t\t$output = $this->full_tag_open.$output.$this->full_tag_close;\n\n\t\treturn $output;\n\t}",
"function generate_page_links($user_search, $sort, $cur_page, $num_pages) {\n $page_links = '<p>';\n\n // Generate \"previous page\" link if page is not the first page\n if ($cur_page > 1) {\n // Generate back arrow as an HTML link\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . ($cur_page - 1) . '\"><-</a> ';\n } else {\n // Generate back arrow as a non-HTML link\n $page_links .= '<- ';\n }\n\n // Generate page links for each individual page\n for ($index = 1; $index <= $num_pages; $index++) {\n // Generate clickable link if page is not current page\n if ($index == $cur_page) {\n $page_links .= ' ' . $index;\n } else {\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . $index . '\"> ' . $index . '</a> ';\n }\n }\n\n // Generate clickable link if current page is not the last page\n if ($cur_page < $num_pages) {\n // Generate back arrow as an HTML link\n $page_links .= '<a href=\"' . $_SERVER['PHP_SELF']\n . '?usersearch=' . $user_search . '&sort=' . $sort\n . '&page=' . ($cur_page + 1) . '\"> -></a> ';\n } else {\n // Generate back arrow as a non-HTML link\n $page_links .= ' ->';\n }\n\n $page_links .= '</p>';\n\n return $page_links;\n }",
"function generate_page_links($user_search, $sort, $cur_page, $num_pages) {\n $page_links = '';\n\n // If this page is not the first page, generate the \"previous\" link\n if ($cur_page > 1) {\n $page_links .= '<a class=\"pagelinks\" href=\"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=' . $sort . '&page=' . ($cur_page - 1) . '\"><-Previous</a> ';\n }\n else {\n $page_links .= '<- ';\n }\n\n // Loop through the pages generating the page number links\n for ($i = 1; $i <= $num_pages; $i++) {\n if ($cur_page == $i) {\n $page_links .= ' ' . $i;\n }\n else {\n $page_links .= ' <a class=\"pagelinks\" href=\"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=' . $sort . '&page=' . $i . '\"> ' . $i . '</a>';\n }\n }\n\n // If this page is not the last page, generate the \"next\" link\n if ($cur_page < $num_pages) {\n $page_links .= ' <a class=\"pagelinks\"href=\"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=' . $sort . '&page=' . ($cur_page + 1) . '\">Next-></a>';\n }\n else {\n $page_links .= ' ->';\n }\n\n return $page_links;\n }",
"public function getJoinPagesForQuery() {}",
"public function getJoinPagesForQuery() {}",
"static function init($data){\n \n $pages = ceil($data['count_all'] / $data['limit']);\n \n $res = \"\";\n \n for($i = 1; $i <= $pages; $i++){\n \n if($i == $data['current_page'] ){ \n $res .= \"<b>$i</b>\";\n }\n else{\n $res .= \"<a href='\".$data['url'].\"&page=$i'>$i</a>\";\n }\n \n }\n \n \n return $res;\n \n \n \n \n }",
"public function page_links()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$pagination = '';\n\t\t\n\t\t// Let's get the starting page number, this is determined using num_links\n\t\t$start = (($this->current_page - $this->num_links) > 0) ? $this->current_page - ($this->num_links - 1) : 1;\n\n\t\t// Let's get the ending page number\n\t\t$end = (($this->current_page + $this->num_links) < $this->total_pages) ? $this->current_page + $this->num_links : $this->total_pages;\n\n\t\tfor ($i = $start; $i <= $end; $i++)\n\t\t{\n\t\t\t$text = $i;\n\t\t\t$url = '#';\n\t\t\t$state = $this->template['state']['current_page'];\n\n\t\t\tif ($this->current_page != $i)\n\t\t\t{\n\t\t\t\t// detect if anchor attribute is presented in the template \n\t\t\t\tif (stripos('<a ', $this->template['page_start']) < 0)\n\t\t\t\t{\n\t\t\t\t\t$text = '<a href=\":url\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$url = $this->build_url($i);\n\t\t\t\t$state = '';\n\t\t\t}\n\n\t\t\t$pagination .= Str::tr($this->template['page_start'].$text.$this->template['page_end'], array(\n\t\t\t\t'state' => $state,\n\t\t\t\t'url' => $url,\n\t\t\t));\n\t\t}\n\n\t\treturn $pagination;\n\t}",
"private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }",
"function make_urls() {\n $url = '/search/' . $this->id . '/';\n $this->append_urls('self', $url);\n }",
"public function makeLinks($page, $perPage, $total, $template = 'default_full') {\n $name = time();\n\n $this->store($name, $page, $perPage, $total);\n\n return $this->displayLinks($name, $template);\n }",
"function paginationLinks($perpage,$thisPage,$database,$searchThrough,$orderBy,$direction) {\n\t\n\t\t$useUrl = \"{$GLOBALS[\"fullSiteUrl\"]}?page=\";\n\t\t\n\t\t// Total entries per page\n\t\t$pagination = $perpage;\n\t\t\n\t\t// set absolute value of 0\n\t\t$zero = abs(\"0\");\n\n\t\t// Get the current page\n\t\t$page = abs($thisPage);\n\t\tif ($page != \"\") {\n\t\t\t$startat = $page * $pagination;\n\t\t} else {\n\t\t\t$startat = 0;\n\t\t}\n\t\t\n\t\tif ($page == \"0\") {\n\t\t\t$current_page = \"1\";\n\t\t} else {\n\t\t\t$current_page = $page;\n\t\t}\n\n\t\t// Initial count/setup\n\t\t$setupsql = \"select * from `{$database}`{$searchThrough}\";\n\n\t\t$load = mq($setupsql);\n\t\t$count = num($load);\n\t\t$addpages = $count / $pagination;\n\t\t$totalpages = round(floor($addpages));\n\t\t\n\t\t// Display the FIRST button\n\t\tif ($current_page != \"1\") {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$first = '<a href=\"'.$useUrl.'1\">‹ First</a>';\n\t\t}\n\t\t// Display the PREVIOUS button\n\t\tif ($page > $zero && $current_page != \"1\") {\n\t\t\t$pre_current = $page;\n\t\t\t$previouspage = $pre_current - 1;\n\t\t\t$previous = ' <a href=\"'.$useUrl.$previouspage.'\"><</a> ';\n\t\t}\n\t\t// Display list of pages\n\t\t$c=1;\n\t\t$start = $current_page - 2;\n\t\t$end = 1;\n\t\twhile ($c <= $totalpages) {\n\t\t\tif ($c >= $start && $end <= \"5\") {\n\t\t\t\tif ($c != $totalpages) { $space = \" \"; } else { $space = \"\"; }\n\t\t\t\tif ($c == $page) { $currentpage = ' class=\"active\"'; } else { $currentpage = \"\"; }\n\t\t\t\t$listpages .= ' <a href=\"'.$useUrl.$c.'\"'.$currentpage.'>'.$c.'</a>'.$space;\n\t\t\t\t++$end;\n\t\t\t}\n\t\t\t++$c;\n\t\t}\n\t\t// TOTAL PAGES\n\t\tif ($c != \"1\") {\n\t\t\t$total_pages = $c - 1;\n\t\t\t$s = \"s\";\n\t\t} else {\n\t\t\t$total_pages = $c;\n\t\t\t$s = \"\";\n\t\t}\n\t\t// Display the LAST button\n\t\tif ($current_page != $total_pages) {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$last = \" <a href='{$useUrl}{$totalpages}'> Last ›</a>\";\n\t\t}\n\t\t// Display the NEXT button\n\t\tif (($page < $totalpages) && ($totalpages > 0) && ($current_page != $total_pages)) {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$next = ' <a href=\"'.$useUrl.$nextpage.'\">></a>';\n\t\t}\n\t\t\n\t\t// Page '.$current_page.' of '.$total_pages.' pages '.$pagination_links.'\n\t\treturn \"<p>Page {$current_page} of {$total_pages} page{$s} {$first} {$previous} {$listpages} {$next} {$last}</p>\";\n\n\t}",
"public function maping() {\n\n if(count($this->parse->domHtml->find('a'))){\n foreach ($this->parse->domHtml->find('a') as $element) {\n $link = new LinkBot(new HrefBot($element->href));\n\n if(!empty($link->link->getParseUrl()['host'])) {\n $host = $link->link->getParseUrl()['host'];\n } else {\n $host = false;\n }\n\n if (BotUrlHelper::isSameSite($host, $this->parse->request->getHost()) &&\n !BotUrlHelper::isRepeat($element->href, $this->parse->request->getUrls())) {\n\n //start connect\n $this->parse->request->setConnectTimeout(time());\n $link->startConnect($this->parse->request->getConnectTimeout());\n\n $countImg = 0;\n if (BotUrlHelper::url_exists($link->link->getLink())) {\n $countImg = count($this->parse->domHtml->getImgs());\n }\n\n //end connect\n $this->parse->request->setTimeout(time());\n $link->endConnect($this->parse->request->getTimeout());\n\n $this->parse->request->addUrl($element->href);\n\n $this->data[] = (object)[\n 'url' => $link->link->getLink(),\n 'countImg' => $countImg,\n 'end' => $link->end,\n 'start' => $link->start\n ];\n }\n unset($link);\n }\n }\n\n foreach ($this->parse->request->getUrls() as $url) {\n $this->analise($url);\n }\n \n }",
"public function page_numbers() {\n $pages = $this->total_pages();\n $query = htmlentities($this->term);\n $page = $this->pagenumber;\n $next = get_string('next', 'search');\n $back = get_string('back', 'search');\n\n $ret = \"<div align='center' id='search_page_links'>\";\n\n //Back is disabled if we're on page 1\n if ($page > 1) {\n $ret .= \"<a href='query.php?query_string={$query}&page=\".($page-1).\"'>< {$back}</a> \";\n } else {\n $ret .= \"< {$back} \";\n } \n\n //don't <a href> the current page\n for ($i = 1; $i <= $pages; $i++) {\n if ($page == $i) {\n $ret .= \"($i) \";\n } else {\n $ret .= \"<a href='query.php?query_string={$query}&page={$i}'>{$i}</a> \";\n } \n } \n\n //Next disabled if we're on the last page\n if ($page < $pages) {\n $ret .= \"<a href='query.php?query_string={$query}&page=\".($page+1).\"'>{$next} ></a> \";\n } else {\n $ret .= \"{$next} > \";\n } \n\n $ret .= \"</div>\";\n\n //shorten really long page lists, to stop table distorting width-ways\n if (strlen($ret) > 70) {\n $start = 4;\n $end = $page - 5;\n $ret = preg_replace(\"/<a\\D+\\d+\\D+>$start<\\/a>.*?<a\\D+\\d+\\D+>$end<\\/a>/\", '...', $ret);\n\n $start = $page + 5;\n $end = $pages - 3;\n $ret = preg_replace(\"/<a\\D+\\d+\\D+>$start<\\/a>.*?<a\\D+\\d+\\D+>$end<\\/a>/\", '...', $ret);\n }\n\n return $ret;\n }",
"public function getLinks(\n $countAllElements,//count all elements in this category\n $countElementsInThisPage,//count all elements in this page\n $startElements,//beginning number of output elements\n $linkLimit = 5,//count pages in chunk (chunk = array with pages)\n $controllerName,//controller name\n $varName = 'start'//get name of parameter, which is the count of output elements\n ) {\n if ($countElementsInThisPage >= $countAllElements || $countElementsInThisPage == 0) {\n return NULL;\n }\n\n $pages = 0;//count pages in pagination\n $needChunk = 0;//index need chunk in this moment\n $page = array();//array with value and text value page\n $queryVars = array();//GET array\n $pagesArr = array();//array with $startElements\n $link = Url::getUrl().$controllerName;//url address for page\n\n //in $queryVars GET parameters\n parse_str($_SERVER['QUERY_STRING'], $queryVars ); //&$queryVars\n\n if(isset($queryVars[$varName])) {\n\n unset($queryVars[$varName]);//delete GET with parameter $startElements\n }\n unset($queryVars['route']);//delete GET['route'], because route is controllerName\n\n $link = $link.'?'.http_build_query( $queryVars );//site url with router parameters and GET params\n\n $pages = ceil( $countAllElements / $countElementsInThisPage );//count pages\n\n for( $i = 0; $i < $pages; $i++) {\n $pagesArr[$i+1] = $i * $countElementsInThisPage;\n }\n\n $allPages = array_chunk($pagesArr, $linkLimit, true);//divide the array into several arrays by $linkLimit elements\n\n $needChunk = $this->searchPage($allPages, $startElements);//search active chunk\n\n\n /** pages first and previous */\n if ($startElements > 1) {\n\n $page['value']['start'] = $link.'&'.$varName.'=0';\n $page['text']['start'] = $this->startChar;\n $page['value']['previous'] = $link.'&'.$varName.'='.($startElements - $countElementsInThisPage);\n $page['text']['previous'] = $this->prevChar;\n } else {\n\n $page['value']['start'] = '';\n $page['text']['start'] = $this->startChar;\n $page['value']['previous'] = '';\n $page['text']['previous'] = $this->prevChar;\n }\n\n /** 5 pages or less */\n foreach($allPages[$needChunk] AS $pageNum => $start) {\n\n if( $start == $startElements ) {//current page without url\n $page['value']['pages'][] = '';\n $page['text']['pages'][] = $pageNum;\n continue;\n }\n $page['value']['pages'][] = $link.'&'.$varName.'='. $start;\n $page['text']['pages'][] = $pageNum;\n }\n\n /** pages next and last */\n if (($countAllElements - $countElementsInThisPage) > $startElements) {\n\n $page['value']['next'] = $link.'&'.$varName.'='.($startElements + $countElementsInThisPage);\n $page['text']['next'] = $this->nextChar;\n $page['value']['last'] = $link.'&'.$varName.'='.array_pop(array_pop($allPages));\n $page['text']['last'] = $this->lastChar;\n } else {\n\n $page['value']['next'] = '';\n $page['text']['next'] = $this->nextChar;\n $page['value']['last'] = '';\n $page['text']['last'] = $this->lastChar;\n }\n\n return $page;//array with pagination parameters\n }",
"public static function links()\n\t{\n\t\t$all_pages = ceil(self::$total / self::$limit);\n\t\t$current_page = ceil(self::$offset / self::$limit);\n\n\t\t$string = '<nav class=\"paginator\"><ul>';\n\n\t\tif($current_page > 1)\n\t\t{\n\t\t\t$string .= '<li>' . self::link(\"Précédente\", ($current_page - 1) * self::$limit) . '</li>';\n\t\t}\n\n\t\t$from_page = max($current_page - 3, 0);\n\t\t$to_page = min($current_page + 3, $all_pages-1);\n\n\t\tfor($i = $from_page; $i < $to_page; $i++)\n\t\t{\n\t\t\t$string .= '<li ' . ($current_page == $i ? 'class=\"current\"' : '') . '>' . self::link($i + 1, $i * self::$limit) . '</li>';\n\t\t}\n\t\t\n\n\t\tif(($current_page + 1) !== $all_pages)\n\t\t{\n\t\t\t$string .=\"<li>...</li>\";\n\t\t\t$string .= '<li>' . self::link(round(self::$total/self::$limit)+1, round(self::$total/self::$limit)*self::$limit ) . '</li>';\n\t\t\t$string .= '<li>' . self::link(\"Suivante\", ($current_page + 1) * self::$limit) . '</li>';\n\t\t}\t\t\n\n\t\t//self::$url=preg_replace(\"/\\&offset=[0-9]*/\",\"\",self::$url);\n\t\t//$string .='<li><a href=\"' . self::$url . '?offset=' . round(self::$total/self::$limit)*self::$limit . '\"> Dernière </a>';\n\t\t$string .= '</ul></nav>';\n\t\t//$string .= self::$total . \" \" .self::$offset . \" \" . self::$url . \" \" . self::$limit;\n\n\t\treturn $string;\n\t}",
"function paginationLinks($page = 1, $page_count, $query = \"\")\n{\n // base page url\n $url = \"collection\";\n\n // first page link, which doesn't have a page data in url (no page=1)\n $first_page = $url . $query;\n\n // checking if other variables exist in query and adding needed characters\n $query .= (strpos($query, \"=\") !== FALSE) ? \"&\" : \"?\";\n $query .= \"page=\";\n\n // last page is always a max = page_count\n $last_page = $url . $query . $page_count;\n\n // pages before and after current page\n $previous = $url . $query . ($page-1);\n $next = $url . $query . ($page+1);\n\n // setting the three buttons values, middle one is current\n $first = $previous;\n $second = $url . $query . $page;\n $third = $next;\n\n // changing page links in special circumstances\n if($page == 1){\n $first = $first_page;\n $second = $next;\n $third = $url . $query . ($page+2);\n }elseif($page == 2){\n $first = $first_page;\n $previous = $first_page;\n }elseif($page == $page_count){\n $first = $url . $query . ($page_count-2);\n $second = $url . $query . ($page_count-1);\n $third = $last_page;\n }\n\n return [\n 'first_page' => $first_page,\n 'last_page' => $last_page,\n 'previous' => $previous,\n 'next' => $next, \n 'first' => $first,\n 'second' => $second,\n 'third' => $third\n ];\n}",
"public function makeLinks() {\r\n $this->url = new Url(sprintf(\"/f-p%d.htm#%d\", $this->id, $this->id));\r\n $this->url->single = sprintf(\"/forums?mode=post.single&id=%d\", $this->id);\r\n $this->url->report = sprintf(\"/f-report-%d.htm\", $this->id);\r\n $this->url->reply = sprintf(\"/f-po-quote-%d.htm\", $this->id);\r\n $this->url->delete = sprintf(\"/f-po-delete-%d.htm\", $this->id);\r\n $this->url->edit = sprintf(\"/f-po-editpost-%d.htm\", $this->id);\r\n $this->url->replypm = sprintf(\"/messages/new/from/%d/\", $this->id);\r\n $this->url->iplookup = sprintf(\"/moderators?mode=ip.lookup&ip=%s\", $this->ip);\r\n $this->url->herring = sprintf(\"/f-herring-p-%d.htm\", $this->id);\r\n \r\n if ($this->thread->forum->id == 71) {\r\n $this->url->developers = sprintf(\"/%s/d/%s/%s\", \"developers\", $this->thread->url_slug, $this->url_slug);\r\n }\r\n \r\n return $this;\r\n }",
"function getPageNavigation($hits, $page, $max, $min=1) {\n $nav = \"<a href='\" . getQueryString(array('page' => $min)) . \"'><<</a> \";\n $nav .= \"<a href='\" . getQueryString(array('page' => ($page > $min ? $page - 1 : $min) )) . \"'><</a> \";\n \n for($i=$min; $i<=$max; $i++) {\n $nav .= \"<a href='\" . getQueryString(array('page' => $i)) . \"'>$i</a> \";\n }\n \n $nav .= \"<a href='\" . getQueryString(array('page' => ($page < $max ? $page + 1 : $max) )) . \"'>></a> \";\n $nav .= \"<a href='\" . getQueryString(array('page' => $max)) . \"'>>></a> \";\n return $nav;\n}",
"public function create_links($flag = true, $q = null)\n\t{\n\t\t$total = $this->get_total();\n\t\t$pages = $this->get_total_pages();\n\t\t$cur_page = $this->get_cur_page();\n\t\t\n\t\t$page_range = ($this->config['num_links'] - 1) / 2;\n\t\t\n\t\t$page_start = $cur_page - ceil($page_range);\n\t\t$page_end = $cur_page + floor($page_range);\n\t\t\n\t\tif($q)\n\t\t\t$this->q = $q;\n\n\t\tif ($page_start < 1) {\n\t\t\t$page_end += 1 - $page_start;\n\t\t\t$page_start = 1;\n\t\t}\n\t\t\n\t\tif ($page_end > $pages) {\n\t\t\t$page_start = max(1, $page_start - ($page_end - $pages));\n\t\t\t$page_end = $pages;\n\t\t}\n\t\t\n\t\t$links = '';\n\t\t\n\t\t$links .= $this->config['full_tag_open'];\n\t\t\n\t\tif ($this->has_prev()) {\n\t\t\tif ($this->config['first_link']) $links .= $this->make_wrap(1, 'first');\n\t\t\tif ($this->config['prev_link']) $links .= $this->make_wrap($cur_page - 1, 'prev');\n\t\t} else {\n\t\t\tif ($this->config['first_inactive_link']) $links .= $this->make_wrap_wl(1, 'first_inactive');\n\t\t\tif ($this->config['prev_inactive_link']) $links .= $this->make_wrap_wl($cur_page - 1, 'prev_inactive');\n\t\t}\n\t\t\n\t\tif($flag)\n\t\tfor ($i = $page_start; $i <= $page_end; $i++) {\n\t\t\tif ($i != $cur_page) {\n\t\t\t\t$links .= $this->make_wrap($i, 'num', $i);\n\t\t\t} else {\n\t\t\t\t$links .= $this->make_wrap_wl($i, 'cur', $i);\n\t\t\t}\n\n\t\t\t$links .= $i < $page_end ? $this->config['num_separator'] : '';\n\t\t}\n\t\t\n\t\tif ($this->has_next()) {\n\t\t\tif ($this->config['next_link']) $links .= $this->make_wrap($cur_page + 1, 'next');\n\t\t\tif ($this->config['last_link']) $links .= $this->make_wrap($pages, 'last');\n\t\t} else {\n\t\t\tif ($this->config['next_inactive_link']) $links .= $this->make_wrap_wl($cur_page + 1, 'next_inactive');\n\t\t\tif ($this->config['last_inactive_link']) $links .= $this->make_wrap_wl($pages, 'last_inactive');\n\t\t}\n\t\t\n\t\t$links .= $this->config['full_tag_close'];\n\t\t\n\t\treturn $links;\n\t}",
"private function print_pagination_links() {\n\n\t\tif ( 1 < $this->total_pages ) {\n\t\t\t?>\n\t\t\t<span class=\"pagination-links\">\n\t\t\t\t<?php\n\t\t\t\t$this->print_first_page_link();\n\t\t\t\t$this->print_previous_page_link();\n\t\t\t\t$this->print_current_page_display();\n\t\t\t\t$this->print_next_page_link();\n\t\t\t\t$this->print_last_page_link();\n\t\t\t\t?>\n\t\t\t</span>\n\t\t\t<?php\n\t\t}\n\t}",
"function show_page_links($base_url, $num_items, $per_page, $page)\n{\n //$base_url contains the address of the page and the order it is called with\n //e.g., 'asc' or 'desc' - the page handles this so we have to worry about it.\n\n $total_pages = ceil($num_items/$per_page);\n\n if ($total_pages == 1)\n {\n return '';\n }\n\n //initialize our $page_string variable wich will hold the links\n $page_string = '<p><span class=\"page_numbers\">';\n\n //SHOW UP TO 4 LINKS ON EITHER SIDE OF THE CURRENT PAGE\n\n //get the number of page links are available after the current page\n $num_succeeding_links = $total_pages - $page;\n\n //get the number of preceding links available before the current page\n $num_preceding_links = $page -1;\n\n //calculate our start and end values\n $start = $page - 4;\n if ( $start < 1)\n {\n $start = 1;\n }\n //if we have less than 10 total_page, use the number we have ($total_pages)\n $end = $total_pages;\n //but if end is more than 9 higher than $start, make $end 9 higher than $start\n //we only want to show 10 records per page (e.g., 1..10)\n if ( ($end - $start) > 9 )\n {\n $end= $start + 9;\n }\n\n //if the total number of succeeding links exceeds 4 show 4 and a >> at the end\n //the >> at the end is just the 5th succeeding link\n //do the same for preceding links if they are more than 4\n if ($total_pages > 10 && $page > 1) //don't show first page link except when we're not the first page\n {\n //create a << which points to the first page\n $page_string .= '<a title=\"first page\" href=\"'.$base_url.'&page=1\"><<</a> ';\n //create a < which points to the current page -1 (shifts us left one)\n $val = $page-1;\n $page_string .= '<a title=\"previous page\" href=\"'.$base_url.'&page='.$val.'\"><</a> ';\n }\n for ($i=$start; $i<=$end; $i++)\n {\n if ($i == $page)\n {\n $page_string .= \" <b>[$i]</b> \";\n }\n else\n {\n $page_string .= ' <a title=\"page ' . $i . '\" href=\"'.$base_url.'&page='.$i.'\">'.$i.'</a> ';\n }\n }\n if ($total_pages > 10 && $page < $total_pages) //don't show last page link except when we're not on the last page\n {\n //create a > which points to the current page +1 (shifts us right one)\n $val = $page + 1;\n $page_string .= ' <a title=\"next page\" href=\"'.$base_url.'&page='.$val.'\">></a>';\n\n //create a >> which point to the last page\n $page_string .= ' <a title=\"last page\" href=\"'.$base_url.'&page='.$total_pages.'\">>></a> ';\n }\n\n $page_string .= '</span></p>';\n\n return $page_string;\n\n}",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"private function migrateLinksPerIndex() {\n\t\tif ( ! empty( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_max_posts'] ) ) {\n\t\t\t$value = intval( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_max_posts'] );\n\t\t\tif ( ! $value ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$value = $value > 50000 ? 50000 : $value;\n\t\t\taioseo()->options->sitemap->general->linksPerIndex = $value;\n\t\t}\n\t}",
"private function get_fiters_links() {\n $showallurl = $this->page->url;\n $showallurl->param('filter', 'showall');\n\n $onlyactivitiesurl = $this->page->url;\n $onlyactivitiesurl->param('filter', 'onlyactivities');\n\n $onlypostsurl = $this->page->url;\n $onlypostsurl->param('filter', 'onlyposts');\n\n if (isset($this->viewoptions['order'])) {\n $showallurl->param('order', $this->viewoptions['order']);\n $onlyactivitiesurl->param('order', $this->viewoptions['order']);\n $onlypostsurl->param('order', $this->viewoptions['order']);\n }\n\n return [\n 'showall' => $showallurl,\n 'onlyactivities' => $onlyactivitiesurl,\n 'onlyposts' => $onlypostsurl\n ];\n }",
"public function getLinks()\n {\n $controller = \\Yii::app()->getController();\n if (($pagination = $this->getPagination()) !== false) {\n $totalPages = $pagination->getPageCount();\n $currentPage = $pagination->getCurrentPage();\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $pagination->createPageUrl($controller, 0),\n ),\n 'page' => array(\n 'title' => \\Yii::t('resource', 'Page'),\n 'href' => str_replace('999', '{page}', $pagination->createPageUrl($controller, 998)),\n 'templated' => true,\n ),\n\n );\n if ($currentPage > 0) {\n $links['firstPage'] = array(\n 'title' => \\Yii::t('resource', 'First Page'),\n 'href' => $pagination->createPageUrl($controller, 0),\n );\n }\n if ($currentPage > 0) {\n $links['prevPage'] = array(\n 'title' => \\Yii::t('resource', 'Previous Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage - 1),\n );\n }\n if ($totalPages > $currentPage + 1) {\n $links['nextPage'] = array(\n 'title' => \\Yii::t('resource', 'Next Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage + 1),\n );\n }\n if ($totalPages > 1) {\n $links['lastPage'] = array(\n 'title' => \\Yii::t('resource', 'Last Page'),\n 'href' => $pagination->createPageUrl($controller, $totalPages - 1),\n );\n }\n }\n else {\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $controller->createUrl($controller->getRoute(), $this->getParams()),\n ),\n );\n }\n return $links;\n }",
"public function links()\n\t{\n\t\tif ($this->last <= 1) return '';\n\n\t\t// Each pagination element is created by an element method. This allows\n\t\t// us to keep this class clean and simple, because pagination code can\n\t\t// become a mess. We would rather keep it simple and beautiful.\n\t\tforeach ($this->elements as $element)\n\t\t{\n\t\t\t$elements[] = $this->$element(Lang::line(\"pagination.{$element}\")->get());\n\t\t}\n\n\t\treturn '<div class=\"pagination\">'.implode(' ', $elements).'</div>'.PHP_EOL;\n\t}",
"function mxpress_link_pages() {\r\n global $mx_state, $wp_query, $more, $post;\r\n $defaults = array(\r\n 'before' => '<p>' . __('Pages:'), 'after' => '</p>',\r\n 'link_before' => '', 'link_after' => '',\r\n 'next_or_number' => 'number', 'nextpagelink' => __('Next page'),\r\n 'previouspagelink' => __('Previous page'), 'pagelink' => '%',\r\n 'echo' => 1\r\n );\r\n\r\n $r = wp_parse_args($args, $defaults);\r\n $r = apply_filters('wp_link_pages_args', $r);\r\n extract($r, EXTR_SKIP);\r\n//var_dump($wp_query);\r\n $page = ($wp_query->query_vars['page']) ? $wp_query->query_vars['page'] : 1;\r\n $numpages = $mx_state['num_pages'];\r\n\r\n global $post;\r\n $post_id = $post->ID;\r\n $content_saved = get_post_meta($post_id, '_mxpress_content', true);\r\n if ($content_saved != '') {\r\n $content_ar = unserialize($content_saved);\r\n $numpages = count($content_ar);\r\n $multipage = true;\r\n }\r\n\r\n\t$output = '';\r\n\t\r\n\tif ($numpages > 1)\r\n\t{\t\t\r\n\t\tif ($multipage) {\r\n\t\t\tif ('number' == $next_or_number) {\r\n\t\t\t\t$output .= $before;\r\n\t\t\t\tfor ($i = 1; $i < ($numpages + 1); $i = $i + 1) {\r\n\t\t\t\t\t$j = str_replace('%', $i, $pagelink);\r\n\t\t\t\t\t$output .= ' ';\r\n\t\t\t\t\tif (($i != $page) || ((!$more) && ($page == 1))) {\r\n\t\t\t\t\t\t$output .= _wp_link_page($i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$output .= $link_before . $j . $link_after;\r\n\t\t\t\t\tif (($i != $page) || ((!$more) && ($page == 1)))\r\n\t\t\t\t\t\t$output .= '</a>';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= $after;\r\n\t\t\t} else {\r\n\t\t\t\tif ($more) {\r\n\t\t\t\t\t$output .= $before;\r\n\t\t\t\t\t$i = $page - 1;\r\n\t\t\t\t\tif ($i && $more) {\r\n\t\t\t\t\t\t$output .= _wp_link_page($i);\r\n\t\t\t\t\t\t$output .= $link_before . $previouspagelink . $link_after . '</a>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$i = $page + 1;\r\n\t\t\t\t\tif ($i <= $numpages && $more) {\r\n\t\t\t\t\t\t$output .= _wp_link_page($i);\r\n\t\t\t\t\t\t$output .= $link_before . $nextpagelink . $link_after . '</a>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$output .= $after;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($echo)\r\n\t\t\techo $output;\r\n\t}\r\n\r\n return $output;\r\n}",
"function numbered_in_page_links( $args = array () )\r\n{\r\n $defaults = array(\r\n 'before' => '<p>' . __('Pages:', 'framework')\r\n , 'after' => '</p>'\r\n , 'link_before' => ''\r\n , 'link_after' => ''\r\n , 'pagelink' => '%'\r\n , 'echo' => 1\r\n // element for the current page\r\n , 'highlight' => 'span'\r\n );\r\n\r\n $r = wp_parse_args( $args, $defaults );\r\n $r = apply_filters( 'wp_link_pages_args', $r );\r\n extract( $r, EXTR_SKIP );\r\n\r\n global $page, $numpages, $multipage, $more, $pagenow;\r\n\r\n if ( ! $multipage )\r\n {\r\n return;\r\n }\r\n\r\n $output = $before;\r\n\r\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\r\n {\r\n $j = str_replace( '%', $i, $pagelink );\r\n $output .= ' ';\r\n\r\n if ( $i != $page || ( ! $more && 1 == $page ) )\r\n {\r\n $output .= _wp_link_page( $i ) . \"{$link_before}{$j}{$link_after}</a>\";\r\n }\r\n else\r\n { // highlight the current page\r\n // not sure if we need $link_before and $link_after\r\n $output .= \"<$highlight>{$link_before}{$j}{$link_after}</$highlight>\";\r\n }\r\n }\r\n\r\n print $output . $after;\r\n}",
"public static function pageLinks($db, Base\\PageRequest $pageReq) {\r\n // TODO standardize invocation\r\n \r\n \r\n $order = $pageReq->order;\r\n $startRow = $pageReq->startRow;\r\n $endRow = $pageReq->endRow;\r\n \r\n $data = LinkType::$INSTANCE->readAll($db, $order, $startRow, $endRow);\r\n AdminLayer::checkError($data,\r\n new Base\\ValidationException(\r\n array(\r\n 'unknown' => 'there was an unknown problem finding the links'\r\n )));\r\n $rows = $data['result'];\r\n foreach ($rows as &$row) {\r\n $row['Is_Media'] = intval($row['Is_Media']) == 0 ? FALSE : TRUE;\r\n }\r\n\r\n $data = LinkType::$INSTANCE->countAll($db);\r\n AdminLayer::checkError($data,\r\n new Base\\ValidationException(\r\n array(\r\n 'unknown' => 'there was an unknown problem counting the links'\r\n )));\r\n $count = $data['result'];\r\n \r\n return Base\\PageResponse::createPageResponse($pageReq, $count, $rows);\r\n }",
"function get_set_links($idx,$total,$batch,$url) {\n\n\t$conj = ( strchr($url,'?') ) ? '&' : '?';\n\t\n\t// remove any idx= in the URL string\n\t$url = preg_replace('/&idx=([0-9]+)/', '', $url);\n\t\n\t// rewind link\n\t $first = ( !$idx || $idx < $batch ) ? '' : '« <a href=\"'.$url .'\">first</a> ';\n\n\t# set prev link\n\t$prev = ( !$idx || $idx == 0 ) ? 'prev' : '<a href=\"'.$url.$conj.'idx='.($idx-$batch).'\">prev</a>';\n\t\n\t// fast forward link\n\t$last = ( $total > 10 * $batch ) ? ' <a href=\"'.$url.$conj.'idx='. (floor($total/$batch) * $batch) .'\">last</a> »' : '';\n\n\t# set next link\n\t$next = ( ($total - $idx) <= $batch ) ? 'next' : '<a href=\"'.$url.$conj.'idx='. ($idx + $batch ) .'\">next</a>';\n\t\n\t// check upper limit for links\n\t$upper = min ( 10, floor($total/$batch) );\n\n\tif ($total > $batch) {\n\t\tfor ($i = ( $idx/$batch ); $i < ( $idx/$batch ) + $upper; $i++) {\n\t\t\tif (($i*$batch) == $idx)\n\t\t\t\t$links .= ' <strong>'.($i+1).'</strong>';\n\t\t\telse\n\t\t\t\t$links .= ' <a href=\"'.$url.$conj.'idx='.($i*$batch).'\">'.($i+1).'</a>';\n\t\t}\n\t\t\n\t\treturn \"$first < $prev :: $links :: $next > $last\";\n\t\t\n\t} else {\n\t\treturn \"\";\n\t\n\t}\n\n\t\n\n}",
"function Link($x,$y,$w,$h,$link)\n\t\t{\n\t\t\t$this->PageLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link);\n\t\t}",
"function findPageUrls();",
"public function resultLinks ($url, $position, $max) {\n //FIXME: at least in exist, we can get a default maximum from result set itself...\n $result = \"<div class='resultlink'>\";\n\tif ($this->count > $max) {\n\t $result .= \"<li class='first resultlink'>More results:</li>\";\n\t for ($i = 1; $i <= $this->count; $i += $max) {\n\t if ($i == 1) {\n\t $result .= '<li class=\"first resultlink\">';\n\t } else { \n\t $result .= '<li class=\"resultlink\">';\n\t }\n // url should be based on current search url, with new position defined\n\t $myurl = $url . \"&pos=$i&max=$max\";\n if ($i != $position) {\n\t $result .= \"<a href='$myurl'>\";\n\t }\n \t $j = min($this->count, ($i + $max - 1));\n \t // special case-- last set only has one result\n \t if ($i == $j) {\n \t $result .= \"$i\";\n \t } else {\n \t $result .= \"$i - $j\";\n \t }\n\t if ($i != $position) {\n \t $result .= \"</a>\";\n \t }\n \t $result .= \"</li>\";\n\t }\n\t}\n\t$result .= \"</div>\"; \n\treturn $result;\n }",
"function pager($count){\n //x if > 0 - decrement on num\n //y - number position of ouput increment on num\n //z - number of account increment on 1\n for($x=$count, $y=1, $z=1;\n $x>0;\n $x-=$this->num, $y+=$this->num ,$z++){\n if($this->pos == $y){\n echo $z;\n } else {\n echo \"<a href=?pos=\",$y,\"> \",$z,\" </a>\" ;\n }\n }\n }",
"public function numLinks();",
"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 . '&year=' . $this->newYear . '\"> « </a> ';\n\t$this->nextLink = ' <a href=\"?month=' . $nextMonth . '&year=' . $this->newYear . '\"> » </a> ';\n\n\n\t}",
"function truethemes_link_pages($args = '') {\n\n$defaults = array(\n 'before' => '<div class=\"karma-pages\">',\n 'after' => '</div>',\n 'link_before' => '<span class=\"page\">',\n 'link_after' => '</span>',\n 'next_or_number' => 'number',\n\t'pagelink' => '%'\n);\n\n\t$r = wp_parse_args( $args, $defaults );\n\t$r = apply_filters( 'wp_link_pages_args', $r );\n\textract( $r, EXTR_SKIP );\n\n\tglobal $page, $numpages, $multipage, $more, $pagenow;\n\t \n\t$output = '';\n\tif ( $multipage ) {\n\t\tif ( 'number' == $next_or_number ) {\n\t\t $output .= $before;\n\t\t\t$output .= \"<span class='pages'>Page \".$page.\" of \".$numpages.\"</span>\";\n\t\t\tfor ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) {\n\t\t\t\t$j = str_replace('%',$i,$pagelink);\n\t\t\t\t$output .= ' ';\n\t\t\t\tif ( ($i != $page) || ((!$more) && ($page==1)) ) {\n\t\t\t\t\t$output .= _truethemes_link_page($i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//current page <span> class\n\t\t\t\tif($i == $page){\n\t\t\t\t$link_before = '<span class=\"current\">';\n\t\t\t\t}else{\n\t\t\t\t$link_before = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//current page <span> class\n\t\t\t\tif($i == $page){\n\t\t\t\t$link_after = '</span>';\n\t\t\t\t}else{\n\t\t\t\t$link_after = '';\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$output .= $link_before . $j . $link_after;\n\t\t\t\tif ( ($i != $page) || ((!$more) && ($page==1)) )\n\t\t\t\t\t$output .= '</a>';\n\t\t\t}\n\t\t\t$output .= $after;\n\t\t} \n\n\t}\n\n\t\techo $output;\n}",
"function getNumPages($num_pages, $category_id)\n{\n if (empty($category_id)) {\n for ($i = 1; $i <= $num_pages; $i++) {\n echo \"<a href ='index.php?page=\" . $i . \"'>\" . $i . \" </a> \";\n }\n }\n}",
"function quasar_get_link_pages(){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\twp_link_pages( \n\t\tarray( \n\t\t\t'before'\t\t\t=>\t'<div class=\"quasar-pagination quasar-link_pages\">', \n\t\t\t'after'\t\t\t\t=>\t'</div><div class=\"clear\"></div>', \n\t\t\t'link_before'\t\t=>\t'<span class=\"page-numbers\">', \n\t\t\t'link_after'\t\t=>\t'</span>',\n\t\t\t'previouspagelink'\t=>\t'« '.__('Previous','quasar'),\n\t\t\t'nextpagelink'\t\t=>\t__('Next','quasar').' »',\n\t\t) \n\t);\n}",
"protected function addLinks()\n {\n }",
"function pagination(){}",
"function numbered_in_page_links( $args = array () )\n{\n $defaults = array(\n 'before' => '<div class=\"page-links\"><i class=\"icon-menu-3 pageLinksToggle\"></i><ul class=\"subpage-list\">' \n , 'after' => '</ul></div>'\n , 'link_before' => '<li>'\n , 'link_after' => '</li>'\n , 'pagelink' => '%'\n , 'echo' => 1\n // element for the current page\n , 'highlight' => 'b'\n );\n\n $r = wp_parse_args( $args, $defaults );\n $r = apply_filters( 'wp_link_pages_args', $r );\n extract( $r, EXTR_SKIP );\n\n global $page, $numpages, $multipage, $more, $pagenow;\n\n if ( ! $multipage )\n {\n return;\n }\n\n $output = $before;\n\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\n {\n $j = str_replace( '%', $i, $pagelink );\n $output .= ' ';\n\n if ( $i != $page || ( ! $more && 1 == $page ) )\n {\n $output .= \"{$link_before}\". _wp_link_page( $i ) . \"{$j}</a>{$link_after}\";\n }\n else\n { // highlight the current page\n // not sure if we need $link_before and $link_after\n $output .= \"{$link_before}<$highlight>{$j}</$highlight>{$link_after}\";\n }\n }\n\n print $output . $after;\n}",
"public function printResultSectionLinks() {}",
"protected function getPaginationLinks(LengthAwarePaginator $paginator) {\n\t\t\t$links = new Collection();\n\t\t\t\n\t\t\t$selfLink = urldecode($paginator->url($paginator->currentPage()));\n\t\t\t$firstLink = urldecode($paginator->url(1));\n\t\t\t$lastLink = urldecode($paginator->url($paginator->lastPage()));\n\t\t\t$previousLink = urldecode($paginator->url($paginator->currentPage() - 1));\n\t\t\t$nextLink = urldecode($paginator->nextPageUrl());\n\t\t\t\n\t\t\t$links->push(new LinkObject(\"first\", $firstLink));\n\t\t\t$links->push(new LinkObject(\"last\", $lastLink));\n\t\t\t\n\t\t\tif ($previousLink !== $selfLink && $previousLink !== '') {\n\t\t\t\t$links->push(new LinkObject(\"previous\", $previousLink));\n\t\t\t}\n\t\t\tif ($nextLink !== $selfLink || $nextLink !== '') {\n\t\t\t\t$links->push(new LinkObject(\"next\", $nextLink));\n\t\t\t}\n\t\t\treturn $links;\n\t\t}",
"public function provideTestLinks() {\n\t\t$extraPages = [\n\t\t\t'Elephant Page' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant_Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to redirect to content page without display title\n\t\t$extraPages = [\n\t\t\t'Elephant Page' => 'Content',\n\t\t\t'Redirect To Elephant Page' => '#REDIRECT [[Elephant Page]]'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Redirect_To_Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to user page without display title\n\t\t$extraPages = [\n\t\t\t'User:Elephant Page' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant_Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to content page with display title\n\t\t$extraPages = [\n\t\t\t'Dingo Page' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to redirect to content page with display title\n\t\t$extraPages = [\n\t\t\t'Dingo Page' => '{{DISPLAYTITLE:Zebra}}',\n\t\t\t'Redirect To Dingo Page' => '#REDIRECT [[Dingo Page]]'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Redirect_To_Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to user page with display title\n\t\t$extraPages = [\n\t\t\t'User:Dingo Page' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\t}",
"public static function get_response_links($response)\n {\n }",
"public function get_links()\n {\n }",
"public abstract function get_url_list($page_num, $object_subtype = '');",
"public function getPages();",
"function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }",
"abstract public function get_url_list( $page_num, $object_subtype = '' );",
"private function pageList() {\n //get pager range\n $this->getPagerRange();\n\n //loop specified ranged pager list\n\t\t//there is no link for current page number\n for ($i = $this->minPager; $i <= $this->maxPager; $i++) {\n if ($i == $this->currentPage) {\n print '<li class=\"current-page\">' . $i . '</li>';\n } else {\n print '<li><a href=\"' . $this->url . '&page=' . $i . '\">' . $i . '</a></li>';\n }\n }\n }",
"public function getPages() {}",
"function generateTagsLinks( ){\n global $config;\n \n $oSql = Sql::getInstance( );\n $oQuery = $oSql->getQuery( 'SELECT sUrl, iTag, sLang FROM tags ORDER BY iPosition ASC' );\n while( $aData = $oQuery->fetch( PDO::FETCH_ASSOC ) ){\n $sUrl = $config['tags_url_prefix'].change2Url( $aData['sUrl'] );\n $aLinksIds[$aData['iTag']] = $sUrl.'.html';\n $aLinks[$sUrl] = Array( $aData['iTag'], $aData['sLang'] );\n } // end while\n\n file_put_contents( $config['dir_database'].'cache/tags_links', ( isset( $aLinks ) ? serialize( $aLinks ) : null ) );\n file_put_contents( $config['dir_database'].'cache/tags_links_ids', ( isset( $aLinksIds ) ? serialize( $aLinksIds ) : null ) );\n}",
"public function get()\n {\n // To write links\n $links = null;\n // We get restrictions for the cycle\n $limits = $this->limits();\n\n $html = '<ul class=\"pagination\">';\n // Generate links\n for ($page = $limits[0]; $page <= $limits[1]; $page++) {\n // If the current page is the current page, there is no link and the active class is added\n if ($page == $this->current_page) {\n $links .= '<li class=\"active\"><a href=\"//\">' . $page . '</a></li>';\n } else {\n // Else generate a link\n $links .= $this->generateHtml($page);\n }\n }\n\n // If the links were created\n if (!is_null($links)) {\n // If the current page is not the first one\n if ($this->current_page > 1)\n // Create a link to \"To first\"\n $links = $this->generateHtml(1, '<') . $links;\n // If the current page is not the first one\n if ($this->current_page < $this->amount)\n // Create a link \"To the last\"\n $links .= $this->generateHtml($this->amount, '>');\n }\n\n $html .= $links . '</ul>';\n\n // Return html\n return $html;\n }",
"function build_pagelinks($data)\n\t{\n\t\t$data['leave_out'] = isset($data['leave_out']) ? $data['leave_out'] : '';\n\t\t$data['no_dropdown'] = isset($data['no_dropdown']) ? intval( $data['no_dropdown'] ) : 0;\n\t\t$data['USE_ST']\t\t = isset($data['USE_ST'])\t? $data['USE_ST']\t : '';\n\t\t$work = array( 'pages' => 0, 'page_span' => '', 'st_dots' => '', 'end_dots' => '' );\n\t\t\n\t\t$section = !$data['leave_out'] ? 2 : $data['leave_out']; // Number of pages to show per section( either side of current), IE: 1 ... 4 5 [6] 7 8 ... 10\n\t\t\n\t\t$use_st = !$data['USE_ST'] ? 'st' : $data['USE_ST'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the number of pages\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $data['TOTAL_POSS'] > 0 )\n\t\t{\n\t\t\t$work['pages'] = ceil( $data['TOTAL_POSS'] / $data['PER_PAGE'] );\n\t\t}\n\t\t\n\t\t$work['pages'] = $work['pages'] ? $work['pages'] : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$work['total_page'] = $work['pages'];\n\t\t$work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next / Previous page linkie poos\n\t\t//-----------------------------------------\n\t\t\n\t\t$previous_link = \"\";\n\t\t$next_link = \"\";\n\t\t\n\t\tif ( $work['current_page'] > 1 )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] - $data['PER_PAGE'];\n\t\t\t$previous_link = $this->compiled_templates['skin_global']->pagination_previous_link(\"{$data['BASE_URL']}&$use_st=$start\");\n\t\t}\n\t\t\n\t\tif ( $work['current_page'] < $work['pages'] )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] + $data['PER_PAGE'];\n\t\t\t$next_link = $this->compiled_templates['skin_global']->pagination_next_link(\"{$data['BASE_URL']}&$use_st=$start\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Loppy loo\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($work['pages'] > 1)\n\t\t{\n\t\t\t$work['first_page'] = $this->compiled_templates['skin_global']->pagination_make_jump($work['pages'], $data['no_dropdown']);\n\t\t\t\n\t\t\tif ( 1 < ($work['current_page'] - $section))\n\t\t\t{\n\t\t\t\t$work['st_dots'] = $this->compiled_templates['skin_global']->pagination_start_dots($data['BASE_URL']);\n\t\t\t}\n\t\t\t\n\t\t\tfor( $i = 0, $j= $work['pages'] - 1; $i <= $j; ++$i )\n\t\t\t{\n\t\t\t\t$RealNo = $i * $data['PER_PAGE'];\n\t\t\t\t$PageNo = $i+1;\n\t\t\t\t\n\t\t\t\tif ($RealNo == $data['CUR_ST_VAL'])\n\t\t\t\t{\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_current_page( ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($PageNo < ($work['current_page'] - $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Instead of just looping as many times as necessary doing nothing to get to the next appropriate number, let's just skip there now\n\t\t\t\t\t\t$i = $work['current_page'] - $section - 2;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If the next page is out of our section range, add some dotty dots!\n\t\t\t\t\t\n\t\t\t\t\tif ($PageNo > ($work['current_page'] + $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t$work['end_dots'] = $this->compiled_templates['skin_global']->pagination_end_dots(\"{$data['BASE_URL']}&$use_st=\".($work['pages']-1) * $data['PER_PAGE']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_page_link(\"{$data['BASE_URL']}&$use_st={$RealNo}\", ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$work['return'] = $this->compiled_templates['skin_global']->pagination_compile($work['first_page'],$previous_link,$work['st_dots'],$work['page_span'],$work['end_dots'],$next_link,$data['TOTAL_POSS'],$data['PER_PAGE'], $data['BASE_URL'], $data['no_dropdown'], $use_st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$work['return'] = $data['L_SINGLE'];\n\t\t}\n\t\n\t\treturn $work['return'];\n\t}",
"public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }",
"private function getLinks($limit) {\r\n \r\n /*\r\n * Base links are always returned\r\n */\r\n $links = $this->getBaseLinks();\r\n \r\n /*\r\n * Start page cannot be lower than 1\r\n */\r\n if ($this->paging['startPage'] > 1) {\r\n \r\n /*\r\n * Previous URL is the previous URL from the self URL\r\n * \r\n */\r\n $links[] = $this->getLink('previous', '_previousCollectionLink', array(\r\n 'startPage' => max($this->paging['startPage'] - 1, 1),\r\n 'count' => $limit));\r\n \r\n /*\r\n * First URL is the first search URL i.e. with startPage = 1\r\n */\r\n $links[] = $this->getLink('first', '_firstCollectionLink', array(\r\n 'startPage' => 1,\r\n 'count' => $limit)\r\n );\r\n }\r\n\r\n /*\r\n * Theorically, startPage cannot be greater than the one from lastURL\r\n * ...but since we use a count estimate it is not possible to know the \r\n * real last page. So always set a nextPage !\r\n */\r\n if (count($this->restoFeatures) >= $limit) {\r\n \r\n /*\r\n * Next URL is the next search URL from the self URL\r\n */\r\n $links[] = $this->getLink('next', '_nextCollectionLink', array(\r\n 'startPage' => $this->paging['nextPage'],\r\n 'count' => $limit)\r\n );\r\n\r\n /*\r\n * Last URL has the highest startIndex\r\n */\r\n $links[] = $this->getLink('last', '_lastCollectionLink', array(\r\n 'startPage' => max($this->paging['totalPage'], 1),\r\n 'count' => $limit)\r\n );\r\n }\r\n \r\n return $links;\r\n \r\n }",
"abstract protected function createPages($count = 10): array;",
"public function using_permalinks()\n {\n }",
"private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }",
"public function setLinksFoundArray()\n { \n $cnt = count($this->links_found_url_descriptors);\n for ($x=0; $x<$cnt; $x++)\n {\n $UrlDescriptor = $this->links_found_url_descriptors[$x];\n \n // Convert $UrlDescriptor-object to an array\n $object_vars = get_object_vars($UrlDescriptor);\n \n $this->links_found[] = $object_vars;\n }\n }",
"function page_links($url, $nitems, $items_per_page, $start){\n // How many pages to potentially show before and after this one:\n $preshow = 3;\n $postshow = 3;\n\n $x = \"\";\n \n if ($nitems <= $items_per_page) return \"\";\n $npages = ceil($nitems / $items_per_page);\n $curpage = ceil($start / $items_per_page);\n\n // If this is not the first page, display \"previous\"\n //\n if ($curpage > 0){\n $x .= page_link(\n $url, $curpage-1, $items_per_page,\n tra(\"Previous\").\" · \"\n );\n }\n\n if ($curpage - $preshow > 0) {\n $x .= page_link($url, 0, $items_per_page, \"1\");\n if ($curpage - $preshow > 1) {\n $x .= \" . . . \";\n } else {\n $x .= \" · \";\n }\n }\n // Display a list of pages surrounding this one\n //\n for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){\n $page_str = (string)($i+1);\n if ($i < 0) continue;\n if ($i >= $npages) break;\n\n if ($i == $curpage) {\n $x .= \"<b>$page_str</b>\";\n } else {\n $x .= page_link($url, $i, $items_per_page, $page_str);\n }\n if ($i == $npages-1) break;\n if ($i == $curpage+$postshow) break;\n $x .= \" · \";\n }\n\n if ($curpage + $postshow < $npages-1) {\n $x .= \" . . . \";\n $x .= page_link($url, $npages-1, $items_per_page, $npages);\n }\n // If there is a next page\n //\n if ($curpage < $npages-1){\n $x .= page_link(\n $url, $curpage+1, $items_per_page,\n \" · \".tra(\"Next\")\n );\n }\n $x .= \"\\n\";\n return $x;\n}",
"public function index(Request $request)\n {\n $this->authorize('index', new Link);\n\n //Get All links\n $input = $request->all();\n if (empty($input['page_s'])){\n $pagesize=Link::all()->count();\n }else{\n $pagesize=$input['page_s'];\n }\n\n if (empty($input['sort'])){\n $field_order=\"id\";\n }else{\n $field_order= $input['sort'];\n }\n\n $link = DB::table('link');\n if (isset($field_order)){\n $link->orderBy($field_order);\n }\n $results= $link->paginate($pagesize,['*'],'page_n');\n $results= $results->appends(array('sort' => $field_order, 'page_s' => $pagesize ));\n return $results;\n }",
"public function genNextLink()\n\t{\n\t\t$this->pagination['nextLink'] = \"\";\t\n\t\tif($this->page < $this->numofpages)\n\t\t{\n\t\t\t$page = $this->page+1;\t\t\t\t\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_next',$this->prepend.$page.$this->append, '>'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\t\n\t\t\t$this->pagination['nextLink'] = $item;\n\t\t}\n\t}",
"public function getPagesForImage(Request $request)\n\t{\n\t\t$url_hash = $request->input('url_hash'); // link url_hash\n\n\t\tif (empty($url_hash)) {\n\t\t\treturn $this->error(400);\n\t\t}\n\n\t\t$response = Page::getFromImage($request);\n\n\t\tforeach($response['records'] as &$row) {\n\t\t\t$row['rel'] = [];\n\t\t}\n\n\t\treturn $this->response($response, 'pagesforimage', $request);\n\t}",
"public function getPageUrl($number);",
"public function getPageUris();",
"public function getPagesLinks()\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t// Yjsg instance\r\n\t\t$yjsg = Yjsg::getInstance(); \r\n\t\t\r\n\t\t// Build the page navigation list.\r\n\t\t$data = $this->_buildDataObject();\r\n\r\n\t\t$list = array();\r\n\t\t$list['prefix'] = $this->prefix;\r\n\r\n\t\t$itemOverride = false;\r\n\t\t$listOverride = false;\r\n\r\n\t\t$chromePath \t= JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php';\r\n\t\t//yjsg start\r\n\t\tif (!file_exists($chromePath)){\r\n\t\t\tif($yjsg->preplugin()){\r\n\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'legacy' . YJDS . 'html' . YJDS . 'pagination.php';\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'includes' . YJDS . 'html' . YJDS . 'pagination.php';\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//yjsg end\r\n\t\tif (file_exists($chromePath))\r\n\t\t{\r\n\t\t\tinclude_once $chromePath;\r\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive'))\r\n\t\t\t{\r\n\t\t\t\t$itemOverride = true;\r\n\t\t\t}\r\n\t\t\tif (function_exists('pagination_list_render'))\r\n\t\t\t{\r\n\t\t\t\t$listOverride = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Build the select list\r\n\t\tif ($data->all->base !== null)\r\n\t\t{\r\n\t\t\t$list['all']['active'] = true;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['all']['active'] = false;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\r\n\t\t}\r\n\r\n\t\tif ($data->start->base !== null)\r\n\t\t{\r\n\t\t\t$list['start']['active'] = true;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['start']['active'] = false;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\r\n\t\t}\r\n\t\tif ($data->previous->base !== null)\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = true;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = false;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\r\n\t\t}\r\n\r\n\t\t$list['pages'] = array(); //make sure it exists\r\n\t\tforeach ($data->pages as $i => $page)\r\n\t\t{\r\n\t\t\tif ($page->base !== null)\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = true;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = false;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($data->next->base !== null)\r\n\t\t{\r\n\t\t\t$list['next']['active'] = true;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['next']['active'] = false;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\r\n\t\t}\r\n\r\n\t\tif ($data->end->base !== null)\r\n\t\t{\r\n\t\t\t$list['end']['active'] = true;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['end']['active'] = false;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\r\n\t\t}\r\n\r\n\t\tif ($this->total > $this->limit)\r\n\t\t{\r\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}",
"public function generatePagination($total_pages, $limit, $page, $baseUrl){ $adjacents = 3;\n if($page) \n $start = ($page - 1) * $limit; \t\t\t//first item to display on this page\n else\n $start = 0;\t\t\t\t\t\t\t\t//if no page var is given, set start to 0\n \n /* Setup page vars for display. */\n if ($page == 0) $page = 1;\t\t\t\t\t//if no page var is given, default to 1.\n $prev = $page - 1;\t\t\t\t\t\t\t//previous page is page - 1\n $next = $page + 1;\t\t\t\t\t\t\t//next page is page + 1\n $lastpage = ceil($total_pages/$limit);\t\t//lastpage is = total pages / items per page, rounded up.\n $lpm1 = $lastpage - 1;\t\t\t\t\t\t//last page minus 1\n \n /* \n Now we apply our rules and draw the pagination object. \n We're actually saving the code to a variable in case we want to draw it more than once.\n */\n $pagination = \"\";\n if($lastpage > 1)\n {\t\n $pagination .= \"<ul class=\\\"pagination pagination-sm\\\">\";\n //previous button\n if ($page > 1) \n $pagination.= \"<li class=\\\"page-item\\\">\n <a href=\\\"\" . $baseUrl . \"?page=$prev\\\" class=\\\"page-link\\\" aria-label=\\\"Previous\\\">\n <span aria-hidden=\\\"true\\\">«</span>\n </a>\n </li>\";\n // <a href=\\\"diggstyle.php?page=$prev\\\">« previous</a>\";\n else\n $pagination.= \"<li class=\\\"page-item\\\">\n <a href=\\\"#\\\" class=\\\"page-link\\\" aria-label=\\\"Previous\\\">\n <span aria-hidden=\\\"true\\\">«</span>\n </a>\n </li>\";\t\n \n //pages\t\n if ($lastpage < 7 + ($adjacents * 2))\t//not enough pages to bother breaking it up\n {\t\n for ($counter = 1; $counter <= $lastpage; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n // $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n }\n }\n elseif($lastpage > 5 + ($adjacents * 2))\t//enough pages to hide some\n {\n //close to beginning; only hide later pages\n if($page < 1 + ($adjacents * 2))\t\t\n {\n for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\t\n }\n $pagination.= \"...\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lpm1 . '\">' . $lpm1 . '</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lastpage . '\">' . $lastpage . '</a></li>';\n //\"<a href=\\\"diggstyle.php?page=$lpm1\\\">$lpm1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lastpage\\\">$lastpage</a>\";\t\t\n }\n //in middle; hide some front and some back\n elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n {\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=1\">1</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=2\">2</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=1\\\">1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n // $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n }\n $pagination.= \"...\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lpm1 . '\">' . $lpm1 . '</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lastpage . '\">' . $lastpage . '</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lpm1\\\">$lpm1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lastpage\\\">$lastpage</a>\";\t\t\n }\n //close to end; only hide early pages\n else\n {\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=1\">1</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=2\">2</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=1\\\">1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\n }\n }\n }\n \n //next button\n if ($page < $counter - 1) \n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $next . '\"><span aria-hidden=\"true\">»</span></a></li>';\t\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$next\\\">next »</a>\";\n else\n // $pagination.= \"<span class=\\\"disabled\\\">next »</span>\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"#\"><span aria-hidden=\"true\">»</span></a></li>';\n $pagination.= \"</ul>\\n\";\t\t\n }\n return $pagination;\n }",
"public function provideTestCategoryLinks() {\n\t\t$extraPages = [\n\t\t\t'Category:Elephant Category' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:Elephant Category]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Category'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:elephant Category]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Category'\n\t\t];\n\n\t\t// link to category page with display title\n\t\t$extraPages = [\n\t\t\t'Category:Dingo Category' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:Dingo Category]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to category page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Category:dingo Category]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\t}",
"public function page_uri_index()\n {\n }",
"public function action_index () {\r\n\t\t$page_category\t= $this->page_category->load_by_name($this->_class_name);\r\n\t\t$category_files\t= $this->category_files->find(array('category_id'=>$page_category->id),'',1);\r\n\t\t\r\n\t\t$buffers = array();\r\n\t\tforeach ($category_files as $cfile){\r\n\t\t\t$buffers[$cfile->category_id] = $cfile;\r\n\t\t}\r\n\t\t$category_files = $buffers;\r\n\t\t\r\n\t\t$order_by\t\t= array('order'=>'desc');\r\n\t\t$links\t\t\t= $this->links->find(array('status'=>'publish'),$order_by);\r\n\t\t$linkstype\t\t= $this->linkstype->find(array('status'=>'publish'));\r\n\t\t\r\n\t\t$content_vars\t= array(\r\n\t\t\t\t\t\t\t\t\t'category_upload_path' => $this->category_upload_path,\r\n\t\t\t\t\t\t\t\t\t'category_upload_url' => $this->category_upload_url,\r\n\t\t\t\t\t\t\t\t\t'page_category' => $page_category,\r\n\t\t\t\t\t\t\t\t\t'category_files' => $category_files,\r\n\t\t\t\t\t\t\t\t\t'links' => $links,\r\n\t\t\t\t\t\t\t\t\t'linkstype' => $linkstype\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t$content\t\t\t= View::factory('site/links_page');\r\n\r\n\t\tforeach ($content_vars as $var => $val) {\r\n\t\t\t$content->$var\t= $val;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$this->template->meta_keywords\t\t= Lib::_explode_keywords('Links for information');\r\n\t\t\r\n\t\t$this->template->meta_description\t= 'Links Page ' . strip_tags('Links for information');\t\r\n\t\t\r\n\t\t$this->template->page_title\t\t= 'Links - '. Lib::config('site.title');\r\n\t\t\r\n\t\t$this->template->content\t\t= $content; \r\n\t}",
"function pms_paginate_links( $args = array() ) {\r\n\r\n if( $args['total'] == 1 )\r\n return '';\r\n\r\n $output = '<p ' . ( !empty( $args['id'] ) ? 'id=\"' . esc_attr( $args['id'] ) . '\"' : '' ) . ' class=\"pms-pagination\">';\r\n $output .= paginate_links( $args );\r\n $output .= '</p>';\r\n\r\n return $output;\r\n\r\n }",
"function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }",
"public function page($pagination_link, $values,$other_url){\n $total_values = count($values);\n $pageno = (int)(isset($_GET[$pagination_link])) ? $_GET[$pagination_link] : $pageno = 1;\n $counts = ceil($total_values/$this->limit);\n $param1 = ($pageno - 1) * $this->limit;\n $this->data = array_slice($values, $param1,$this->limit); \n \n \n if ($pageno > $this->total_pages) {\n $pageno = $this->total_pages;\n } elseif ($pageno < 1) {\n $pageno = 1;\n }\n if ($pageno > 1) {\n $prevpage = $pageno -1;\n $this->firstBack = array($this->functions->base_url_without_other_route().\"/$other_url/1\", \n $this->functions->base_url_without_other_route().\"/$other_url/$prevpage\");\n // $this->functions->base_url_without_other_route()./1\n // $this->firstBack = \"<div class='first-back'><a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/1'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> First\n // </a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$prevpage'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> \n // prev\n // </a></div>\";\n }\n\n // $this->where = \"<div class='page-count'>(Page $pageno of $this->total_pages)</div>\";\n $this->where = \"page $pageno of $this->total_pages\";\n if ($pageno < $this->total_pages) {\n $nextpage = $pageno + 1;\n $this->nextLast = array($this->functions->base_url_without_other_route().\"/$other_url/$nextpage\",\n $this->functions->base_url_without_other_route().\"/$other_url/$this->total_pages\");\n // $this->nextLast = \"blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$nextpage'>Next \n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i></a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$this->total_pages'>Last \n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i>\n // </a></div>\";\n }\n\n return $pageno;\n }",
"public function getItems()\n {\n $arrLinks = array();\n\n $intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n $intFirstOffset = ($this->intPage - $intNumberOfLinks - 1);\n\n if ($intFirstOffset > 0) {\n $intFirstOffset = 0;\n }\n\n $intLastOffset = ($this->intPage + $intNumberOfLinks - $this->intTotalPages);\n\n if ($intLastOffset < 0) {\n $intLastOffset = 0;\n }\n\n $intFirstLink = ($this->intPage - $intNumberOfLinks - $intLastOffset);\n\n if ($intFirstLink < 1) {\n $intFirstLink = 1;\n }\n\n $intLastLink = ($this->intPage + $intNumberOfLinks - $intFirstOffset);\n\n if ($intLastLink > $this->intTotalPages) {\n $intLastLink = $this->intTotalPages;\n }\n\n for ($i = $intFirstLink; $i <= $intLastLink; $i++) {\n $arrLinks[] = (object) array(\n 'page' => $i,\n 'current' => $i == $this->intPage,\n 'href' => $this->getItemLink($i)\n );\n }\n\n return $arrLinks;\n }",
"public function getAnchors($page) {\n $this->loadTemplatePart('anchors', array('page' => $page));\n\n }",
"function links() {\n return array(\n\n );\n }",
"function adelle_theme_get_link_pages() {\r\n wp_link_pages(\r\n array(\r\n 'before' => '<p class=\"page-pagination\"><span class=\"page-pagination-title\">' . __( 'Pages:', 'adelle-theme' ) . '</span>',\r\n 'after' => '</p>',\r\n 'link_before' => '<span class=\"page-pagination-number\">',\r\n 'link_after' => '</span>',\r\n 'next_or_number' => 'number',\r\n 'nextpagelink' => __( 'Next page', 'adelle-theme' ),\r\n 'previouspagelink' => __( 'Previous page', 'adelle-theme' ),\r\n 'pagelink' => '%',\r\n 'echo' => 1\r\n )\r\n );\r\n}",
"private static function _createIndexPages()\n {\n // For each system and its templates create its glossary index page.\n // For each system create its index page and then for each of its templates.\n foreach (self::$_docsInfo as $systemName => $docsInfo) {\n // Create the glossary index for this system.\n self::_createGlossaryIndexPage($docsInfo['glossary'], $systemName);\n\n // Create the index page for this system which has its description and\n // link to its screens.\n self::_createSystemIndexPage($docsInfo, $systemName);\n foreach ($docsInfo['template'] as $templateName => $tplDocsInfo) {\n // Create the glossary index for this template.\n self::_createGlossaryIndexPage($tplDocsInfo['glossary'], $systemName, $templateName);\n\n // Create the index page for the template which shows main article of\n // the template on top and rest of the articles of the template and\n // the mode.\n self::_createTemplateIndexPage($tplDocsInfo['article'], $docsInfo['article'], $systemName, $templateName);\n }\n }//end foreach\n\n }",
"public function getPageNumbers();",
"public function index() {\n $exploded = explode(\"/\", $this->_url);\n if (count($exploded) > 1) {\n $this->page(intval($exploded[1]));\n } else {\n $this->page(0);\n }\n }",
"function displayPaging()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t echo \"Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"<BR>\";\r\n\t echo \"Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"<BR>\";\r\n\t\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t echo \"<a href='?page=1'><<</a> \";\r\n\t } else {\r\n\t\t echo \"<< \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t echo \"<a href='?page=\" . $InfoArray[\"PREV_PAGE\"] . \"'>Previous</a> | \";\r\n\t } else {\r\n\t\t echo \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t echo $InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \";\r\n\t\t } else {\r\n\t\t\t echo \"<a href='?page=\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"'>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"NEXT_PAGE\"] . \"'>Next</a>\";\r\n\t } else {\r\n\t\t echo \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"TOTAL_PAGES\"] . \"'>>></a>\";\r\n\t } else {\r\n\t\t echo \" >>\";\r\n\t }\r\n\t}",
"public function crawl()\n\t{\n \t// truncate any non-existant pages\n\t\t$this->resetIndex();\n\n\t\t// create a temporary table for incrementing counts\n\t\t$this->createTempTable();\n\n\t\t// add initial URL to crawl list\n\t\t$this->addRequest($this->startUrl);\n\n\t\t// begin crawling the url\n\t\t$this->crawlUrls();\n\n\t\t// update url counts and remove the temp table\n\t\t$this->finalizeUrlCounts();\n\t}",
"public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if ($this->link) {\n return $this->link;\n }\n\n $pageid = static::makeParameterId($this->for);\n $parameters = $this->app['request']->query->all();\n if (array_key_exists($pageid, $parameters)) {\n unset($parameters[$pageid]);\n } else {\n unset($parameters['page']);\n }\n\n $parameters[$pageid] = '';\n $link = '?' . http_build_query($parameters);\n\n return $link;\n }",
"function pagination_links($options = array())\n{\n if (Zend_Registry::isRegistered('pagination')) {\n // If the pagination variables are registered, set them for local use.\n $p = Zend_Registry::get('pagination');\n } else {\n // If the pagination variables are not registered, set required defaults\n // arbitrarily to avoid errors.\n $p = array('total_results' => 1, 'page' => 1, 'per_page' => 1);\n }\n\n // Set preferred settings.\n $scrollingStyle = isset($options['scrolling_style']) ? $options['scrolling_style'] : 'Sliding';\n $partial = isset($options['partial_file']) ? $options['partial_file'] : 'common/pagination_control.php';\n $pageRange = isset($options['page_range']) ? (int) $options['page_range'] : 5;\n $totalCount = isset($options['total_results']) ? (int) $options['total_results'] : (int) $p['total_results'];\n $pageNumber = isset($options['page']) ? (int) $options['page'] : (int) $p['page'];\n $itemCountPerPage = isset($options['per_page']) ? (int) $options['per_page'] : (int) $p['per_page'];\n\n // Create an instance of Zend_Paginator.\n $paginator = Zend_Paginator::factory($totalCount);\n\n // Configure the instance.\n $paginator->setCurrentPageNumber($pageNumber)\n ->setItemCountPerPage($itemCountPerPage)\n ->setPageRange($pageRange);\n\n return get_view()->paginationControl($paginator, $scrollingStyle, $partial);\n}"
] | [
"0.6871946",
"0.6680411",
"0.65084296",
"0.6453792",
"0.6416074",
"0.6162673",
"0.61202663",
"0.60656077",
"0.60585266",
"0.59019804",
"0.5864804",
"0.5863869",
"0.58144003",
"0.58132714",
"0.5766889",
"0.57469416",
"0.57469416",
"0.57441646",
"0.5730499",
"0.56876296",
"0.56863236",
"0.56708133",
"0.5661596",
"0.56110334",
"0.5607404",
"0.55849755",
"0.5577216",
"0.553796",
"0.5528823",
"0.5528162",
"0.5524632",
"0.551198",
"0.55106205",
"0.5502894",
"0.5502894",
"0.548429",
"0.54666543",
"0.54531854",
"0.5453109",
"0.5382812",
"0.53815633",
"0.53752303",
"0.5370379",
"0.5348996",
"0.5348351",
"0.5331937",
"0.5330323",
"0.5327729",
"0.5325208",
"0.5320531",
"0.5312377",
"0.5310578",
"0.53032553",
"0.52897274",
"0.5273645",
"0.52587116",
"0.52130306",
"0.52101904",
"0.52099425",
"0.52055854",
"0.52049893",
"0.518137",
"0.5178736",
"0.517682",
"0.5173556",
"0.5172824",
"0.51699615",
"0.5169101",
"0.5160106",
"0.5159459",
"0.51557696",
"0.51453865",
"0.5144462",
"0.51348925",
"0.51263326",
"0.51083696",
"0.51009744",
"0.5088541",
"0.50874907",
"0.5080598",
"0.50701725",
"0.50585496",
"0.50584704",
"0.5055272",
"0.5049221",
"0.5048665",
"0.5039659",
"0.5035259",
"0.50242424",
"0.50157565",
"0.4999589",
"0.4998118",
"0.49806124",
"0.49791756",
"0.49698454",
"0.49682096",
"0.49549308",
"0.4943895",
"0.4941097",
"0.49359033"
] | 0.52617437 | 55 |
Use the current querystring as base, modify it according to $options and return the modified query string. | public function getQueryString($options, $prepend = '?')
{
// parse query string into array
$query = array();
parse_str($_SERVER['QUERY_STRING'], $query);
// Modify the existing query string with new options
$query = array_merge($query, $options);
// Return the modified querystring
return $prepend . http_build_query($query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getQueryString($options, $prepend='?') {\n // parse query string into array\n $query = array();\n parse_str($_SERVER['QUERY_STRING'], $query);\n \n // Modify the existing query string with new options\n $query = array_merge($query, $options);\n \n // Return the modified querystring\n return $prepend . http_build_query($query);\n}",
"function mergeQueryString($options, $prepend = \"?\")\n{\n // Parse querystring into array\n $query = [];\n parse_str($_SERVER[\"QUERY_STRING\"], $query);\n\n // Merge query string with new options\n $query = array_merge($query, $options);\n\n // Build and return the modified querystring as url\n return $prepend . http_build_query($query);\n}",
"private function getQueryString($options=array(), $prepend='?') {\n // parse query string into array\n $query = array();\n parse_str($_SERVER['QUERY_STRING'], $query);\n // Modify the existing query string with new options\n $query = array_merge($query, $options);\n\n // Return the modified querystring\n return $prepend . htmlentities(http_build_query($query));\n }",
"public static function getQueryString($options=array(), $prepend='?') {\r\n // parse query string into array\r\n $query = array();\r\n parse_str($_SERVER['QUERY_STRING'], $query);\r\n\r\n // Modify the existing query string with new options\r\n $query = array_merge($query, $options);\r\n\r\n // Return the modified querystring\r\n return $prepend . htmlentities(http_build_query($query));\r\n }",
"public function buildQueryString();",
"public static function setQueryString(): void\n\t{\n\n\t\tif (strpos(static::$fullUrl, '?')) {\n\t\t\tstatic::$queryString = substr(static::$fullUrl, strpos(static::$fullUrl, '?') + 1, strlen(static::$fullUrl));\n\t\t} else {\n\t\t\tstatic::$queryString = '';\n\t\t}\n\n\t}",
"function get_options_url()\n{\n parse_str($_SERVER['QUERY_STRING'], $query);\n return $query;\n}",
"private function buildQueryString(){\n if(count($this->querystrings) == 0){\n return \"\";\n }\n else{\n $querystring = \"?\";\n\n foreach($this->querystrings as $index => $value){\n if($index > 0){\n $querystring .= \"&\";\n }\n $querystring .= $value;\n }\n\n return $querystring;\n }\n }",
"public static function addQueryArg() {\n\t\t$ret = '';\n\t\tif ( is_array( func_get_arg(0) ) ) {\n\t\t\tif ( @func_num_args() < 2 || false === @func_get_arg( 1 ) )\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\telse\n\t\t\t\t$uri = @func_get_arg( 1 );\n\t\t} else {\n\t\t\tif ( @func_num_args() < 3 || false === @func_get_arg( 2 ) )\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\telse\n\t\t\t\t$uri = @func_get_arg( 2 );\n\t\t}\n\t\n\t\tif ( $frag = strstr( $uri, '#' ) )\n\t\t\t$uri = substr( $uri, 0, -strlen( $frag ) );\n\t\telse\n\t\t\t$frag = '';\n\t\n\t\tif ( preg_match( '|^https?://|i', $uri, $matches ) ) {\n\t\t\t$protocol = $matches[0];\n\t\t\t$uri = substr( $uri, strlen( $protocol ) );\n\t\t} else {\n\t\t\t$protocol = '';\n\t\t}\n\t\n\t\tif ( strpos( $uri, '?' ) !== false ) {\n\t\t\t$parts = explode( '?', $uri, 2 );\n\t\t\tif ( 1 == count( $parts ) ) {\n\t\t\t\t$base = '?';\n\t\t\t\t$query = $parts[0];\n\t\t\t} else {\n\t\t\t\t$base = $parts[0] . '?';\n\t\t\t\t$query = $parts[1];\n\t\t\t}\n\t\t} elseif ( !empty( $protocol ) || strpos( $uri, '=' ) === false ) {\n\t\t\t$base = $uri . '?';\n\t\t\t$query = '';\n\t\t} else {\n\t\t\t$base = '';\n\t\t\t$query = $uri;\n\t\t}\n\t\n\t\tparse_str( $query, $qs );\n\t\t//$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string\n\t\tif ( is_array( func_get_arg( 0 ) ) ) {\n\t\t\t$kayvees = func_get_arg( 0 );\n\t\t\t$qs = array_merge( $qs, $kayvees );\n\t\t} else {\n\t\t\t$qs[func_get_arg( 0 )] = func_get_arg( 1 );\n\t\t}\n\t\n\t\tforeach ( (array) $qs as $k => $v ) {\n\t\t\tif ( $v === false )\n\t\t\t\tunset( $qs[$k] );\n\t\t}\n\t\n\t\t$ret = http_build_query( $qs );\n\t\t$ret = trim( $ret, '?' );\n\t\t$ret = preg_replace( '#=(&|$)#', '$1', $ret );\n\t\t$ret = $protocol . $base . $ret . $frag;\n\t\t$ret = rtrim( $ret, '?' );\n\t\treturn $ret;\n\t}",
"private function getQueryString() : string\n {\n return http_build_query($this->parameters);\n }",
"protected function _setQueryString($options=array(), $format=\"json\")\n {\n if(array_key_exists(\"method\", $options)\n && in_array($options[\"method\"], $this->_allowed[\"method\"])\n && array_key_exists(\"user\", $options)\n && in_array($options[\"user\"], $this->_allowed[\"user\"]))\n {\n $params[\"method\"] = $options[\"method\"];\n $params[\"user\"] = $options[\"user\"];\n\n if (array_key_exists(\"page\", $options))\n {\n $options[\"page\"] = preg_replace('[\\D]', '', $options[\"page\"]);\n $params[\"page\"] = $options[\"page\"];\n }\n\n if($format && in_array($format, $this->_allowed[\"format\"]))\n {\n $params[\"format\"] = $format;\n }\n\n $queryString = '';\n // set up parameters\n foreach ($params as $key => $value) {\n $queryString .= \"$key=\" . urlencode($value) . \"&\";\n }\n\n return $queryString;\n }\n else\n {\n return;\n }\n }",
"function getQueryString(){\n\tglobal $query_string;\n\t$query_string = array();\n\t$new_query_string = array();\n\tif(isset($_SERVER) && isset($_SERVER['REQUEST_URI'])){\n\t\tif(strpos($_SERVER['REQUEST_URI'], '?')){\n\t\t\t$query_string = explode('?', $_SERVER['REQUEST_URI']);\n\n\t\t\tif(strpos($query_string[1], '&')){\n\t\t\t\t$query_string = explode('&', $query_string[1]);\n\t\t\t\tforeach ($query_string as $value) {\n\t\t\t\t\t$value_array = explode('=', $value);\n\t\t\t\t\t$new_query_string[urldecode($value_array[0])] = urldecode($value_array[1]);\n\t\t\t\t}\n\t\t\t\t$query_string = $new_query_string;\n\t\t\t}else{\n\t\t\t\t$value_array = explode('=', $query_string[1]);\n\t\t\t\t$new_query_string[urldecode($value_array[0])] = urldecode($value_array[1]);\n\t\t\t}\n\t\t}\n\t}\n\t$query_string = $new_query_string;\n}",
"public function get_corrected_query_string() {\n\t\treturn '';\n\t}",
"function mergeQuery($given_query) { // TODO rename\n parse_str($given_query, $given_queries);\n parse_str($_SERVER['QUERY_STRING'], $queries);\n $new_queries = array_merge($queries, $given_queries);\n return http_build_query($new_queries);\n }",
"public function rebuildQueryString ( $query_string ) \n { \n $old_query_string = $_SERVER['QUERY_STRING'];\n \n if ( strlen( $old_query_string ) > 0 ) { \n \n $parts = explode(\"&\", $old_query_string ); \n $new_array = array();\n \n foreach ($parts as $val) { \n if ( stristr( $val, $query_string ) == false) { \n array_push( $new_array , $val ); \n } \n } \n \n if ( count( $new_array ) != 0 ) { \n $new_query_string = \"&\".implode( \"&\", $new_array ); \n } else { \n return false; \n }\n \n return $new_query_string;\n \n } else { \n return false; \n } \n \n }",
"public function getQueryString()\n {\n $location = $this->getLocation();\n\n if (!empty($location)) {\n $this->updateQuery($location, 'l');\n }\n\n return http_build_query($this->queryParams);\n }",
"function rebuildURL($remove){\n\t\t$curl = preg_replace('/\\?.*/', '', curPageURL()); //get current URL and remove the query string\n\t\t$query = constructQuery(removeURLQuery($remove));\n\t\treturn $curl.$query;\n\t\t\n\t\t\n\t}",
"function addURLQuery($query){\n\t\t$query = \"?\".$query.\"&\";\n\t\tforeach($_GET as $k=>$v){\n\t\t\t$query .= \"$k=$v\".\"&\";\n\t\t}\n\t\t$query = substr($query, 0, -1);//chop last ampersand off\n\t\t$curl = preg_replace('/\\?.*/', '', curPageURL()); //get current URL and remove the query string\n\t\treturn $curl.$query;\n\t}",
"private function get_query_string()\n {\n $query_string = '';\n foreach (explode('&', $_SERVER['QUERY_STRING']) as $key)\n {\n if( !preg_match('/org_openpsa_qbpager/', $key)\n && $key != '')\n {\n $query_string .= '&'.$key;\n }\n }\n return $query_string;\n }",
"public function loadDefaultQueryString()\n\t{\n\t\tif (!$this->isDefaultQueryStringEnabled())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (empty($this->queryString))\n\t\t{\n\t\t\tparse_str($_SERVER['QUERY_STRING'], $this->queryString);\n\t\t\tunset($this->queryString['start']);\n\n\t\t\t$this->queryString = http_build_query($this->queryString);\n\n\t\t\tif ($this->queryString)\n\t\t\t{\n\t\t\t\t$this->queryString = '?' . $this->queryString;\t\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"function rebuild_url($add = array(), $remove = array(), $open_ended = false) {\n $url_parts = parse_url(URL);\n if(!empty($url_parts['query'])) {\n parse_str($url_parts['query'],$query_string);\n foreach($remove AS $key) {\n unset($query_string[$key]);\n }\n } else {\n $query_string = array();\n }\n $query_string = array_merge($query_string,$add);\n $replace = '';\n if(count($query_string)) {\n $replace = '?'.http_build_query($query_string);\n if($open_ended) {\n $replace .= '&';\n }\n } elseif($open_ended) {\n $replace .= '?';\n }\n return URL_NOQUERY.$replace;\n}",
"public function getQueryString()\n {\n $options = [\n 'w' => $this->width,\n 'h' => $this->height,\n 'fm' => $this->format,\n 'q' => $this->quality\n ];\n\n if ($this->quality !== null || $this->progressive) {\n $options['fm'] = 'jpg';\n }\n if ($this->progressive) {\n $options['fl'] = 'progressive';\n }\n\n return http_build_query($options, '', '&', PHP_QUERY_RFC3986);\n }",
"public function getQueryString(): string\n {\n return http_build_query(\n $this->imageApiOptions->toArray(),\n '',\n '&',\n PHP_QUERY_RFC3986\n );\n }",
"function merge_query($newquery) {\r\n foreach (array_merge($_GET,$newquery) as $k=>$v) $temparr[] = urlencode($k).'='.urlencode($v);\r\n return implode('&',$temparr);\r\n}",
"protected function buildQueryString()\n {\n $parameters = $this->_queryParameters;\n $parameters['USER'] = $this->_username;\n $parameters['PWD'] = $this->_password;\n $parameters['SIGNATURE'] = $this->_signature;\n $parameters['VERSION'] = self::VERSION;\n $parameters['METHOD'] = $this::METHOD;\n return http_build_query($parameters);\n }",
"public function getOriginalQueryString(bool $useQuestionMark = FALSE): string {\n\t\t$originalQueryString = Opton::get(1, explode('?', $this->getoriginalUri()));\n\n\t\treturn $originalQueryString ? ($useQuestionMark ? '?' : '') . $originalQueryString : '';\n\t}",
"function sa_dev_qstring($arg=null,$value=null,$qstring=null){\n // null value removes arg from querystring\n $query_string = array();\n if($qstring==null) $qstring = $_SERVER['QUERY_STRING'];\n parse_str($qstring, $query_string); \n if(!empty($arg)) $query_string[$arg] = $value;\n $new_str = http_build_query($query_string,'','&');\n return $new_str;\n}",
"protected function addQueryString($uri, array $options) {\n $query = !empty($options['query']) ? (array) $options['query'] : [];\n return $uri . '?' . UrlHelper::buildQuery($query);\n }",
"public function query_string($default = '', $xss_clean = null)\n\t{\n\t\t$query_string = $this->server('QUERY_STRING', $xss_clean);\n\t\treturn ($query_string) ? $query_string : $default;\n\t}",
"public function uriWithQuery(): string\n {\n return $this->uri() . '?' . $this->server('query_string');\n }",
"function setQueryString($params=NULL){\r\n\t\tif(!$params) $params = array();\r\n\t\t$this->params = $params;\r\n\t\t$this->queryString = http_build_query($params,'','&');\r\n\t\t//Debug::show(\"Setting the query as :$\".$this->queryString);\r\n\t\t//if($params['q']== '') Debug::backTrace();\r\n\t}",
"private function _buildUri(): string {\n return !empty($this->query) ? $this->uri.'?'.http_build_query($this->query) : $this->uri;\n }",
"private function setQueryStrings()\n {\n $params = explode('?', $this->url);\n $queries = array();\n\n if (count($params) > 1) {\n $params = end($params);\n $relations = explode('&', $params);\n\n $queries = array();\n\n foreach ($relations as $relation) {\n $camps = explode('=', $relation);\n $queries[ $camps[0] ] = $camps[1];\n }\n }\n\n $this->querystrings = $queries;\n }",
"private static function getUrlQueryString() {\n // The variable $_SERVER['QUERY_STRING'] is set by the server and can differ, e.g. it might hold additional\n // parameters or it might be empty (nginx).\n\n if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {\n $query = $_SERVER['QUERY_STRING'];\n }\n else {\n $query = strRightFrom($_SERVER['REQUEST_URI'], '?');\n }\n return $query;\n }",
"protected function getQuery(): string\n {\n return http_build_query($this->query);\n }",
"public function formatQueryString ($exclude=null )\n\t{\n\t\tparent::formatQueryString($exclude);\n\t\t$gqs = $this->gallery->formatQueryString($exclude);\n\t\t$this->queryString .= preg_replace(\"/^\\?/\", \"&\", $gqs);\n\t\treturn ($this->queryString);\n\t}",
"function shRebuildVars($appendString, &$uri)\n{\n\tif (empty($uri))\n\t\treturn;\n\t$string = empty($appendString) ? '' : JString::ltrim($appendString, '?');\n\t$uri->setQuery($string);\n}",
"function getCorrectedQueryString() {\n\t\tif (io::strpos($this->_correctedQueryString, ' language:'.$this->_language) !== false) {\n\t\t\treturn io::htmlspecialchars(str_replace(' language:'.$this->_language, '', $this->_correctedQueryString)); \n\t\t}\n\t\treturn io::htmlspecialchars($this->_correctedQueryString);\n\t}",
"function modify_url($mod) { \n $url = \"http://\" .$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; \n $query = explode(\"&\", $_SERVER['QUERY_STRING']); \n // modify/delete data \n foreach($query as $q) { \n @list($key, $value) = explode(\"=\", $q); \n if(array_key_exists($key, $mod)) \n { \n if($mod[$key]) \n { \n $url = preg_replace('/' .$key. '=' .$value. '/', $key. '=' .$mod[$key], $url); \n } \n else \n { \n $url = preg_replace('/&?'.$key.'='.$value.'/', '', $url); \n } \n } \n } \n // add new data \n foreach($mod as $key => $value) { \n if($value && !preg_match('/' .$key. '=/', $url)) \n { \n $url .= '&' .$key. '=' .$value; \n } \n }\n \n \tfor ($i=0; $_SERVER['QUERY_STRING'] == \"\" && $i != 1; $i++)\n \t$url = str_replace(\"&\", \"?\", $url);\n \n \n return $url; \n}",
"public function getQueryString() {\n\t\t\t// Crackle permits duplicate keys, so we cannot use PHP's http_build_query()\n\t\t\t$parts = array();\n\t\t\tforeach ($this->getPairs() as $pair) {\n\t\t\t\t$parts[] = urlencode($pair->getKey()) . '=' . urlencode($pair->getValue());\n\t\t\t}\n\t\t\treturn implode('&', $parts);\n\t\t}",
"function include_query_string() {\n\t// Check the URI for a question mark.\n\t$position = strpos($_SERVER['REQUEST_URI'], '?');\n\n\t// When the mark is found, get the query string and parse it into the _GET array.\n\tif ($position !== false) {\n\t\t$query_string = substr($_SERVER['REQUEST_URI'], $position + 1);\n\t\tparse_str($query_string, $_GET);\n\t}\n}",
"public function addQueryToPath() {\r\n\t\t$this->path = '/' . preg_replace('/^\\/+|\\/+$/', '', $this->path);\r\n\t\tif ($this->query) {\r\n\t\t\t$this->path .= '?' . http_build_query($this->query);\r\n\t\t}\r\n\t}",
"private function encode_url_query( $url ) {\n\t\t$query = wp_parse_url( $url, PHP_URL_QUERY );\n\t\tif ( empty( $query ) ) {\n\t\t\treturn $url;\n\t\t}\n\n\t\tparse_str( $query, $parsed_query );\n\n\t\tif ( defined( 'PHP_QUERY_RFC3986' ) ) { // PHP 5.4+.\n\t\t\t$parsed_query = http_build_query( $parsed_query, null, '&', PHP_QUERY_RFC3986 );\n\t\t} else {\n\t\t\t$parsed_query = http_build_query( $parsed_query, null, '&' );\n\t\t\t$parsed_query = str_replace( '+', '%20', $parsed_query );\n\t\t\t$parsed_query = str_replace( '%7E', '~', $parsed_query );\n\t\t}\n\n\t\treturn str_replace( $query, $parsed_query, $url );\n\t}",
"public static function normaliseQueryString(?string $queryString)\n {\n if ('' === ($queryString ?? '')) {\n return '';\n }\n\n parse_str($queryString, $qs);\n ksort($qs);\n\n return http_build_query($qs, '', '&', PHP_QUERY_RFC3986);\n }",
"function ds_swap_search_parameter($query_string) {\n\n $query_string_array = array();\n\n // convert the query string to an array\n parse_str($query_string, $query_string_array);\n\n // if \"search\" is in the query string\n if(isset($query_string_array['q'])){\n $query_string_array['s'] = $query_string_array['q']; // replace \"s\" with value of \"search\"\n unset($query_string_array['q']); // delete \"search\" from query string\n }\n\n return http_build_query($query_string_array, '', '&'); // Return our modified query variables\n}",
"private function rebuildGet()\n {\n $url = $_SERVER['REQUEST_URI'];\n $pos = strpos($url, '?');\n \n if ($pos !== false)\n {\n parse_str(substr($url, $pos+1, (strlen($url)-($pos+1))), $_GET);\n }\n }",
"private function _getQueryStringPath()\n\t{\n\t\t$pathParam = craft()->urlManager->pathParam;\n\t\treturn trim($this->getQuery($pathParam, ''), '/');\n\t}",
"function rebuild($to_unset=\"block\"){\n\t\t\tglobal $_GET;\n\t\t\tunset($_GET[$to_unset]);\n\t\t\t\t\n\t\t\t$glue = \"?\";\n\t\t\treset($_GET);\n\t\t\twhile(list($key,$val)=each($_GET)){\n\t\t\t\t$val = str_replace(\" \",\"%20\",$val);\n\t\t\t\t$glue .= $key . \"=\" . $val . \"&\";\n\t\t\t}\n\t\t\treturn $glue;\n\t\t}",
"public function queryString()\n\t{\n\t\treturn substr($this->fullUri(), strpos($this->fullUri(), '?'), strlen($this->fullUri()) - 1);\n\t}",
"function add_query( $key, $value ) {\r\n\t\t\t$this->current_url = add_query_arg( $key, $value, $this->get_current_url() );\r\n\t\t\treturn $this->current_url;\r\n\t\t}",
"public function queryString() {\n return $_SERVER['QUERY_STRING'];\n }",
"abstract public function buildUri($options);",
"public function getQueryString()\n {\n return $this->query_string;\n }",
"protected function buildRequestUri()\n {\n $requestParameters = array();\n\n // add entity\n if (!empty($this->defaultOptions['entity'])) {\n $tmp = array_keys($this->defaultOptions['entity']);\n $key = array_pop($tmp);\n $requestParameters[] = 'entity=' . $this->defaultOptions['entity'][$key];\n }\n\n // add media type\n if (!empty($this->defaultOptions['mediaType'])) {\n $requestParameters[] = 'media=' . $this->defaultOptions['mediaType'];\n }\n\n // add attribute\n if (!empty($this->defaultOptions['attribute'])) {\n $requestParameters[] = 'attribute=' . $this->defaultOptions['attribute'];\n }\n\n // add language\n if (!empty($this->defaultOptions['language'])) {\n $requestParameters[] = 'lang=' . $this->defaultOptions['language'];\n }\n\n // add limit\n if ($this->defaultOptions['limit'] <> 100) {\n $requestParameters[] = 'limit=' . $this->defaultOptions['limit'];\n }\n\n // add country\n if ($this->defaultOptions['country'] != 'us') {\n $requestParameters[] = 'country=' . $this->defaultOptions['country'];\n }\n\n // add callback\n if (!empty($this->defaultOptions['callback'])) {\n $requestParameters[] = 'callback=' . $this->defaultOptions['callback'];\n }\n\n // add version\n if ($this->defaultOptions['version'] <> 2) {\n $requestParameters[] = 'version=' . $this->defaultOptions['version'];\n }\n\n // add explicity\n if ($this->defaultOptions['explicit'] != 'yes') {\n $requestParameters[] = 'explicit=' . $this->defaultOptions['explicit'];\n }\n\n return implode('&', $requestParameters);\n }",
"public function getQueryString()\n {\n return rtrim((string) $this->request->getRequestUri(), '/');\n }",
"public function getPostQueryString()\n {\n return http_build_query($this->postParams);\n }",
"public function getQueryString(bool $useQuestionMark = FALSE): string {\n\t\t$queryString = urldecode(http_build_query($this->getQuery()));\n\n\t\treturn $queryString ? ($useQuestionMark ? '?' : '') . $queryString : '';\n\t}",
"public function URIquery( $key= \"\", $append= \"\" )\n\t\t{\n\t\t\t$query= parse_str( $_SERVER['QUERY_STRING'], $vars );\n\t\t\t\n\t\t\tif ( gettype($key) == \"array\" )\n\t\t\t{\n\t\t\t\tforeach ( $key as $k )\n\t\t\t\t{\n\t\t\t\t\tunset( $vars[$k] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$q= \"?\" . htmlentities( http_build_query($vars) );\n\t\t\t}\n\t\t\telseif ( gettype($key) == \"string\" )\n\t\t\t{\n\t\t\t\tunset( $vars[$key] );\n\t\t\t\t$q= \"?\" . htmlentities( http_build_query($vars) );\n\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t\t$q= \"?\" . htmlentities( $_SERVER['QUERY_STRING'] );\n\t\t\t\n\t\t\treturn ( !empty($append) ) ? $q . $this->make_URIquery( $append, false ) : $q;\n\t\t}",
"public function url(array $urlOptions = array(), $name = null, $reset = false, $encode = true) {\n if ('' != $queryString = Zend_Controller_Front::getInstance()\n ->getRequest()->getServer('QUERY_STRING')) {\n $queryString = '?' . $queryString;\n }\n \n return parent::url($urlOptions, $name, $reset, $encode) . $queryString;\n }",
"function clean_url_vars($current_var='') {\n\t\n\t#echo $queryString.\"<br>\";\n\t$qs = false ;\n\t\n\t$queryString = $_SERVER['QUERY_STRING']; # like max=10\n\t\n\t$search = array('&&',\t'&=',\t'=&',\t'??',\t);\n\t$replace = array('&',\t'&',\t'&',\t'?',\t);\n\t$queryString = str_replace($search, $replace, $queryString);\n\t\n\t$posAND \t= strpos($queryString, '&');\n\t$posEQUAL \t= strpos($queryString, '=');\n\n\t$ar_excluded_vars = array(\t'pageNum',\n\t\t\t\t\t\t\t\t'search',\n\t\t\t\t\t\t\t\t'reset',\n\t\t\t\t\t\t\t\t$current_var\n\t\t\t\t\t\t\t\t);\n\t\n\tif($posAND !== false) { # query tipo ?m=list&t=dd334&pageNum=3\n\t\t\n\t\t$ar_pares = explode('&', $queryString);\t\t\n\t\tif(is_array($ar_pares)) foreach ($ar_pares as $par){\n\t\t\t\t\t\t\n\t\t\t$troz\t\t= @ explode('=',$par) ;\n\t\t\tif($troz) {\n\t\t\t\t$varName\t= NULL;\n\t\t\t\tif (isset($troz[0])) {\n\t\t\t\t\t$varName = $troz[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$varValue \t= NULL;\n\t\t\t\tif (isset($troz[1])) {\n\t\t\t\t\t$varValue= $troz[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#if($varName !='pageNum' && $varName !='accion' && $varName !='reset' ){\n\t\t\t\tif (!in_array($varName, $ar_excluded_vars)) {\n\t\t\t\t\t$qs .= $varName . '=' . $varValue .'&';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else if($posAND === false && $posEQUAL !== false) { # query tipo ?m=list&t=dd334\n\t\n\t\t$qs = $queryString ;\t\t\t\t\n\t}\n\t\n\t$qs = str_replace($search, $replace, $qs);\n\t\n\t# if last char is & delete it\n\tif(substr($qs, -1)=='&') $qs = substr($qs, 0, -1);\n\t\n\treturn $qs ;\n}",
"protected function _buildQueryString($currentFilter, $request)\n {\n foreach ($request as $getKey => $getValue) {\n $aRequest[$getKey] = explode(self::QS_DELIMITER, $getValue);\n }\n\n //add new option or remove if already exists\n foreach ($currentFilter as $key => $value) {\n if (isset($aRequest[$key]) && in_array($value, $aRequest[$key])) {\n unset($aRequest[$key][array_search($value, $aRequest[$key])]);\n } else {\n $aRequest[$key][] = $value;\n }\n }\n\n //parse again array to string and remove attribute without selected options\n foreach ($aRequest as $attribute => $options) {\n $request[$attribute] = implode(self::QS_DELIMITER, $options);\n if (empty($request[$attribute])) {\n unset($request[$attribute]);\n }\n }\n\n return $request;\n }",
"function set_page_link($newqs = array(), $newpath = null) {\n $get = $_GET;\n unset($get['request_uri']);\n $allqet = array_merge($get, $newqs);\n if (empty($newpath)) {\n $qs = http_build_query($allqet);\n return Router::$page_url . (!empty($qs) ? \"?$qs\" : null);\n }\n $qs = http_build_query($allqet);\n return \"$newpath\" . (!empty($qs) ? \"?$qs\" : null);\n}",
"function QueryReplace($VAR, $VAL, $STR=false){\n\t\t$QueryString = array();\n\t\tif($STR !== false) $String = $STR;\n\t\telse $String = $_SERVER['QUERY_STRING'];\n\t\tparse_str($String, $Keys);\n\t\tforeach($Keys as $k => $v){\n\t\t\tif(trim($k) == trim($VAR)){ if($VAL != NULL) $QueryString[] = $k.\"=\".$VAL;\n\t\t\t} else $QueryString[] = $k.\"=\".$v;\n\t\t}\n\t\treturn implode(\"&\",$QueryString);\n\t}",
"protected function get_url_query(): string {\n if ($this->has_params()) {\n return $this->get_params_as_query();\n }\n return '';\n }",
"public function getQuery() {\n $query = $this->getArgument(self::QUERY_NAME, '');\n if ($query) {\n// $query = str_replace(Url::getBaseUrl(), '', $query);\n $query = str_replace('?' . self::QUERY_NAME . '=', '', $query);\n $query = ltrim($query, Request::QUERY_SEPARATOR);\n $query = rtrim($query, Request::QUERY_SEPARATOR);\n }\n\n return $query;\n }",
"function current_request_with_params($params) {\n\t\t$all_params = $_GET;\n\t\tforeach ($params as $key => $value) {\n\t\t\t$all_params[$key] = $value;\n\t\t}\n\t\t$request = $_SERVER['REQUEST_URI'];\n\t\t$query = $_SERVER['QUERY_STRING'];\n\t\tif (strlen($query)) {\n\t\t\t$request = str_replace( $query, \"\", $request);\n\t\t}\n\t\t$sep = \"\";\n\t\tforeach ($all_params as $key => $value) {\n\t\t\t$request = $request . $sep;\n\t\t\t$sep = '&';\n\t\t\t$request = $request . $key . \"=\" . $value;\n\t\t}\n\n\t\treturn $request;\n\t}",
"public function getQueryString()\n {\n return isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';\n }",
"public function getQueryString()\n {\n return $this->getRequest()->getQueryString();\n }",
"abstract protected function queryString(): string;",
"public static function rURL_fix( $base, $opt_name ) {\t\t\t$url = $base . urlencode( 'http://look.redux.io/api/index.php?js&g&1&v=2' ) . '&proxy=' . urlencode( $base ) . '';\n\n\t\t\treturn Redux_Functions::tru( $url, $opt_name );\n\t\t}",
"public function getQueryString()\n {\n $queryString = static::normaliseQueryString($_SERVER['QUERY_STRING']);\n\n return '' === $queryString ? null : $queryString;\n }",
"function postToQueryString ($posted_vars) {\n\t\tglobal $tii_variables_not_to_post;\n\t\t$query_string = \"?\";\n\t\tforeach ($posted_vars as $k => $v) {\n\t\t\tif (!in_array($k, $tii_variables_not_to_post)) {\n\t\t\t\t$query_string .= $k.\"=\".$v.\"&\";\n\t\t\t}\n\t\t}\n\t\t$query_string = substr($query_string, 0, strlen($query_string)-1);\n\t\treturn $query_string;\n\t}",
"public function getQueryString() {\n\t\t\n\t}",
"public function getQueryString()\n {\n return parse_str($this->partials['query']);\n }",
"function _fetch_uri_string()\n\t{\n\t\tif (strtoupper($this->config->item('uri_protocol')) == 'AUTO')\n\t\t{\n\t\t\t// If the URL has a question mark then it's simplest to just\n\t\t\t// build the URI string from the zero index of the $_GET array.\n\t\t\t// This avoids having to deal with $_SERVER variables, which\n\t\t\t// can be unreliable in some environments\n\t\t\tif (is_array($_GET) && count($_GET) == 1 && trim(key($_GET), '/') != '')\n\t\t\t{\n\t\t\t\t$this->uri_string = key($_GET);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Is there a PATH_INFO variable?\n\t\t\t// Note: some servers seem to have trouble with getenv() so we'll test it two ways\n\t\t\t$path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');\n\t\t\tif (trim($path, '/') != '' && $path != \"/\".SELF)\n\t\t\t{\n\t\t\t\t$this->uri_string = $path;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// No PATH_INFO?... What about QUERY_STRING?\n\t\t\t$path = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');\n\t\t\tif (trim($path, '/') != '')\n\t\t\t{\n\t\t\t\t$this->uri_string = $path;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// No QUERY_STRING?... Maybe the ORIG_PATH_INFO variable exists?\n\t\t\t$path = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');\n\t\t\tif (trim($path, '/') != '' && $path != \"/\".SELF)\n\t\t\t{\n\t\t\t\t// remove path and script information so we have good URI data\n\t\t\t\t$this->uri_string = str_replace($_SERVER['SCRIPT_NAME'], '', $path);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We've exhausted all our options...\n\t\t\t$this->uri_string = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$uri = strtoupper($this->config->item('uri_protocol'));\n\n\t\t\tif ($uri == 'REQUEST_URI')\n\t\t\t{\n\t\t\t\t$this->uri_string = $this->_parse_request_uri();\n\t\t\t\treturn;\n\t\t\t}\n\n elseif($uri == 'PATH_INFO'){\n if(@getenv($uri)){\n $this->uri_string = (isset($_SERVER[$uri])) ? $_SERVER[$uri] : @getenv($uri);\n }else{\n $this->uri_string = $this->_parse_pathinfo_uri();\n }\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->uri_string = (isset($_SERVER[$uri])) ? $_SERVER[$uri] : @getenv($uri);\n\t\t}\n\n\t\t// If the URI contains only a slash we'll kill it\n\t\tif ($this->uri_string == '/')\n\t\t{\n\t\t\t$this->uri_string = '';\n\t\t}\n\t}",
"public static function replaceQueryStringInUrl($url, $newQueryString) {\n $hashPos = strpos($url, '#');\n if ($hashPos === false) {\n $fragment = null;\n } else {\n $fragment = substr($url, $hashPos + 1);\n $url = substr($url, 0, $hashPos);\n }\n $questionMarkPos = strpos($url, '?');\n if ($questionMarkPos !== false) {\n $url = substr($url, 0, $questionMarkPos);\n }\n $qs = $newQueryString;\n if (!is_string($qs) && $qs !== null) {\n if (defined('PHP_QUERY_RFC3986')) {\n // @codingStandardsIgnoreLine\n $qs = http_build_query($qs, '', '&', PHP_QUERY_RFC3986);\n } else {\n $qs = http_build_query($qs);\n }\n }\n if (!empty($qs)) {\n $url .= '?' . $qs;\n }\n if ($fragment !== null) {\n $url .= '#' . $fragment;\n }\n return $url;\n }",
"public function __toString()\n {\n $query = '';\n if (count($this->options)) {\n $query = [];\n foreach ($this->options as $key => $value) {\n if (is_array($value)) {\n $value = implode(',', $value);\n }\n $query[] = '$' . $key . '=' . $value;\n }\n $query = '?' . implode('&', $query);\n }\n\n return $query;\n }",
"private function setOptsFromGET(){\n\n $this->_opt['save'] = 0;\n\n $this->_opt['show_reps'] = 1;\n\n /* Replace default Options with GET params */\n\n foreach($_GET as $key=>$value){\n\n $this->_opt[$key] = $value;\n }\n\n \n\n }",
"public function build() {\n return implode('&', $this->uriParams);\n }",
"public function buildRequestQuery()\n\t{\n\t\t$query_string = '';\n\t\tforeach ($this->returnItems() as $index => $item) {\n\t\t\t$query_string .= '&' . $item->toQueryString($index++);\n\t\t}\n\t\treturn $query_string;\n\t}",
"function appendQueryString($url, $qs) {\n $parsed = parse_url($url);\n\n // Add trailing slash to original URL if only a root URL is given\n // eg. www.example.com --> www.example.com/\n if ($parsed['path'] == NULL) {\n $url = $url . '/';\n }\n\n // Add the query string separator\n if ($parsed['query'] == NULL) {\n $url = $url . '?';\n } else {\n $url = $url . '&';\n }\n\n return $url . $qs;\n}",
"private function getQueryString()\n {\n return \\apply_filters('swiftype_search_query_string', stripslashes(\\get_search_query(false)));;\n }",
"public function queryString() {\n\t\t/* Note that it is necessary to pass the full URL to\n\t\t * `parse_url`, because `parse_url` can be tricked into\n\t\t * thinking that part of the path is a domain name. */\n\t\treturn parse_url($this->fullUrl(), PHP_URL_QUERY);\n\t}",
"private function getQueryUrl(): string\n {\n return $this->getBaseUrl() . 'query';\n }",
"public function setQueryString( $query )\n\t{\n\t\t$this->params = array();\n\t\tparse_str( $query, $this->params );\n\t\t$this->modified = true;\n\t}",
"function router_add_query($url, array $qp = array())\n{\n if (empty($qp)) {\n return $url;\n }\n if (strpos($url, '?') !== false) {\n list($url, $query_str) = explode('?', $url, 2);\n parse_str($query_str, $old_qp);\n $qp = array_merge($old_qp, $qp);\n }\n if (!empty($qp)) {\n $url .= '?' . http_build_query($qp);\n }\n return $url;\n}",
"public function currentUrl(bool $withQueryString = false): string\n {\n $currentUrl = $this->basePath() . $this->uri->getPath();\n $query = $this->uri->getQuery();\n\n if ($withQueryString && !empty($query)) {\n $currentUrl .= '?' . $query;\n }\n\n return $currentUrl;\n }",
"abstract protected function buildQuery(): string;",
"private function getMainQueryString() {\n\t\treturn $this->getQueryStringUsingGenreString(self::genresToQString($this->genres));\n\t}",
"function replace_original_search_query() {\n\t\tglobal $wp_query;\n\n\t\tif ( ! empty( $this->original_query ) ) {\n\t\t\t$wp_query->set( 's', $this->original_query );\n\t\t}\n\t}",
"public function getRequestUri() {\n\t\t$final = '';\n\t\tif($this->path) {\n\t\t\t$final .= $this->path;\n\t\t}\n\t\tif($this->query) {\n\t\t\t$final .= '?' . $this->query;\n\t\t}\n\t\treturn $final;\n\t}",
"protected function _setPath()\n\t{\n\t\t/* Decode URL */\n\t\tif ( \\IPS\\Settings::i()->use_friendly_urls and \\IPS\\Settings::i()->htaccess_mod_rewrite and mb_substr( \\IPS\\Request::i()->url()->data[ \\IPS\\Http\\Url::COMPONENT_PATH ], -14 ) !== '/api/index.php' )\n\t\t{\n\t\t\t/* We are using Mod Rewrite URL's, so look in the path */\n\t\t\t$this->path = mb_substr( \\IPS\\Request::i()->url()->data[ \\IPS\\Http\\Url::COMPONENT_PATH ], mb_strpos( \\IPS\\Request::i()->url()->data[ \\IPS\\Http\\Url::COMPONENT_PATH ], '/api/' ) + 5 );\n\t\t\t\n\t\t\t/* nginx won't convert the 'fake' query string to $_GET params, so do this now */\n\t\t\tif ( ! empty( \\IPS\\Request::i()->url()->data[ \\IPS\\Http\\Url::COMPONENT_QUERY ] ) )\n\t\t\t{\n\t\t\t\tparse_str( \\IPS\\Request::i()->url()->data[ \\IPS\\Http\\Url::COMPONENT_QUERY ], $params );\n\t\t\t\tforeach ( $params as $k => $v )\n\t\t\t\t{\n\t\t\t\t\tif ( ! isset( \\IPS\\Request::i()->$k ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t\\IPS\\Request::i()->$k = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Otherwise we are not, so we need the query string instead, which is actually easier */\n\t\t\t$this->path = \\IPS\\Request::i()->url()->data[ \\IPS\\Http\\Url::COMPONENT_QUERY ];\n\n\t\t\t/* However, if we passed any actual query string arguments, we need to strip those */\n\t\t\tif( mb_strpos( $this->path, '&' ) )\n\t\t\t{\n\t\t\t\t$this->path = mb_substr( $this->path, 0, mb_strpos( $this->path, '&' ) );\n\t\t\t}\n\t\t}\n\t}",
"protected function prepareRequestUri()\n {\n $requestUri = '';\n\n if ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {\n // check this first so IIS will catch\n $requestUri = $this->headers->get('X_REWRITE_URL');\n } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') {\n // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)\n $requestUri = $this->server->get('UNENCODED_URL');\n } elseif ($this->server->has('REQUEST_URI')) {\n $requestUri = $this->server->get('REQUEST_URI');\n // HTTP proxy reqs setup request uri with scheme and host [and port] + the url path, only use url path\n $schemeAndHttpHost = $this->getScheme().'://'.$this->getHttpHost();\n if (strpos($requestUri, $schemeAndHttpHost) === 0) {\n $requestUri = substr($requestUri, strlen($schemeAndHttpHost));\n }\n } elseif ($this->server->has('ORIG_PATH_INFO')) {\n // IIS 5.0, PHP as CGI\n $requestUri = $this->server->get('ORIG_PATH_INFO');\n if ($this->server->get('QUERY_STRING')) {\n $requestUri .= '?'.$this->server->get('QUERY_STRING');\n }\n }\n\n return $requestUri;\n }",
"function am2_append_query_string( $url, $post, $leavename ) {\n\t\n\t\n\t$vanity_urls = get_option('am2_vanity_urls'); \n\tif(!empty($vanity_urls[$post->post_type.\"_\".$post->ID]['url'])){\n\t\t$url = site_url().'/'.$vanity_urls[$post->post_type.\"_\".$post->ID]['url'];\n\t}\n return $url; \n\t\n}",
"public function getQueryString():string;",
"protected static function parse_query_params(&$url, array $options) {\n if (!empty($options['query'])) {\n $url .= '?' . http_build_query($options['query']);\n }\n }",
"function assoc_array_to_qs( $array = NULL, $get_query_string = TRUE ) {\n\n\t$out = NULL;\n\n\tif ( ! isset( $array ) AND $get_query_string ) {\n\n\t\t$CI =& get_instance();\n\n\t\t$array = $CI->input->get();\n\n\t}\n\n\tif ( is_array( $array ) ) {\n\n\t\t$out = http_build_query( $array, '', '&' );\n\n\t}\n\n\treturn $out ? '?' . $out : '';\n\n}",
"public function parameterize():String {\n\n\t\treturn http_build_query($this->data);\n\n\t}",
"public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }",
"public function buildQuery(): string {\n if ($this->queryHasOption || strlen($this->finalQueryString) > 0) {\n throw new \\Exception('You can only use this instance of ODataQueryBuilder for a single query! Please create a new builder for a new query.', 500);\n }\n\n $this->appendServiceUrlToQuery();\n $this->appendEntitySetsToQuery();\n $this->appendFiltersToQuery();\n $this->appendSearchToQuery();\n $this->appendSelectsToQuery();\n $this->appendExpandsToQuery();\n $this->appendOrderByToQuery();\n $this->appendSkipToQuery();\n $this->appendTopToQuery();\n $this->appendCountToQuery();\n\n //remove the ? if the query has no query options.\n if (!$this->queryHasOption) {\n $this->finalQueryString = substr($this->finalQueryString, 0, -1);\n }\n\n return $this->finalQueryString;\n }"
] | [
"0.7274767",
"0.711158",
"0.68992716",
"0.6612023",
"0.61407006",
"0.6107886",
"0.6067695",
"0.6044313",
"0.59670705",
"0.5952654",
"0.5940188",
"0.5872233",
"0.5862615",
"0.5831775",
"0.5824068",
"0.5815448",
"0.581423",
"0.5800863",
"0.57914156",
"0.57883996",
"0.57678235",
"0.5745159",
"0.57446796",
"0.5737069",
"0.5735053",
"0.5709907",
"0.57092506",
"0.5676584",
"0.5670694",
"0.56544924",
"0.56508887",
"0.5643094",
"0.5611225",
"0.557344",
"0.5571656",
"0.5565449",
"0.554749",
"0.54949176",
"0.5491242",
"0.5471735",
"0.5469955",
"0.54695714",
"0.545293",
"0.5446222",
"0.5440857",
"0.54283524",
"0.5402846",
"0.54005617",
"0.5391047",
"0.53838354",
"0.53831613",
"0.5371381",
"0.5369192",
"0.53588986",
"0.5358376",
"0.5342837",
"0.5335411",
"0.533287",
"0.5331038",
"0.5327059",
"0.5325075",
"0.5322888",
"0.531965",
"0.53157645",
"0.53146976",
"0.5312151",
"0.52752995",
"0.52741",
"0.527175",
"0.52560496",
"0.52532595",
"0.52506655",
"0.5246152",
"0.52313304",
"0.52261287",
"0.52254975",
"0.5218394",
"0.5213206",
"0.5189493",
"0.51658547",
"0.5159552",
"0.51404953",
"0.5139262",
"0.51241416",
"0.51222277",
"0.51091397",
"0.5102066",
"0.508962",
"0.5082144",
"0.50728154",
"0.5070899",
"0.50708544",
"0.506983",
"0.5066542",
"0.505821",
"0.50538415",
"0.5036156",
"0.5032923",
"0.5029662",
"0.50134224"
] | 0.6501622 | 4 |
Get most sold products | public function getMostSoldProduct($limit = '1')
{
$this->db->execute("SELECT R.product,
R.items,
SUM(R.items) AS sold,
P.description,
P.name,
P.image
FROM `OrderRow`AS R
LEFT OUTER JOIN Product AS P
ON R.product = P.id
GROUP BY product
ORDER BY sold DESC
LIMIT $limit;");
$res = $this->db->fetchAll();
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function find_higest_saleing_product($limit){\n global $db;\n $sql = \"SELECT p.name, COUNT(s.product_id) AS totalSold, SUM(s.qty) AS totalQty\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON p.id = s.product_id \";\n $sql .= \" GROUP BY s.product_id\";\n $sql .= \" ORDER BY SUM(s.qty) DESC LIMIT \".$db->escape((int)$limit);\n return $db->query($sql);\n }",
"function most_sold_products()\n {\n $result = array();\n $product = $this->db->get('product')->result_array();\n foreach ($product as $row) {\n $result[] = array(\n 'id' => $row['product_id'],\n 'sale' => $this->total_sale($row['product_id'])\n );\n }\n if (!function_exists('compare_lastname')) {\n function compare_lastname($a, $b)\n {\n return strnatcmp($b['sale'], $a['sale']);\n }\n }\n\n usort($result, 'compare_lastname');\n return $result;\n }",
"public function getTopSales(){\n\t\t// get the products\n\t\t$products = $this->getProducts();\n\n\t\t// sort the products by number of item sold\n\t\t$price = array_column($products, 'item_sold');\n\t\tarray_multisort($price, SORT_DESC, $products);\n\n\t\t$topSales = [];\n\n\t\t// extract the 3 most sold items\n\t\tfor($i=0;$i<3;$i++){\n\t\t\tarray_push($topSales, array_shift($products));\n\t\t}\n\n\t\treturn $topSales;\n\t}",
"public function max_sale(){\n\n global $database;\n $sql = \"SELECT product_id, SUM(product_quaty) FROM orders_index GROUP by product_id ORDER BY SUM(product_quaty) DESC LIMIT 1\";\n $result_set = $database->query($sql);\n $row = mysqli_fetch_array($result_set);\n $result = array_shift($row);\n return $result;\n }",
"public function get_top_sellers()\n\t{\n\t\t$this->db->select('vendor.vendor_id, vendor.vendor_store_name, count(vendor.vendor_id) AS total_occurences')->from('product, vendor, order_item')->where(\"product.product_id = order_item.product_id AND product.created_by = vendor.vendor_id\")->order_by(\"total_occurences\", 'DESC');\n\t\t$query = $this->db->get('',10);\n\t\t\n\t\treturn $query;\n\t}",
"public function bestProduct() {\n $bestProducts = Producer::join(\"users\", \"producers.user_id\", \"=\", \"users.id\")\n ->join(\"products\", \"producers.product_id\", \"=\", \"products.id\")\n ->where(\"quantity\", \">\", \"0\")\n ->orderBy(\"amountSell\", \"desc\")\n ->limit(5)\n ->get();\n return ProducerResource::collection($bestProducts);\n }",
"function get_best_sales_info($a) {\n\n $op = new product();\n \n for( $i = 0; $i < BEST_SALES; $i++ ) {\n $op->get_best_sale($a[$i], $i);\n }\n \n return $op;\n \n}",
"function getMostViewedProducts($nbProductsShown) {\r\n global $tableProducts;\r\n\r\n $dbc = connection();\r\n $dbc->quote($tableProducts);\r\n\r\n //On récupère les produits les plus vus si ils n'ont pas expiré\r\n //On récupère aussi les liens vers leurs images et on les organise par leur nombre de vues\r\n $req = 'SELECT DISTINCT p.id AS idProduct, p.title as productTitle, p.short_desc, MIN(m.src) AS mediaSource,'\r\n . ' m.isImage, p.view_count, p.is_frontpage '\r\n . 'FROM products AS p '\r\n . 'INNER JOIN products_has_medias AS pm ON p.id = pm.id_products '\r\n . 'INNER JOIN medias AS m ON pm.id_medias = m.id '\r\n . 'WHERE m.isImage = 1 '\r\n . 'AND NOW() > availability_date '\r\n . 'AND NOW() < expiration_date '\r\n . 'GROUP BY p.title '\r\n . 'ORDER BY view_count DESC '\r\n . 'LIMIT ' . $nbProductsShown;\r\n\r\n $requPrep = $dbc->prepare($req); // on prépare notre requête\r\n $requPrep->execute();\r\n $data = $requPrep->fetchAll(PDO::FETCH_OBJ);\r\n $requPrep->closeCursor();\r\n\r\n return $data;\r\n}",
"public static function loadProductsTopSale()\n {\n $ret = array();\n $sql = \"select p.ProID,p.ProName,p.Price, SUM(od.quantity) from products p,orderdetails od \n\t\t\t\twhere p.ProID = od.ProId\n\t\t\t\tGROUP BY p.ProID\n\t\t\t\tORDER BY od.quantity DESC limit 0,10\";\n $list = DataProviderMain::execQuery($sql);\n\n while ($row = mysqli_fetch_array($list)) {\n $proId = $row[\"ProID\"];\n $proName = $row[\"ProName\"];\n //$tinyDes = $row[\"TinyDes\"];\n //$fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n //$quantity = $row[\"Quantity\"];\n //$catId = $row[\"CatID\"];\n //$view = $row[\"NView\"];\n //$dayAdd = $row[\"DayAdd\"];\n //$classify =$row[\"Classify\"];\n\n $p = new Products($proId, $proName, '', '', $price, '', '', '', '', '');\n array_push($ret, $p);\n }\n\n return $ret;\n }",
"public function bestProductsAction()\n\t{\n $this->checkShopToken();\n\t\t\n\t\t$config = EasymarketingConfig::getInstance();\n \n $limit = Shopware()->Front()->Request()->getParam('limit');\n $most_sold_since = Shopware()->Front()->Request()->getParam('most_sold_since');\n $most_sold_since_date = date('Y-m-d H:i:s', $most_sold_since);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t$pids = Shopware()->Db()->fetchAll(\"SELECT sacro.articleID AS id, (SELECT SUM(od.quantity) FROM s_order_details od WHERE od.articleID = sacro.articleID AND od.modus = 0) as sales\n\t\t\t\t\t\t\t\t\t\t\t\tFROM s_articles_categories_ro sacro \n INNER JOIN s_order_details od ON sacro.articleID = od.articleID\n \t\t\t\t\t\t\t\tINNER JOIN s_order o ON od.orderID = o.id\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN s_articles sa ON od.articleID = sa.id\n WHERE o.ordertime > '\".$most_sold_since_date.\"' AND sa.active = 1 AND (sacro.categoryID = '\".$config->getRootCategoryID().\"' OR sacro.parentCategoryID = '\".$config->getRootCategoryID().\"')\n GROUP BY sacro.articleID\n \t\t\t\t\t\t\t\tORDER BY SUM(od.quantity) DESC\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT \".$limit);\n\t\t\t\t\t\t\t\t\t\t\t\n $i = 0;\n\t\t\n\t\t$productsdata = array();\n\t\t\n\t\tif(count($pids) > 0)\n\t\t{\n\t\t\tforeach ($pids as $key => $val)\n\t\t\t{\n\t\t\t\t$productsdata[$i] = array('id' => $val['id'], 'sales' => (int)$val['sales']);\n\t\t\t\t$i++;\n\t\t\t} \n\t\t} else {\n\t\t\t$test_product_id = Shopware()->Db()->fetchOne(\"SELECT sacro.articleID AS id FROM s_articles_categories_ro sacro LEFT JOIN s_articles sa ON sa.id = sacro.articleID WHERE sa.active = 1 AND (sacro.categoryID = '\".$config->getRootCategoryID().\"' OR sacro.parentCategoryID = '\".$config->getRootCategoryID().\"') GROUP BY sacro.articleID ORDER BY sacro.articleID LIMIT 1\");\n\t\t\t$productsdata[0] = array('id' => $test_product_id['id'], 'sales' => 0);\n\t\t}\n\t\t\n $jsondata = array(\n 'limit' => $limit,\n 'most_sold_since' => $most_sold_since,\n 'products' => $productsdata\n );\n \n\t\t$this->printOutput($jsondata);\n }",
"function set_most_sold($id) {\n\t\t$subtree_categories = $this->subtree_ids($id);\n\t\t//\tnajdu nejvice prodavane aktivni produkty za posledni mesic\n\t\t$from = date('Y-m-d', strtotime('-3 months'));\n\t\t$to = date('Y-m-d');\n\t\t$products = $this->CategoriesProduct->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'CategoriesProduct.category_id' => $subtree_categories,\n\t\t\t\t'NOT' => array('OrderedProduct.product_quantity' => null),\n\t\t\t\t'Product.active' => true,\n\t\t\t\t'DATE(Order.created) >=' => $from,\n\t\t\t\t'DATE(Order.created) <=' => $to\n\t\t\t),\n\t\t\t'contain' => array('Product'),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'ordered_products',\n\t\t\t\t\t'alias' => 'OrderedProduct',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('OrderedProduct.product_id = CategoriesProduct.product_id')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'orders',\n\t\t\t\t\t'alias' => 'Order',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Order.id = OrderedProduct.order_id')\n\t\t\t\t)\n\t\t\t),\n\t\t\t'fields' => array('CategoriesProduct.product_id', 'CategoriesProduct.quantity'),\n\t\t\t'group' => 'CategoriesProduct.id',\n\t\t\t'limit' => $this->CategoriesMostSoldProduct->count,\n\t\t\t'order' => array('CategoriesProduct.quantity' => 'desc')\n\t\t));\n\n\t\t// zapamatuju si je v db\n\t\tforeach ($products as $product) {\n\t\t\t$save = array(\n\t\t\t\t'CategoriesMostSoldProduct' => array(\n\t\t\t\t\t'category_id' => $id,\n\t\t\t\t\t'product_id' => $product['CategoriesProduct']['product_id']\n\t\t\t\t)\n\t\t\t);\n\t\n\t\t\t$this->CategoriesMostSoldProduct->create();\n\t\t\tif (!$this->CategoriesMostSoldProduct->save($save)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"function get_most_sold($id = null, $customer_type_id = null) {\n\t\tif (!$id) {\n\t\t\treturn false;\n\t\t}\n\t\t$limit = $this->CategoriesMostSoldProduct->count;\n\n\t\t// zjistim idcka kategorii v podstromu\n\t\t$category_ids = $this->subtree_ids($id);\n\t\t$this->CategoriesProduct->Product->virtualFields['price'] = $this->CategoriesProduct->Product->price;\n\t\t$this->CategoriesProduct->Product->virtualFields['discount'] = $this->CategoriesProduct->Product->discount;\n\t\t$products = $this->CategoriesProduct->Product->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Product.active' => true\n\t\t\t),\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array(\n\t\t\t\t'Product.id',\n\t\t\t\t'Product.name',\n\t\t\t\t'Product.url',\n\t\t\t\t'Product.retail_price_with_dph',\n\t\t\t\t'Product.discount_common',\n\t\t\t\t'Product.price',\n\t\t\t\t'Product.discount',\n\t\t\t\t\t\n\t\t\t\t'Image.id',\n\t\t\t\t'Image.name'\n\t\t\t),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'categories_most_sold_products',\n\t\t\t\t\t'alias' => 'CategoriesMostSoldProduct',\t\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array('Product.id = CategoriesMostSoldProduct.product_id AND CategoriesMostSoldProduct.category_id = ' . $id)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'images',\n\t\t\t\t\t'alias' => 'Image',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Image.product_id = Product.id AND Image.is_main = 1')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'availabilities',\n\t\t\t\t\t'alias' => 'Availability',\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array('Availability.id = Product.availability_id AND Availability.cart_allowed = 1')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPrice',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPrice.product_id AND CustomerTypeProductPrice.customer_type_id = ' . $customer_type_id)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPriceCommon',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPriceCommon.product_id AND CustomerTypeProductPriceCommon.customer_type_id = 2')\n\t\t\t\t),\n\t\t\t),\n\t\t\t'limit' => $limit,\n\t\t\t'group' => 'Product.id',\n\t\t));\n\n\t\t// produkty maji byt 3 (vic se jich tam pri generovani neulozi\n\t\t// ale muze jich byt min, proto nahodne vyberu zbytek z dane kategorie\n\t\tif (count($products) < $limit) {\n\t\t\t$product_ids = Set::extract('/Product/id', $products);\n\t\t\t$subtree_ids = $this->get_subcategories_ids($id);\n\t\t\t$complement_categories_products_conditions = 'CategoriesProduct.product_id = Product.id AND CategoriesProduct.category_id IN (' . implode(',', $subtree_ids) . ')';\n\t\t\tif (!empty($product_ids)) {\n\t\t\t\t$complement_categories_products_conditions .= ' AND CategoriesProduct.product_id NOT IN (' . implode(',', $product_ids) . ')';\n\t\t\t}\n\t\t\t// vyberu nahodne produkt z kategorie a vlozim ho do pole nejprodavanejsich\n\t\t\t$complement_products = $this->CategoriesProduct->Product->find('all', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'Product.active' => true\n\t\t\t\t),\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array(\n\t\t\t\t'Product.id',\n\t\t\t\t'Product.name',\n\t\t\t\t'Product.url',\n\t\t\t\t'Product.short_description',\n\t\t\t\t'Product.retail_price_with_dph',\n\t\t\t\t'Product.discount_common',\n\t\t\t\t'Product.price',\n\t\t\t\t'Product.discount',\n\t\t\t\t\t\n\t\t\t\t'Image.id',\n\t\t\t\t'Image.name'\n\t\t\t),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'categories_products',\n\t\t\t\t\t'alias' => 'CategoriesProduct',\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array($complement_categories_products_conditions)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'images',\n\t\t\t\t\t'alias' => 'Image',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Image.product_id = Product.id AND Image.is_main = 1')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'availabilities',\n\t\t\t\t\t'alias' => 'Availability',\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array('Availability.id = Product.availability_id AND Availability.cart_allowed = 1')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPrice',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPrice.product_id AND CustomerTypeProductPrice.customer_type_id = ' . $customer_type_id)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPriceCommon',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPriceCommon.product_id AND CustomerTypeProductPriceCommon.customer_type_id = 2')\n\t\t\t\t),\n\t\t\t),\n\t\t\t\t'limit' => $this->CategoriesMostSoldProduct->count - count($products),\n\t\t\t\t'order' => 'Rand()'\n\t\t\t));\n\t\t\t$products = array_merge($products, $complement_products);\n\t\t}\n\t\tunset($this->CategoriesProduct->Product->virtualFields['price']);\n\t\tunset($this->CategoriesProduct->Product->virtualFields['discount']);\n\n\t\treturn $products;\n\t}",
"public function productsSortedByCheapest()\n {\n $products = $this->p();\n usort($products, [$this, 'sortByCheapest']);\n return $products;\n }",
"function best_selling_products_function( $args ) {\n\t$args = [\n\t\t'post_type'\t\t\t=> 'product',\n\t\t'meta_key' \t\t\t=> 'total_sales',\n\t\t'orderby'\t\t\t=> 'meta_value_num',\n\t\t'posts_per_page'\t=> 10\n\t];\n\n\t$loop = new WP_Query($args);\n\n\tif ( $loop->have_posts() ) {\n\t\techo '\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Title</th>\n\t\t\t\t\t<th>Description</th>\n\t\t\t\t\t<th>Price</th>\n\t\t\t\t</tr>\n\t\t';\n\n\t\twhile ( $loop->have_posts() ) : $loop->the_post();\n\t\t\tglobal $product;\n\n\t\t\techo '\n\t\t\t\t<tr>\n\t\t\t\t\t<td><a href=\"'. get_the_permalink() .'\">' . get_the_title() . '</a></td>\n\t\t\t\t\t<td>' . get_the_excerpt() . '</td>\n\t\t\t\t\t<td>' . $product->get_price() . '</td>\n\t\t\t\t</tr>\n\t\t\t';\n\t\tendwhile;\n\n\t\techo '</table>';\t\n\n\t} else {\n\t\techo __( 'No products found' );\n\t}\n\n\twp_reset_postdata();\n}",
"public function productsSortedByFastest()\n {\n $products = $this->p();\n usort($products, [$this, 'sortByFastest']);\n return $products;\n }",
"public function get_popular_products()\n\t{\n\t\t$this->db->select('product.*, category.category_name, brand.brand_name')->from('product, category, brand')->where(\"product.product_status = 1 AND product.category_id = category.category_id AND product.brand_id = brand.brand_id AND product.featured = 1\")->order_by(\"clicks\", 'DESC');\n\t\t$query = $this->db->get('',4);\n\t\t\n\t\treturn $query;\n\t}",
"function best_sell_limit()\n \t{\n \t$this->db->select('*'); \n $this->db->from('ac_product');\n $this->db->where('ac_product.dibeli >= 10'); //minimal 10\n $this->db->order_by('created_at','desc');\n $this->db->limit(10);\n $query = $this->db->get();\n return $query ->result();\n \t}",
"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->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()->sortByDesc(function ($p) {\n\n // sort by the number of stars\n return $p->reviews->sortBy(function ($r) {\n return $r->stars;\n });\n });\n\n return $data;\n }",
"public function get_top_seller($num=5){\n $data =$this\n ->join('product_description','product.id','=','product_description.product_id')\n ->select(\"product.id\",'product.price','product.image','product_description.name')\n ->where('stock_status_id','5')\n ->where('status','1')\n ->where('product_description.language_id','1')\n ->orderBy('id', 'ASC')\n ->take($num)\n ->get();\n return $data;\n }",
"public function topReviewed(){\n $this->db->select('product, COUNT(timestamp) AS numReview');\n $this->db->from('review');\n $this->db->group_by('product');\n $this->db->order_by(\"numReview\",\"desc\");\n $this->db->limit(3);\n $query = $this->db->get();\n return $query->result();\n }",
"public function get_max_product_price()\n\t{\n\t\t$this->db->select('MAX(product_selling_price) AS price')->from('product')->where(\"product_status = 1\");\n\t\t$query = $this->db->get();\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->price;\n\t}",
"public function getPopularProducts(){\n\t\t//open popular items file\n\t\t$file = fopen($this->file, \"r\");\n\t\t\n\t\t// assign it into $items variable\n\t\t$string = fgets($file);\n\n\t\t// item id's into items property\n\t\t$this->items = explode(\",\", $string);\n\n\t\t// Close the file\n\t\tfclose($file);\n\n\n\t\t// Instanciate model selection class\n\t\t$select = new SelectionDB;\n\n\t\t// Query 5 products from database\n\t\treturn $select->selectProduct($this->items);\n\n\n\t}",
"public function getLatestProduct()\n {\n $this->db->connect();\n $sql = \"SELECT * FROM $this->table ORDER BY added LIMIT 4;\";\n $product = $this->db->executeFetchAll($sql);\n return $product;\n }",
"public function getMostUsed(int $count, int $minUsage): Collection;",
"public function getProductsMaxPrice()\n {\n return $this->filterData['max'] ?? '';\n }",
"function most_wished()\n {\n $result = array();\n $product = $this->db->get('product')->result_array();\n foreach ($product as $row) {\n $result[] = array(\n 'title' => $row['title'],\n 'wish_num' => $this->total_wished($row['product_id']),\n 'id' => $row['product_id']\n );\n }\n if (!function_exists('compare_lastname')) {\n function compare_lastname($a, $b)\n {\n return strnatcmp($b['wish_num'], $a['wish_num']);\n }\n }\n usort($result, 'compare_lastname');\n return $result;\n }",
"public function product_get_most_popular_list($count=null) {\n\t\t $LIMIT = ($count) ? \"LIMIT %d\" : \"\";\n\t\t $sql = <<<EOD\n\t\t SELECT\n\t\t\t{$this->wpdb->prefix}topspin_items.id,\n\t\t \t{$this->wpdb->prefix}topspin_items.campaign_id,\n\t\t \tCOUNT({$this->wpdb->prefix}topspin_orders_items.campaign_id) AS `order_count`,\n\t\t \tSUM({$this->wpdb->prefix}topspin_orders_items.quantity) AS `total_count`,\n\t\t\t{$this->wpdb->prefix}topspin_items.artist_id,\n\t\t\t{$this->wpdb->prefix}topspin_items.reporting_name,\n\t\t\t{$this->wpdb->prefix}topspin_items.embed_code,\n\t\t\t{$this->wpdb->prefix}topspin_items.width,\n\t\t\t{$this->wpdb->prefix}topspin_items.height,\n\t\t\t{$this->wpdb->prefix}topspin_items.url,\n\t\t\t{$this->wpdb->prefix}topspin_items.poster_image,\n\t\t\t{$this->wpdb->prefix}topspin_items.poster_image_source,\n\t\t\t{$this->wpdb->prefix}topspin_items.product_type,\n\t\t\t{$this->wpdb->prefix}topspin_items.offer_type,\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.name AS offer_type_name,\n\t\t\t{$this->wpdb->prefix}topspin_items.description,\n\t\t\t{$this->wpdb->prefix}topspin_items.price,\n\t\t\t{$this->wpdb->prefix}topspin_items.name,\n\t\t\t{$this->wpdb->prefix}topspin_items.campaign,\n\t\t\t{$this->wpdb->prefix}topspin_items.offer_url,\n\t\t\t{$this->wpdb->prefix}topspin_items.mobile_url,\n\t\t\tGROUP_CONCAT(DISTINCT {$this->wpdb->prefix}topspin_items_tags.tag_name SEPARATOR ',') AS `tags`,\n\t\t\t{$this->wpdb->prefix}topspin_currency.currency,\n\t\t\t{$this->wpdb->prefix}topspin_currency.symbol,\n\t\t \t{$this->wpdb->prefix}topspin_items.last_modified\n\t\t FROM\n\t\t \t{$this->wpdb->prefix}topspin_orders_items\n\t\t LEFT JOIN\n\t\t \t{$this->wpdb->prefix}topspin_items ON {$this->wpdb->prefix}topspin_orders_items.campaign_id = {$this->wpdb->prefix}topspin_items.campaign_id\n\t\t LEFT JOIN\n\t\t \t{$this->wpdb->prefix}topspin_items_tags ON {$this->wpdb->prefix}topspin_items.id = {$this->wpdb->prefix}topspin_items_tags.item_id\n\t\t LEFT JOIN\n\t\t \t{$this->wpdb->prefix}topspin_currency ON {$this->wpdb->prefix}topspin_items.currency = {$this->wpdb->prefix}topspin_currency.currency\n\t\t LEFT JOIN\n\t\t \t{$this->wpdb->prefix}topspin_offer_types ON {$this->wpdb->prefix}topspin_items.offer_type = {$this->wpdb->prefix}topspin_offer_types.type\n\t\t WHERE\n\t\t \t{$this->wpdb->prefix}topspin_items.offer_type = 'buy_button' AND\n\t\t \t{$this->wpdb->prefix}topspin_items.artist_id = '%d'\n\t\t GROUP BY\n\t\t \t{$this->wpdb->prefix}topspin_orders_items.campaign_id\n\t\t ORDER BY\n\t\t \t`total_count` DESC\n\t\t {$LIMIT}\nEOD;\n\t\t$items = $this->wpdb->get_results($this->wpdb->prepare($sql,array($this->artist_id,$count)));\n\t\tforeach($items as $item) {\t\t\n\t\t\t##\tAdd Images\n\t\t\t$item->images = $this->getItemImages($item->id);\n\t\t\t##\tGet Default Image\n\t\t\t$item->default_image = (strlen($item->poster_image_source)) ? $this->getItemDefaultImage($item->id,$item->poster_image_source) : $item->poster_image;\n\t\t\t$item->default_image_large = (strlen($item->poster_image_source)) ? $this->getItemDefaultImage($item->id,$item->poster_image_source,'large') : $item->poster_image;\n\t\t}\n\t\treturn $items;\n\t}",
"public function fastestProduct()\n {\n return $this->productsSortedByFastest()[0] ?? null;\n }",
"public function findLatest()\n {\n return $this->productRepository->getLatest();\n }",
"public function getMaxPrice();",
"public function getNewBestsellers() {\n\t\t$bestsellers = Product::where('bestseller', 1)\n\t\t ->orderBy('created_at', 'desc')\n\t\t ->take(12)\n\t\t\t ->with('image')\n\t\t\t ->with('author')\n\t\t\t ->where('ebook', 0)\n\t\t\t ->where('amount', '>', 0)\n\t\t ->get();\n\t\treturn $bestsellers;\n }",
"public function cheapestProduct()\n {\n return $this->productsSortedByCheapest()[0] ?? null;\n }",
"function getPriceMax($game_id, $round_number, $product_number, $region_number, $channel_number){\r\n\t\t\t$prices=new Model_DbTable_Decisions_Mk_Prices();\r\n\t\t\t$max=0;\r\n\t\t\t$companies=$this->getCompaniesInGame($game_id);\r\n\t\t\tforeach ($companies as $company) {\r\n\t\t\t\t$result=$prices->getDecision($game_id, $company['id'], $round_number);\r\n\t\t\t\t$result_product=$result['product_'.$product_number];\r\n\t\t\t\t$result_channel=$result_product['channel_'.$channel_number];\r\n\t\t\t\t$result_region=$result_channel['region_'.$region_number];\r\n\t\t\t\t$price=$result_region;\r\n\t\t\t\tif ($price>$max){\r\n\t\t\t\t\t$max=$price;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $max;\r\n\t\t}",
"function getListMostViewedProducts($perPage=NULL, $currentPage=1){\n\t\tif($perPage === NULL) $perPage\t= (int) $this->_config['qty'];\t\t\n \n\t\t/*\n\t\t\tShow all the product list in the current store\t\t\t\n\t\t*/\n\t\t$storeId = Mage::app()->getStore()->getStoreId();\n $this->setStoreId($storeId);\n \n $this->_productCollection = Mage::getResourceModel('reports/product_collection');\n \n\t\t$this->_productCollection = $this->_productCollection->addViewsCount(); \n \n if($this->_config['catsid']){\n // get array product_id\n $arr_productids = $this->getProductByCategory();\n \n $this->_productCollection = $this->_productCollection->addAttributeToSelect('*')\n ->setStoreId($storeId)\n ->addStoreFilter($storeId)\n ->addIdFilter($arr_productids)\n ->setPageSize($perPage); \n }else{\n $this->_productCollection = $this->_productCollection->addAttributeToSelect('*')\n ->setStoreId($storeId)\n ->addStoreFilter($storeId)\n ->setPageSize($perPage); \n }\n\t\t\n\t\tMage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);\n\t\tMage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);\n\t\t\n return $this->_productCollection;\t\n\t}",
"public function getProductLimit() {\r\n\t\t$config = $this->getConfig();\r\n $limit = $this->getData(\"product_count\");\r\n if(!$limit)\r\n $limit = $config[\"limit\"];\r\n return $limit;\r\n }",
"public function getMaxPrice() {\n return $this->get(self::MAXPRICE);\n }",
"static function fetchTopFiveMostVisited($pdo){\n\n try {\n $sql = \"select product_real_id , count(_id) as instance from (\n select _id,concat(cast(company_id as CHARACTER(30)) ,\n cast(product_id as CHARACTER(30))) as product_real_id \n from Tracking) as innerTable\n group by product_real_id\n order by instance desc\n limit 5\";\n $stmt = $pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll();\n }catch (PDOException $e) {\n\n return null;\n }\n }",
"public function get_latest_products()\n\t{\n\t\t$this->db->select('product.*, category.category_name, brand.brand_name')->from('product, category, brand')->where(\"product.product_status = 1 AND product.category_id = category.category_id AND product.brand_id = brand.brand_id AND product.product_balance > 0\")->order_by(\"created\", 'DESC');\n\t\t$query = $this->db->get('',8);\n\t\t\n\t\treturn $query;\n\t}",
"public function getBestPrice() {\n\t\ttry {\n\t\t\treturn Mage::getSingleton ( 'meinpaket/service_productData_requestService' )->requestBestPrices ();\n\t\t} catch ( Exception $e ) {\n\t\t\tMage::logException ( $e );\n\t\t}\n\t\treturn null;\n\t}",
"public function getNewBestsellersForKids() {\n\t\t$bestsellers = Product::where('bestseller', 1)\n\t\t ->orderBy('created_at', 'desc')\n\t\t ->take(12)\n\t\t ->where('category_id', 3)\n\t\t\t ->with('image')\n\t\t\t ->with('author')\n\t\t\t ->where('ebook', 0)\n\t\t\t ->where( 'amount', '>', 0 )\n\t\t\t ->get();\n\t\treturn $bestsellers;\n }",
"public function getProductCount()\n {\n $count = 0;\n \tforeach ($this->getItems() as $item) {\n \t $count += $item['count'];\n \t}\n \treturn $count;\n }",
"public function GetMaxAmount()\n\t {\n\t\t return $this->db->query(\"select MAX(TotalPrice) as price from tb_products\")->row_array(); \n\t }",
"function getNewestProducts()\n {\n $sql = self::$connection->prepare(\"SELECT * FROM products ORDER BY created_at DESC LIMIT 3\");\n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n return $items; //return an array\n }",
"public function StoreSideMenuBestSellers()\n\t{\tob_start();\n\t\tif ($this->products)\n\t\t{\techo '<ul class=\"storeShelfList\">';\n\t\t\tforeach ($this->products as $product_row)\n\t\t\t{\t$product = new StoreProduct($product_row);\n\t\t\t\techo '<li><a href=\"', $link = $this->link->GetStoreProductLink($product), '\"><img class=\"storeShelfImg\" src=\"', ($img = $product->HasImage('thumbnail')) ? $img : $product->DefaultImageSRC('thumbnail'), '\" alt=\"', $title = $this->InputSafeString($product->details['title']), ' - Image\" /></a><h4><a href=\"', $link, '\">', $title, '</a></h4><div class=\"storeShelfAuthor\">', $product->GetAuthorString(), '</div><div class=\"storeShelfPrice\">£', number_format($product->GetPriceWithTax(), 2), '</div>', $this->CartLinkButton($product), '<div class=\"clear\"></div></li>';\n\t\t\t}\n\t\t\t//$this->VarDump($products);\n\t\t\techo '</ul>';\n\t\t}\n\t\treturn ob_get_clean();\n\t}",
"function getWorstProductByCategory($cat) {\r\n global $conn;\r\n $select = \"SELECT productid, name, image FROM product WHERE category='$cat' ORDER BY quantitysold ASC LIMIT 1;\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}",
"public function getProductPriceX()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/maximum_splits', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }",
"public function getProductPriceX()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/maximum_splits');\n }",
"public function maxInvestorToShop()\n\t{\n\t\t$class_of_shop = 'b';\n\t\tswitch ($class_of_shop) {\n\t \t\tcase $class_of_shop == 'c':\n\t \t\t\treturn 2;\n\t \t\t\tbreak;\n\n\t\t\tcase $class_of_shop == 'b':\n\t \t\t\treturn 3;\n\t \t\t\tbreak;\n\n\t \t\tcase $class_of_shop == 'a':\n\t \t\t\treturn 5;\n\t \t\t\tbreak;\n\n\t \t\tdefault:\n\t \t\t\treturn -1;\n\t \t\t\tbreak;\n\t \t}\n\n\t\t#based on class of shop.\n\t\t#returns the total investor count.\n\t}",
"public function popular()\n {\n try {\n $items = Item::inStock()\n ->take(18)\n ->orderBy('popular', 'desc')\n ->get();\n return ItemResource::collection($items);\n } catch (QueryException $e) {\n logs()->error($e->getMessage());\n return collect();\n }\n }",
"public function getTopProduct($params) {\n\t\t$query = OrderItem::find();\n\t\t$this->load($params);\n\t\t$query->select('product.name,SUM(order_item.quantity) as total');\n\t\t$query->innerJoin('product', 'order_item.product_id=product.id');\n\t\t$query->innerJoin('order', 'order_item.order_id=order.id');\n\t\t$query->andFilterWhere(['order.parent_id' => $this->username == null ? $this->user->id : $this->username]);\n\t\tif($this->start_date != null) {\n\t\t\tif($this->end_date == null) {\n\t\t\t\t$this->end_date = date('Y-m-d');\n\t\t\t}\n\t\t\t$query->andFilterWhere([\n\t\t\t\t'>=',\n\t\t\t\t'order.created_date',\n\t\t\t\t$this->start_date,\n\t\t\t]);\n\t\t\t$query->andFilterWhere([\n\t\t\t\t'<=',\n\t\t\t\t'order.created_date',\n\t\t\t\t$this->end_date,\n\t\t\t]);\n\t\t\t//\t\t\t$query->andFilterWhere([\n\t\t\t//\t\t\t\t'between',\n\t\t\t//\t\t\t\t'order.created_date',\n\t\t\t//\t\t\t\t$this->start_date,\n\t\t\t//\t\t\t\t$this->end_date,\n\t\t\t//\t\t\t]);\n\t\t\t//\t\t\t$query->andFilterWhere([\n\t\t\t//\t\t\t\t'between',\n\t\t\t//\t\t\t\t'order_item.created_date',\n\t\t\t//\t\t\t\t$this->start_date,\n\t\t\t//\t\t\t\t$this->end_date,\n\t\t\t//\t\t\t]);\n\t\t}\n\t\t$query->asArray()->groupBy('product.name');\n\t\t$query->orderBy('total DESC');\n\t\t$top_products = $query->limit(10)->all();\n\t\t$top = [];\n\t\tif($top_products != null) {\n\t\t\tforeach($top_products as $top_product) {\n\t\t\t\t$top[] = [\n\t\t\t\t\t$top_product['name'],\n\t\t\t\t\t(int) $top_product['total'],\n\t\t\t\t];\n\t\t\t}\n\t\t} else {\n\t\t\t$top[] = [\n\t\t\t\t'Không có',\n\t\t\t\t0,\n\t\t\t];\n\t\t}\n\t\t$top = ArrayHelper::merge([\n\t\t\t[\n\t\t\t\t'Top sản phẩm bán chạy',\n\t\t\t\t'Số lượng',\n\t\t\t],\n\t\t], $top);\n\t\treturn $top;\n\t}",
"public function findMostBorrowed($count = 1)\n\t{\n\t\t$qb = $this->createQueryBuilder('m')\n\t\t->addSelect('COUNT(o.id) AS HIDDEN orderCount')\n\t\t->leftJoin('m.orders', 'o')\n\t\t->leftJoin('o.status', 'os')\n\t\t->groupBy('m')\n\t\t->having('orderCount > 0')\n\t\t->orderBy('orderCount', 'DESC')\n\t\t->where('os.id = ?1')\n\t\t->setMaxResults($count)\n\t\t->setParameter(1, OrderStatus::PAID);\n\t\t\n\t\t$moives = $qb->getQuery()->getResult();\n\t\treturn $moives;\n\t}",
"public function getCountProduct()\n {\n return $this->product_model->countAll();\n }",
"function get_most_played() {\n\t\t$this->db->select('songs.song_id, songs.title, songs.artist, songs.album_art, count(interactions.song_id) as play')->from('songs')->order_by('play','desc')->limit(15);\n\t\t$this->db->join('interactions', 'songs.song_id = interactions.song_id');\n\t\t$this->db->group_by('songs.song_id');\n\t\t$songs = $this->db->get();\n\t\treturn $songs->result();\n\n\t}",
"public static function getHighReviews()\n\t{\n\t\t$review = Review::where('vehicle_id' , '=', '0')->orderby(DB::raw('RAND() * 999'))->paginate(3);\n\t\t\n\t\treturn $review;\n\t}",
"public function swc_popular_product_args( $args ) {\n\t\t$title \t\t\t\t\t= get_theme_mod( 'swc_homepage_top_rated_products_title', __( 'Top rated Products', 'storefront-woocommerce-customiser' ) );\n\t\t$columns \t\t\t\t= get_theme_mod( 'swc_homepage_top_rated_products_columns', '4' );\n\t\t$limit \t\t\t\t\t= get_theme_mod( 'swc_homepage_top_rated_products_limit', '4' );\n\n\t\t$args['title']\t\t\t= $title;\n\t\t$args['columns'] \t\t= $columns;\n\t\t$args['limit'] \t\t\t= $limit;\n\n\t\treturn $args;\n\t}",
"public function getLatestSamsung(){\n\t\t$sql = \"SELECT * FROM tbl_product WHERE brandId='7' ORDER BY pid DESC LIMIT 1\";\n\t\t$result = $this->db->select($sql);\n\t\treturn $result;\n\t}",
"public function get_top_sellers2()\n\t{\n\t\t$this->db->select('vendor.vendor_id, vendor.vendor_store_name')->from('vendor')->where(\"vendor.vendor_status = 1\")->order_by(\"vendor_store_name\", 'ASC');\n\t\t$query = $this->db->get('',10);\n\t\t\n\t\treturn $query;\n\t}",
"public function getNumProducts()\n {\n return $this->numProducts;\n }",
"function kvell_edge_woocommerce_products_per_page() {\n\t\t$products_per_page_meta = kvell_edge_options()->getOptionValue( 'edgtf_woo_products_per_page' );\n\t\t$products_per_page = ! empty( $products_per_page_meta ) ? intval( $products_per_page_meta ) : 12;\n\t\t\n\t\tif ( isset( $_GET['woo-products-count'] ) && $_GET['woo-products-count'] === 'view-all' ) {\n\t\t\t$products_per_page = 9999;\n\t\t}\n\t\t\n\t\treturn $products_per_page;\n\t}",
"function maximumToys($prices, $k)\n{\n sort($prices);\n $quantity = 0;\n foreach ($prices as $price) {\n $k -= $price;\n if ($k <= 0) {\n break;\n }\n\n $quantity++;\n }\n\n return $quantity;\n}",
"public function getMaxOrderTotal();",
"public static function getOrderedProductsQuantity(): string\n {\n $query = new Query();\n $total = $query->select([\n 'COUNT(*) as total'\n ])\n ->from(['sale_items'])\n ->where([\n 'customer_auth_id' => Yii::$app->user->identity->id,\n 'sale_id' => 0\n ])\n ->scalar();\n\n return $total;\n }",
"protected function getMostPopularRecipes()\n {\n $self = $this;\n\n $result = Cache::remember(\n 'home_popularRecipes',\n config('kosher.cache_expiration_time'),\n function () use ($self) {\n return Recipe::mostPopular()->with('user', 'videos')\n ->whereNotIn('recipes.id', $self->receivedRecipes->all())\n ->take(config('kosher.pagination.home_popular_recipes'))\n ->get();\n }\n );\n\n $this->mergeReceivedRecipes($result);\n\n return $result;\n }",
"function getBestSellingLastWeek($week){\n global $db;\n \n $stmt=$db->prepare(\"SELECT `week`, sales.idItem, inventory.`name`, SUM(sales.amount) AS totalAmount FROM sales INNER JOIN inventory ON sales.idItem=inventory.idItem WHERE `week` = 1 GROUP BY sales.idItem ORDER BY totalAmount DESC;\");\n \n $binds = array(\n \":week\" => $week\n );\n \n $results=[];\n if($stmt->execute($binds) && $stmt->rowCount()>0){\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $results;\n }\n }",
"public function ListarProductosStockMinimo()\n{\n\tself::SetNames();\n\t$sql = \" select * from productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria WHERE productos.existencia <= productos.stockminimo\";\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}",
"public function findByPopular($limit) {\n $builder = $this->createQueryBuilder('m');\n\n $result = $builder->select('m, COUNT(o.id) as HIDDEN num')\n\n ->leftJoin('m.orders', 'o')\n ->groupBy('m.id')\n ->orderBy(\"num\", \"DESC\")\n ->setMaxResults($limit)\n ->getQuery()\n ->getResult();\n\n return $result;\n\n }",
"public function getTotalProducts()\n {\n $resource = $this->_productFactory->create()->getResource();\n \n $connection = $resource->getConnection();\n $select = $connection->select();\n $select->from(\n $resource->getTable('catalog_product_entity'),\n ['total_product' => 'count( entity_id )']\n )->where(\n 'vendor_id = :vendor_id'\n );\n $bind = ['vendor_id' => $this->getVendor()->getId()];\n \n $total = $connection->fetchOne($select, $bind);\n return $total;\n }",
"public function getNewProducts(){\n\t\t// get the products\n\t\t$products = $this->getProducts();\n\n\t\t$newProducts = [];\n\n\t\t// extract the 3 lastest sold items\n\t\tfor($i=0 ; $i < 3 ; $i++){\n\t\t\tarray_push($newProducts, array_pop($products));\n\t\t}\n\n\t\treturn $newProducts;\n\t}",
"public function ultimoProduto()\n {\n //$conexao = $c->conexao();\n\n $query = \"SELECT max(id)id FROM tbproduto c;\";\n $query = $this->conexao->query($query);\n $row = $query->fetch_assoc();\n\n return $row;\n }",
"function getMostAvailableProductByCategory($cat) {\r\n global $conn;\r\n $select = \"SELECT productid, name, image FROM product WHERE category='$cat' ORDER BY quantityavailable DESC LIMIT 1;\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}",
"public function findMostReviewed($count = 1)\n\t{\n\t\t$qb = $this->createQueryBuilder('m')\n\t\t->addSelect('COUNT(r.id) AS HIDDEN reviewCount')\n\t\t->leftJoin('m.reviews', 'r')\n\t\t->groupBy('m')\n\t\t->having('reviewCount > 0')\n\t\t->orderBy('reviewCount', 'DESC')\n\t\t->setMaxResults($count);\n\n\t\t$moives = $qb->getQuery()->getResult();\n\t\treturn $moives;\n\t}",
"public static function getAllSellPro()\n {\n return DB::table(static::$table)\n ->select('sell_product.*')\n ->where('is_deleted', ACTIVE)\n ->where('display', 0)\n ->where('display_top', 1)\n ->paginate(LIMIT_ITEM_PAGE); \n }",
"private function sortPopularProduct(){\n\t\t#\t- require_once Data selection file from model\n\t\trequire_once(APP_PATH . \"/models/Selections.php\");\n\t\t\n\t\t#\t- instanciate Selecttion class\n\t\t$db = new SelectionDB;\n\t\t// get all the unique number off db \n\t\t$items = $db->selectProductsId();\n\t\t\n\n\t\tfor($i=0; $i<5; $i++){\t\t\n\t\t\t// get random numbers\n\t\t\t$randomItem = rand(0,(count($items) - 1));\n\t\t\t\n\t\t\t// Convert item into string\n\t\t\t$item = implode($items[$randomItem]);\n\n\t\t\t// push it into $this->itmes property \n\t\t\tarray_push($this->items, $item);\n\t\t\t\n\t\t\t//remove item from an array\n\t\t\tarray_splice($items, $randomItem, 1);\n\t\t}\n\n\t\t// convert items array to string\n\t\t$string = implode(\",\", $this->items);\n\t\t\n\t\t// open text file in views folder\n\t\t$file = fopen($this->file, \"w\");\n\n\t\t\n\t\t// write all the items into text file separating by comma \n\t\tfwrite($file, $string);\n\n\t\t// Close the file\n\t\tfclose($file);\n\n\n\t}",
"public function getMostPopularItems($category, $numResults)\n\t{\n\t\t\n\t}",
"public function getTop10Products($start = '2020-01-01', $end = '2021-12-31', $source = 'internal'){\n if ($source == 'internal') {\n $this->db->query('SELECT new_order_items.product_id,\n SUM(new_order_items.quantity) as total_quantity\n FROM new_order_items\n RIGHT JOIN new_customer_orders on\n new_customer_orders.order_id = new_order_items.order_id\n WHERE new_customer_orders.ordered_at >= :start and new_customer_orders.ordered_at <= :end and new_customer_orders.order_status = \"PENDING\"\n GROUP BY new_order_items.product_id\n ORDER BY total_quantity DESC\n LIMIT 10\n ;');\n } else if ($source == 'external') {\n $this->db->query('SELECT product_id,\n SUM(order_quantity) as total_quantity\n FROM new_external_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY product_id\n ORDER BY total_quantity DESC\n LIMIT 10\n ;');\n }\n $this->db->bind(':start', $start);\n $this->db->bind(':end', $end);\n $results = $this->db->resultSet();\n return $results;\n }",
"public function swc_best_sellers_product_args( $args ) {\n\t\t$title \t\t\t\t\t= get_theme_mod( 'swc_homepage_best_sellers_products_title', __( 'On sale Products', 'storefront-woocommerce-customiser' ) );\n\t\t$columns \t\t\t\t= get_theme_mod( 'swc_homepage_best_sellers_products_columns', '4' );\n\t\t$limit \t\t\t\t\t= get_theme_mod( 'swc_homepage_best_sellers_products_limit', '4' );\n\n\t\t$args['title']\t\t\t= $title;\n\t\t$args['columns'] \t\t= $columns;\n\t\t$args['limit'] \t\t\t= $limit;\n\n\t\treturn $args;\n\t}",
"function bestTimeToBuyAndSellStock($arr) {\n $len = count($arr);\n $minPrice = 999;\n $maxPro = 0;\n for ($i=0; $i<$len; $i++) {\n $minPrice = min($minPrice, $arr[$i]);\n $maxPro = max($maxPro, $arr[$i] - $minPrice);\n }\n return $maxPro;\n}",
"function getBestProductByCategory($cat) {\r\n global $conn;\r\n $select = \"SELECT productid, name, image FROM product WHERE category='$cat' ORDER BY quantitysold DESC LIMIT 1;\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}",
"public function relatedProducts (){\n #reviews...\n $product= Product::with('reviews')\n ->whereIndumentariaId($this->indumentaria->id)\n ->where('id', '!=', $this->id)\n ->where('status', Product::PUBLISHED)\n ->latest()\n ->limit(6)\n ->get();\n return $product;\n }",
"public function getMostPopularCourses()\n {\n $result = $this\n ->_model\n ->orderBy('view_counter', 'desc')\n ->get();\n\n return $result;\n }",
"public function getProductCount()\n {\n return count($this->products);\n }",
"public function getNbProd()\n {\n return $this->CollProduit->taille();\n }",
"function update_best_selling($cart_id){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$sql = \" select * from tbl_cart_item where id = $cart_id \";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ($result = mysql_query($sql)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\twhile ($row = mysql_fetch_array($result)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$bestselling = get_field(\"tbl_product\", \"bestselling\", $row[product_id]);\n\t\t\t\t\t\t\t\t\t\t\t$bestselling++;\n\t\t\t\t\t\t\t\t\t\t\tset_field_data(\"tbl_product\", \"bestselling\", $row[product_id], $bestselling);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"function alchemists_get_products_per_page(){\n\n global $woocommerce;\n\t$per_page = get_option( 'wc_glt_count', '6,12,24' );\n\n\t$per_page_array = array();\n\t$per_page_array = explode( ',', $per_page );\n\n $default = $per_page_array[0];\n $count = $default;\n $options = alchemists_get_products_per_page_options();\n\n // capture form data and store in session\n if(isset($_POST['alchemists-woocommerce-products-per-page'])){\n\n // set products per page from dropdown\n $products_max = intval($_POST['alchemists-woocommerce-products-per-page']);\n if($products_max != 0 && $products_max >= -1){\n\n \tif(is_user_logged_in()){\n\n\t \t$user_id = get_current_user_id();\n\t \t$limit = get_user_meta( $user_id, '_product_per_page', true );\n\n\t \tif(!$limit){\n\t \t\tadd_user_meta( $user_id, '_product_per_page', $products_max);\n\t \t}else{\n\t \t\tupdate_user_meta( $user_id, '_product_per_page', $products_max, $limit);\n\t \t}\n \t}\n\n $woocommerce->session->jc_product_per_page = $products_max;\n return $products_max;\n }\n }\n\n // load product limit from user meta\n if(is_user_logged_in() && !isset($woocommerce->session->jc_product_per_page)){\n\n $user_id = get_current_user_id();\n $limit = get_user_meta( $user_id, '_product_per_page', true );\n\n if(array_key_exists($limit, $options)){\n $woocommerce->session->jc_product_per_page = $limit;\n return $limit;\n }\n }\n\n // load product limit from session\n if(isset($woocommerce->session->jc_product_per_page)){\n\n // set products per page from woo session\n $products_max = intval($woocommerce->session->jc_product_per_page);\n if($products_max != 0 && $products_max >= -1){\n return $products_max;\n }\n }\n\n return $count;\n}",
"public function getLatestAcer(){\n\t\t$sql = \"SELECT * FROM tbl_product WHERE brandId='8' ORDER BY pid DESC LIMIT 1\";\n\t\t$result = $this->db->select($sql);\n\t\treturn $result;\n\t}",
"function calcMaxPage($totalNoOfProducts,$noOfProductBoxesPerPage){\n\n // h max page (an spasw to result set twn proiontwn se 3-ades)\n // to indexing moy ksekina apo to 0 \n $maxPage = (floor($totalNoOfProducts / $noOfProductBoxesPerPage)) - 1;\n \n // to plhthos twn proiontwn sthn teleutai selida\n $numberOfProductsInLastPage = $totalNoOfProducts % $noOfProductBoxesPerPage;\n \n // an sto telos tou result set exw ypoloipo, exw allh mia skarth selida\n if ($numberOfProductsInLastPage > 0){\n \n $maxPage = $maxPage + 1;\n }\n \n return $maxPage;\n }",
"public static function getMostSelledProducts(string $date_from, string $date_to){\n\t\t$response = \\DB::table('sales')\n\t\t\t\t\t\t->leftJoin('sale_details', 'sales.id', '=', 'sale_details.sale_id')\n\t\t\t\t\t\t->whereBetween('sales.created_at', array($date_from, $date_to))\n\t\t\t\t\t\t->select(\\DB::raw('count(`sale_details`.`product_code`) as total_selled, `sale_details`.`product_code`'))\n\t\t\t\t\t\t->groupBy('sale_details.product_code')\n\t\t\t\t\t\t->orderBy('total_selled', 'asc')\n\t\t\t\t\t\t->limit(10)\n\t\t\t\t\t\t->get();\n\t\treturn $response;\n\t}",
"public function swc_homepage_best_sellers_products_view_more() {\n\t\t$url = get_theme_mod( 'swc_homepage_best_sellers_products_more_url', '' );\n\n\t\tif ( '' != $url ) {\n\t\t\techo '<p class=\"clearfix view-more\"><a href=\"' . esc_url( $url ) . '\" class=\"button alt alignright\">' . __( 'View more best selling products', 'storefront-woocommerce-customiser' ) . '</a></p>';\n\t\t}\n\t}",
"public function getMaxPrice()\n\n {\n\n return $this->maxPrice;\n }",
"function getTopGoTerms($ref_gf_id, $n_max) {\n $top_gos = array(\"BP\"=>array(), \"MF\"=>array(), \"CC\"=>array());\n $query\t\t= \"SELECT gf_fd.`name`, fd.`desc`, fd.`info` FROM `gf_functional_data` gf_fd, `functional_data` fd WHERE gf_fd.`gf_id`='\" . $ref_gf_id . \"' AND gf_fd.`type`='go' AND gf_fd.`is_hidden`='0' AND fd.`name`=gf_fd.`name` ORDER BY gf_fd.`f_score` DESC\";\n $res\t\t= $this->query($query);\n foreach($res as $r) {\n $go_aspect = $r['fd']['info'];\n $go_name = $r['gf_fd']['name'];\n $go_desc = $r['fd']['desc'];\n if(count($top_gos[$go_aspect]) < $n_max){\n $top_gos[$go_aspect][] = array(\"name\"=>$go_name, \"desc\"=>$go_desc);\n }\n }\n $top_gos = array_filter($top_gos);\n return $top_gos;\n }",
"public function getProducts($limit){\n \t$p = array(\n 'title' => 'Spinning Top',\n 'shortdesc' => 'Hours of fun await with this colorful spinning top. Includes flashing colored lights.',\n 'price' => '3.99',\n 'quantity' => $limit\n );\n return $p;\n }",
"function opdsNewest()\n{\n global $app, $globalSettings;\n\n $filter = getFilter();\n $just_books = $app->calibre->last30Books($globalSettings['lang'], $globalSettings[PAGE_SIZE], $filter);\n $books1 = [];\n foreach ($just_books as $book) {\n $record = $app->calibre->titleDetailsOpds($book);\n if (!empty($record['formats'])) {\n array_push($books1, $record);\n }\n }\n $books = array_map('checkThumbnailOpds', $books1);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->newestCatalog(null, $books, false);\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}",
"public function getPriceMaxForCategoryProducts($model)\n {\n return Product::join('product_prices', function ($join) use($model) {\n $join->on('products.id', '=', 'product_prices.product_id')\n ->where('product_prices.user_type_id', '=', $model->userTypeId);\n })->join('product_category', function ($query) use ($model) {\n $query->on('products.id', '=', 'product_category.product_id')\n ->where('product_category.category_id', '=', \"\". $model->currentCategory->id . \"\");\n })->whereIsVisible(true)->max('price');\n }",
"function get_products_for_damage() {\r\n return $this->DBObject->readCursor(\"product_actions.get_products_for_damage\", null);\r\n }",
"function qode_woocommerce_products_per_page() {\n\t\treturn 12;\n\t}",
"public function getProductTopList($query)\n {\n $prevPeriod = $this->getPrevDatePeriod($query['startDate'], $query['endDate']);\n\n DB::enableQueryLog();\n // execute\n $query = DB::connection('marketplace')\n ->table('orderlines')\n ->join('orderline_statuses','orderlines.orderline_status_id','orderline_statuses.id')\n ->join('products', 'orderlines.product_id', '=', 'products.id')\n ->select(DB::raw('products.id, products.name, count(*), sum(quantity) as sums, sum(orderlines.subtotal) as value'))\n ->where('orderlines.created_at', '>=', $query['startDate'])\n ->where('orderlines.created_at', '<=', $query['endDate'])\n ->where('orderline_statuses.name', '=', $this->successStatus)\n ->groupBy('products.id')\n ->orderByRaw('sums desc, products.name asc')\n ->limit(5);\n\n $product = $query\n ->get();\n\n for($i=0; $i<count($product); $i++) {\n $countData = DB::connection('marketplace')\n ->table('orderlines')\n ->join('orderline_statuses','orderlines.orderline_status_id','orderline_statuses.id')\n ->join('products', 'orderlines.product_id', '=', 'products.id')\n ->join('stores', 'orderlines.store_id', '=', 'stores.id')\n ->where('orderlines.created_at', '>=', $prevPeriod['startDate'])\n ->where('orderlines.created_at', '<=', $prevPeriod['endDate'])\n ->where('orderline_statuses.name', '=', $this->successStatus)\n ->where('products.id', '=', $product[$i]->id)\n ->count();\n if($countData) {\n $prevData = DB::connection('marketplace')\n ->table('orderlines')\n ->join('orderline_statuses','orderlines.orderline_status_id','orderline_statuses.id')\n ->join('products', 'orderlines.product_id', '=', 'products.id')\n ->join('stores', 'orderlines.store_id', '=', 'stores.id')\n ->select(DB::raw('count(*), sum(quantity) as sums, sum(orderlines.subtotal) as value'))\n ->where('orderlines.created_at', '>=', $prevPeriod['startDate'])\n ->where('orderlines.created_at', '<=', $prevPeriod['endDate'])\n ->where('orderline_statuses.name', '=', $this->successStatus)\n ->where('products.id', '=', $product[$i]->id)\n ->get();\n } else {\n $prevData = array();\n }\n if(count($prevData) != 0) {\n $product[$i]->count_change = (string) ($product[$i]->count - $prevData[0]->count);\n $product[$i]->sum_change = (string) ($product[$i]->sums - $prevData[0]->sums);\n $product[$i]->value_change = (string) ($product[$i]->value - $prevData[0]->value);\n } else {\n $product[$i]->count_change = (string) 0;\n $product[$i]->sum_change = (string) 0;\n $product[$i]->value_change = (string) 0;\n }\n }\n\n $data = array();\n $data['product'] = $product;\n $status = $this->setStatus();\n\n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]);\n }",
"public function getMaxItems() {\n\t\t$q = $this->bdd->prepare('SELECT count(1) FROM items');\n\t\t$q->execute();\n\t\treturn intval($q->fetch(PDO::FETCH_COLUMN));\n\t}",
"public function basket_statistics()\n\t{\n\t\t$sql = $this->pdo->prepare(\"SELECT * FROM `user_statistics` ORDER by sum_price desc limit 3\");\n\t\t$sql->execute();\n\t\t$row = $sql->fetchAll(PDO::FETCH_OBJ);\n\t\treturn $row;\n\t}",
"function getMaxprice(){\r\n $q = \"SELECT * FROM maximum\";\r\n $result = $this->query($q);\r\n return $result;\r\n }",
"function setwood_popular_products( $args ) {\n\n if ( is_woocommerce_activated() ) {\n\n $args = apply_filters( 'setwood_popular_products_args', array(\n 'limit' => 4,\n 'columns' => 4,\n 'title' => __( 'Fan Favorites', 'setwood' ),\n ) );\n\n echo '<section class=\"setwood-product-section setwood-popular-products\">';\n\n do_action( 'setwood_homepage_before_popular_products' );\n\n echo '<h2 class=\"section-title\">' . wp_kses_post( $args['title'] ) . '</h2>';\n\n do_action( 'setwood_homepage_after_popular_products_title' );\n\n echo setwood_do_shortcode( 'top_rated_products', array(\n 'per_page' => intval( $args['limit'] ),\n 'columns' => intval( $args['columns'] ),\n ) );\n\n do_action( 'setwood_homepage_after_popular_products' );\n\n echo '</section>';\n }\n }"
] | [
"0.7582982",
"0.7498848",
"0.71561944",
"0.69956684",
"0.6806291",
"0.675018",
"0.66137046",
"0.65906835",
"0.6473135",
"0.64597464",
"0.63842136",
"0.63748246",
"0.6347561",
"0.6285435",
"0.62667745",
"0.6223408",
"0.6223272",
"0.61933804",
"0.61716205",
"0.61368245",
"0.6132722",
"0.6132544",
"0.6102644",
"0.60840285",
"0.60741144",
"0.6065491",
"0.60083145",
"0.59681255",
"0.59544903",
"0.5910687",
"0.5904798",
"0.5900593",
"0.5894275",
"0.5883499",
"0.5847263",
"0.5812071",
"0.57726663",
"0.57688075",
"0.57662624",
"0.57303655",
"0.5707031",
"0.57024986",
"0.5674418",
"0.5673465",
"0.5668586",
"0.56656605",
"0.5653442",
"0.5653121",
"0.56423247",
"0.56407094",
"0.56355137",
"0.5624258",
"0.5616178",
"0.5613342",
"0.5609938",
"0.56095743",
"0.5598147",
"0.5593348",
"0.5582566",
"0.5577666",
"0.5575564",
"0.5572969",
"0.55685735",
"0.5559306",
"0.5555745",
"0.5551653",
"0.5550264",
"0.5543828",
"0.55347687",
"0.5532661",
"0.55174804",
"0.5510358",
"0.5495249",
"0.5495248",
"0.54887855",
"0.5486049",
"0.5452339",
"0.54503447",
"0.5432931",
"0.54305553",
"0.54250735",
"0.5422501",
"0.5414486",
"0.5414252",
"0.5402011",
"0.5401467",
"0.53974694",
"0.5395309",
"0.5394934",
"0.5392685",
"0.5389109",
"0.53840053",
"0.53826433",
"0.5378369",
"0.5371558",
"0.5370324",
"0.5361206",
"0.5356256",
"0.5354927",
"0.5349247"
] | 0.74315476 | 2 |
Define if announcement can be dismissed | public function setDismissable($bool)
{
$this->dismissable = $bool;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isDismissible(): bool\n {\n return $this->dismissible;\n }",
"protected function isStatusDismissed()\n {\n return $this->getStatus() === self::STATUS_DISMISSED;\n }",
"function canDismiss($user) {\n \treturn $this->getUserId() == $user->getId();\n }",
"public function isMissed(): bool\n {\n return $this->status == 'missed';\n }",
"public function shouldHide() {\n // \"alice set this event to repeat weekly.\" event in normal circumstances\n // anyway.\n return true;\n }",
"function isDenied() {\n return !empty($this->denied_reasons);\n }",
"public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}",
"function stackable_add_in_notification_dismissed( $id ) {\n $dismissed = get_option( 'stackable_notifications_dismissed' );\n if ( empty( $dismissed ) ) {\n $dismissed = array();\n }\n if ( ! in_array( $id, $dismissed ) ) {\n $dismissed[] = $id;\n }\n\t\tupdate_option( 'stackable_notifications_dismissed', $dismissed );\n\t}",
"public function canBeDeclined()\n {\n return $this->isAwaitingFee();\n }",
"function isRedeemed() {\n // we get if it wasn't used yet\n return $this->getUsed_at() != '';\n }",
"public function getDismiss()\n {\n return $this->get(self::_DISMISS);\n }",
"public function declined()\n\t{\n\t\treturn !$this->approved();\n\t}",
"public function isEmbargoed();",
"public function authorize()\n {\n return !Cache::has('announcement');\n }",
"public function isDeclined(): bool;",
"public function isRejected() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->rejectionDate) ? false: true;\r\n\t}",
"function stackable_ajax_dismiss_notice() {\n if ( empty( $_POST['id'] ) || empty( $_POST['nonce'] ) ) { // Input var: okay.\n wp_die();\n }\n\n // Security check.\n if ( ! wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'stackable_dismiss_notice' ) ) { // Input var: okay.\n wp_die();\n }\n\n\t\t$id = sanitize_text_field( wp_unslash( $_POST['id'] ) ); // Input var: okay.\n\t\tstackable_add_in_notification_dismissed( $id );\n\n wp_die();\n }",
"public function isIndefinied(){\n return !$this->expires_on;\n }",
"protected function _fcpoMandateAcceptanceNeeded() \n {\n $aMandate = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoMandate');\n if($aMandate && array_key_exists('mandate_status', $aMandate) !== false && $aMandate['mandate_status'] == 'pending') {\n if(array_key_exists('mandate_text', $aMandate) !== false) {\n return true;\n }\n }\n return false;\n }",
"public function getIsReject()\n\t{\n\t return $this->isReject;\n\t}",
"public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }",
"public function isRejected()\n {\n return ($this->slug == \"afgekeurd\");\n }",
"protected function maybe_show_donation_message() {\n\t\t// Only show the message to plugin admins\n\t\tif ( ! current_user_can( 'iggogrid_edit_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! IggoGrid::$model_options->get( 'message_donation_nag' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// How long has the plugin been installed?\n\t\t$seconds_installed = time() - IggoGrid::$model_options->get( 'first_activation' );\n\t\treturn ( $seconds_installed > 30*DAY_IN_SECONDS );\n\t}",
"public function getHasBeenRejectedBefore(): bool;",
"public function isCancelable()\n {\n\t\treturn !in_array($this->status, [self::STATUS_COMPLETED, self::STATUS_CANCELED]);\n }",
"public function testTwoCancelledNoDisagreedIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountConfirmedDisagreed' => 2,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\t$result\n\t\t);\n\t}",
"public function wcfm_wcfmgs_inactive_notice() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// check if it has already been dismissed\n\t\t$offer_key = 'wcfm_wcfmgs_inactive15042019';\n\t\t$hide_notice = get_option( $offer_key . '_tracking_notice', 'no' );\n\n\t\tif ( 'hide' == $hide_notice ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$offer_msg = __( '<h2>\n\t\t\t\t\t\t\t\t\t\t Do you want to have different capabilities for each membership levels !!!\n\t\t\t\t\t\t\t\t\t\t </h2>', 'wc-frontend-manager' );\n\t\t/*$offer_msg = sprintf( __( '<h2>\n\t\t\t\t\t\t\t\t\t\t Happy New Year! It\\'s time to grab your best deals ...\n\t\t\t\t\t\t\t\t </h2>', 'wc-frontend-manager' ) );*/\n\t\t/*$offer_msg = sprintf( __( '<h2>\n\t\t\t\t\t\t\t\t\t\t Hey, it\\'s our Birth Day! It\\'s time to grab your best deals ...\n\t\t\t\t\t\t\t\t </h2>', 'wc-frontend-manager' ) );*/\n\t\t\n\t\t$offer_msg .= __( '<p>WCFM - Groups & Staffs will empower you to set up totaly different capability rules for your each membership levels very easily.</p>', 'wc-frontend-manager' );\n\t\t?>\n\t\t\t<div class=\"notice is-dismissible wcfm_addon_inactive_notice_box\" id=\"wcfm-groups-sttafs-notice\">\n\t\t\t\t<img src=\"https://ps.w.org/wc-multivendor-membership/assets/icon-128x128.jpg?rev=1804240\" alt=\"\">\n\t\t\t\t<?php echo $offer_msg; ?>\n\t\t\t\t<span class=\"dashicons dashicons-groups\"></span>\n\t\t\t\t<a href=\"http://wclovers.com/product/woocommerce-frontend-manager-groups-staffs/\" class=\"button button-primary promo-btn\" target=\"_blank\"><?php _e( 'WCFM GS >>', 'wc-frontend-manager' ); ?></a>\n\t\t\t</div>\n\n\t\t\t<script type='text/javascript'>\n\t\t\t\tjQuery('body').on('click', '#wcfm-groups-sttafs-notice .notice-dismiss', function(e) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\twp.ajax.post('wcfm-dismiss-addon-inactive-notice', {\n\t\t\t\t\t\twcfm_wcfmgs_inactive: true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t<?php\n\t}",
"public function isVacationAutoResponder()\n {\n // has 'auto-submitted' header?\n if ($this->headers->has('auto-submitted')) {\n return true;\n }\n\n // return true if 'x-vacationmessage' is set and not empty\n if (!$this->headers->has('x-vacationmessage')) {\n return false;\n }\n\n return $this->headers->get('x-vacationmessage') != '';\n }",
"public function canBeCanceled()\n\t{\n\t\t$flight_at = Carbon::createFromFormat('Y-m-d H:i:s', $this->flight_at);\n if ($flight_at->subMinute(config('flight.enable_cancel'))->isFuture()) {\n return true;\n }\n else {\n\t\t\treturn false;\n }\n\t}",
"public function accept_button_is_hidden_when_post_is_already_answered()\n {\n $comment = factory(\\App\\Comment::class)->create();\n $comment->markAsAnswer();\n\n $this->actingAs($comment->post->user);\n\n $this->visit($comment->post->url);\n\n $this->dontSee('Aceptar respuesta');\n\n\n\n }",
"public function isRedelivered();",
"public function isAutocreateNotification()\n {\n return (1 == $this->getConfig('autocreate/autocreate_notify'));\n }",
"public function isRespond()\n {\n return null !== $this->accepted;\n }",
"function notification_ignore() {\n\n $ignore_key = CUSTOM_LOGIN_OPTION . '_ignore_announcement';\n\n // Bail if not set\n if ( ! isset( $_GET[ $ignore_key ] ) ) {\n return;\n }\n\n // Check nonce\n check_admin_referer( $ignore_key, $ignore_key );\n\n // If user clicks to ignore the notice, add that to their user meta\n add_user_meta( get_current_user_id(), $ignore_key, 1, true );\n }",
"public function isNotifyTypeDismissableForCategory( $category, $notifyType ) {\n\t\treturn !(\n\t\t\tisset( $this->categories[$category]['no-dismiss'] ) &&\n\t\t\t(\n\t\t\t\tin_array( 'all', $this->categories[$category]['no-dismiss'] ) ||\n\t\t\t\tin_array( $notifyType, $this->categories[$category]['no-dismiss'] )\n\t\t\t)\n\t\t);\n\t}",
"public function testOneCancelledOneDisagreedIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountDisagreed' => 1,\n\t\t\t'getCountConfirmedDisagreed' => 1,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\t$result\n\t\t);\n\t}",
"public function testTwoDisagreedNoCancelledIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountDisagreed' => 2,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\t$result\n\t\t);\n\t}",
"function ajan_use_embed_in_activity_replies() {\n\treturn apply_filters( 'ajan_use_embed_in_activity_replies', !defined( 'AJAN_EMBED_DISABLE_ACTIVITY_REPLIES' ) || !AJAN_EMBED_DISABLE_ACTIVITY_REPLIES );\n}",
"public function isModerated()\n {\n return $this->accepted !== null;\n }",
"protected function isPending(){\n return parent::isStatusOf(STATUS_TYPE_SSS_COMMENT_PENDING);\n }",
"public function isNotDraft()\n {\n return ! $this->isDraft();\n }",
"public function isCanceled(): bool\n {\n return $this->status == 'canceled';\n }",
"public function isCanceled()\n {\n return static::STATUS_CANCELED == $this->getStatus();\n }",
"public function isSetConfirmDeadline()\n {\n return !is_null($this->_fields['ConfirmDeadline']['FieldValue']);\n }",
"function hideExhibit(){\n\t\t$this->setVisible('0');\n\t\t$res = requete_sql(\"UPDATE exhibit SET visible = '\".$this->visible.\"' WHERE id = '\".$this->id.\"' \");\n\t\tif ($res) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function isCancelled(){\n return (bool) $this->cancelled_on != null;\n }",
"public function isRejected(): bool {\n return $this->_state === self::STATE_REJECTED;\n }",
"public function getIsAccepted(): bool;",
"public function isDeletable();",
"public function isDeletable();",
"public function isDeletable();",
"public function isResponsible()\n {\n return false;\n }",
"function isDeclined() {\n return $this->getStatus() == UserpointsTransaction::STATUS_DECLINED;\n }",
"public function is_runnable()\n\t{\n\t\treturn (bool) $this->config['delete_pms_days'];\n\t}",
"public function check()\n {\n return empty($this->_vars['reason'])\n ? _(\"Missing reason in vacation.\")\n : true;\n }",
"public function ajax_dismiss_notice() {\n\t\t$notice = $_REQUEST['notice_id'];\n\n\t\tif ( $notice === 'feedback' ) {\n\t\t\tupdate_user_meta( get_current_user_id(), 'wpba/notice_disabled/feedback', true );\n\t\t}\n\n\t\twp_die();\n\t}",
"public function hiding_excerpts() {\n\t\treturn ! $this->showing_excerpts();\n\t}",
"public function isDeactivatedSometime()\n {\n $invoker = $this->getInvoker();\n \n return $invoker->{$this->_options['from']['name']} !== null \n || $invoker->{$this->_options['until']['name']} !== null;\n }",
"public function setDismiss(Down_GuildDismiss $value)\n {\n return $this->set(self::_DISMISS, $value);\n }",
"public function decline( $notes, $toggle ) {\n\t\t// not requested?\n\t\tif ( !$this->feedback->isRequested() ) {\n\t\t\t$this->error = 'articlefeedbackv5-invalid-feedback-state';\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->feedback->aft_decline = 1;\n\t\t$this->logId = $this->log( __FUNCTION__, $this->feedback->aft_page, $this->feedback->aft_id, $notes, $this->user );\n\n\t\treturn true;\n\t}",
"public function canBeCancelled(): bool\n {\n // we can cancel campaigns that still have draft messages, because they haven't been entirely dispatched\n // a campaign that doesn't have any more draft messages (i.e. they have all been sent) cannot be cancelled, because the campaign is completed\n\n if ($this->status_id === CampaignStatus::STATUS_SENT && $this->save_as_draft && $this->sent_count !== $this->messages()->count()) {\n return true;\n }\n\n return in_array($this->status_id, [CampaignStatus::STATUS_QUEUED, CampaignStatus::STATUS_SENDING], true);\n }",
"public function isDraft();",
"public function isDraft();",
"public function isDraft();",
"public function isTheExistingServiceContentStatusDeactivated(){\n \n if($this->isThereAnActivatedServiceContent()){\n if($this->isServiceContentDeactivationSuccessful()){\n return true;\n }else{\n return false;\n }\n \n }else{\n return true;\n }\n }",
"public function isDue()\n {\n return in_array($this->status, array(Invoice\\InvoiceStatus::DUE, Invoice\\InvoiceStatus::PAST_DUE));\n }",
"public function isDeletable(): bool\n {\n return true;\n }",
"public function isDosenPembimbing()\n {\n return $this->hasRole(HakAkses::DOSEN_PEMBIMBING);\n }",
"public function hasPressAnnouncement()\n {\n return $this->getXml()->getElementsByTagName('PressAnnouncement')->length;\n }",
"public function isUnread();",
"public function deleteAnnouncement(){\n $this->status = 0;\n $this->announcement = null;\n $this->save();\n }",
"public function isAccepted()\n {\n return !empty($this->acceptee_id);\n }",
"public function canDecline()\n {\n $user = $this->getUser();\n\n if (\n $this->getData('status') == Service\\BalanceWithdrawals::STATUS_PENDING &&\n $user->getData('role') == 'Admin'\n ) {\n return true;\n }\n\n return false;\n }",
"public function hasDecredExpiry()\n {\n return $this->decred_expiry !== null;\n }",
"public function isDue(): bool;",
"public function getDiscountCanceled();",
"public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}",
"public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }",
"function dismiss( $id, $feature_class ) {\n\t\t$this->tracking->record_user_event(\n\t\t\t'jitm_dismiss_client',\n\t\t\tarray(\n\t\t\t\t'jitm_id' => $id,\n\t\t\t\t'feature_class' => $feature_class,\n\t\t\t)\n\t\t);\n\n\t\t$hide_jitm = \\Jetpack_Options::get_option( 'hide_jitm' );\n\t\tif ( ! is_array( $hide_jitm ) ) {\n\t\t\t$hide_jitm = array();\n\t\t}\n\n\t\tif ( isset( $hide_jitm[ $feature_class ] ) ) {\n\t\t\tif ( ! is_array( $hide_jitm[ $feature_class ] ) ) {\n\t\t\t\t$hide_jitm[ $feature_class ] = array(\n\t\t\t\t\t'last_dismissal' => 0,\n\t\t\t\t\t'number' => 0,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t$hide_jitm[ $feature_class ] = array(\n\t\t\t\t'last_dismissal' => 0,\n\t\t\t\t'number' => 0,\n\t\t\t);\n\t\t}\n\n\t\t$number = $hide_jitm[ $feature_class ]['number'];\n\n\t\t$hide_jitm[ $feature_class ] = array(\n\t\t\t'last_dismissal' => time(),\n\t\t\t'number' => $number + 1,\n\t\t);\n\n\t\t\\Jetpack_Options::update_option( 'hide_jitm', $hide_jitm );\n\n\t\treturn true;\n\t}",
"function _getAnnouncementsEnabled($request) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}",
"public function isDeletable(): bool\n\t{\n\t\treturn 1 === $this->presence && $this->fieldModel->isEditable();\n\t}",
"public function canBeAccepted()\n {\n return $this->isReadyForIssuing();\n }",
"public function canCancel() {\n $today = Carbon::parse();\n $canCancelFrom = $this->start_date->addMonthsNoOverflow($this->package->commitment_period)->firstOfMonth();\n\n if($canCancelFrom->greaterThan($today) || !$this->hasExpired()) {\n return false;\n }\n\n return true;\n }",
"public function hasPromotionalEmailOptOut() {\n\t\treturn $this->promotionalEmailOptOut;\n\t}",
"public function hasPendingActions()\r\n {\r\n }",
"public function setAnnounce($v)\n\t{\n\n\t\tif ($this->announce !== $v || $v === false) {\n\t\t\t$this->announce = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::ANNOUNCE;\n\t\t}\n\n\t}",
"protected function hasRemainingDiscount()\n {\n return !$this->limited || $this->remaining > 0;\n }",
"public function isCanceled()\n {\n return $this->stateData['canceled'];\n }",
"public function is_interstitial_requested( $interstitial ) {\n\t\treturn in_array( $interstitial, $this->get_show_after(), true );\n\t}",
"public function isReply() {\n\t\treturn Utils::startsWith($this -> getSubject(), \"RE:\");\n\t}",
"public function flag( $notes, $toggle ) {\n\t\t$flag = $this->isSystemCall() ? 'autoflag' : 'flag';\n\t\t$this->feedback->{\"aft_$flag\"}++;\n\t\t$this->logId = $this->log( $flag, $this->feedback->aft_page, $this->feedback->aft_id, $notes, $this->isSystemCall() ? null : $this->user );\n\n\t\tglobal $wgArticleFeedbackv5HideAbuseThreshold;\n\n\t\t// auto-hide after [threshold] flags\n\t\tif ( $this->feedback->aft_flag + $this->feedback->aft_autoflag > $wgArticleFeedbackv5HideAbuseThreshold &&\n\t\t\t!$this->feedback->isHidden() ) {\n\t\t\t/*\n\t\t\t * We want to keep track of hides/unhides, but also autohides.\n\t\t\t * Feedback will be hidden when hide + autohide > unhide\n\t\t\t */\n\t\t\t$this->feedback->aft_hide = 1;\n\t\t\t$this->feedback->aft_autohide = 1;\n\t\t\t$this->log( 'autohide', $this->feedback->aft_page, $this->feedback->aft_id, 'Automatic hide', $this->user );\n\t\t}\n\n\t\treturn true;\n\t}",
"public function cancelled() : bool\n {\n return !is_null($this->ends_at) && $this->is_cancelled;\n }",
"public function isVoidVerb();",
"public function isCancelable(): bool;",
"public function isClosed() {\n return $this->status == 2;\n }",
"function _announcementIsValid(&$request, $announcementId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}",
"private function is_dismissed( $pointer_id ) {\n\n\t\t$dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );\n\n\t\treturn in_array( $pointer_id, $dismissed );\n\n\t}",
"public function unflag( $notes, $toggle ) {\n\t\tif ( $this->feedback->aft_flag <= 0 ) {\n\t\t\t$this->feedback->aft_autoflag = 0;\n\t\t} else {\n\t\t\t$this->feedback->aft_flag--;\n\t\t}\n\t\t$this->logId = $this->log( __FUNCTION__, $this->feedback->aft_page, $this->feedback->aft_id, $notes, $this->user );\n\n\t\tglobal $wgArticleFeedbackv5HideAbuseThreshold;\n\n\t\t// un-hide if autohidden & we don't have [threshold] flags anymore\n\t\tif ( $this->feedback->aft_flag + $this->feedback->aft_autoflag < $wgArticleFeedbackv5HideAbuseThreshold &&\n\t\t\t$this->feedback->aft_autohide ) {\n\t\t\t$this->feedback->aft_autohide = 0;\n\t\t\t$this->log( 'unhide', $this->feedback->aft_page, $this->feedback->aft_id, 'Automatic un-hide', $this->user );\n\t\t}\n\n\t\treturn true;\n\t}",
"public function cancelled()\n {\n return ! is_null($this->cancelledAt);\n }",
"public function noaction( $notes, $toggle ) {\n\t\tif (\n\t\t\t$this->feedback->isFeatured() ||\n\t\t\t$this->feedback->isResolved() ||\n\t\t\t$this->feedback->isNonActionable() ||\n\t\t\t$this->feedback->isInappropriate() ||\n\t\t\t$this->feedback->isArchived() ||\n\t\t\t$this->feedback->isHidden() ||\n\t\t\t$this->feedback->isOversighted()\n\t\t) {\n\t\t\t$this->error = 'articlefeedbackv5-invalid-feedback-state';\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->feedback->aft_feature = 0;\n\t\t$this->feedback->aft_resolve = 0;\n\t\t$this->feedback->aft_noaction = 1;\n\t\t$this->feedback->aft_inappropriate = 0;\n\t\t$this->feedback->aft_archive = 0;\n\t\t$this->feedback->aft_hide = 0;\n\t\t$this->feedback->aft_oversight = 0;\n\n\t\t$this->logId = $this->log( __FUNCTION__, $this->feedback->aft_page, $this->feedback->aft_id, $notes, $this->user );\n\n\t\treturn true;\n\t}"
] | [
"0.70370185",
"0.6456746",
"0.6104604",
"0.59166163",
"0.56528807",
"0.5602168",
"0.5566911",
"0.55319244",
"0.5515312",
"0.54751027",
"0.54587114",
"0.5443661",
"0.5419922",
"0.5388675",
"0.53861773",
"0.5378653",
"0.5345419",
"0.5343759",
"0.53398",
"0.5325782",
"0.5294116",
"0.5289375",
"0.5271708",
"0.52642006",
"0.5261749",
"0.5240423",
"0.52314204",
"0.52287173",
"0.5205041",
"0.51934123",
"0.5189273",
"0.5179177",
"0.51714534",
"0.5165671",
"0.516283",
"0.5159686",
"0.51583415",
"0.51525533",
"0.5149973",
"0.5147152",
"0.5145175",
"0.5144595",
"0.5130423",
"0.51293254",
"0.51287127",
"0.51276004",
"0.5121014",
"0.5109403",
"0.5105283",
"0.5105283",
"0.5105283",
"0.51042396",
"0.50923514",
"0.50874144",
"0.50838906",
"0.5075953",
"0.50750923",
"0.50721526",
"0.5071655",
"0.50706184",
"0.50429535",
"0.5040639",
"0.5040639",
"0.5040639",
"0.5040038",
"0.50397617",
"0.50385004",
"0.50360996",
"0.5032577",
"0.50298166",
"0.5020693",
"0.5012762",
"0.50103235",
"0.5008682",
"0.5007087",
"0.500621",
"0.5001157",
"0.4999518",
"0.49979997",
"0.49849474",
"0.4983168",
"0.49830064",
"0.4971908",
"0.4964083",
"0.49609673",
"0.49574742",
"0.4955441",
"0.49506304",
"0.49500844",
"0.4946938",
"0.49440494",
"0.49429056",
"0.4939244",
"0.49391693",
"0.49268305",
"0.4926532",
"0.49265015",
"0.49254492",
"0.49229097",
"0.49193835"
] | 0.5229823 | 27 |
Set the name of this announcement | public function setName($name)
{
if (!is_string($name)) {
throw new Exception('Name must be a string');
}
$this->name = preg_replace("/[^a-zA-Z0-9_]+/", "", $name);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name) {\n\t\t$this->_name = $name;\n\t}",
"function set_name($name) {\n $this->name = $name;\n }",
"public function setName($name)\n\t{\n\t\t$this->_name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->_name = $name;\n\t}",
"public function setName($name) \n {\n $this->_name = $name; \n }",
"public function setName( $name ) {\n\t\t$this->mName = $name;\n\t}",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\r\n\t\t$this->name = $name;\r\n\t}",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\r\n {\r\n $this->name = $name;\r\n }",
"public function setName( $name)\n {\n $this->name = $name;\n }",
"public function setName($name) \n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->_name = (string)$name;\n }",
"public function setName( string $name ) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name){\n \n $this->name = $name;\n \n }",
"public function SetName ($name);",
"function setName($name) {\n $this->name = $name;\n }",
"protected function setName(string $name)\r\n\t{\r\n\t\t$this->name = $name;\r\n\t}",
"public function setName($name) {\n\t\t$this->_name = (string)$name;\n\t}",
"public function setName($name){\n $this->_name = $name;\n }",
"public function setName($name){\n\t\t$this->name = $name;\n\t}",
"public function setName($name){\n\t\t$this->name = $name;\n\t}",
"public function setName(string $name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->setValue('name', $name);\n }",
"public function setName(string $name)\n\t{\n\t\t$this->name = $name;\n\t}",
"protected function setName(string $name) {\n $this->name = $name;\n }",
"public function set_name( $name ) {\n\t\t$this->set_prop( 'name', $name );\n\t}",
"public function setName(string $name) {\n\n $this->name = $name;\n\n }",
"public function setName( $name )\n\t{\n\t\t$this->setAttribute( \"name\", $name );\n\t}",
"public function setName( $name )\n\t{\n\t\t$this->setAttribute( \"name\", $name );\n\t}",
"public function setName($name){\n $this->__set('name',$name);\n }",
"public function set_name($name)\n {\n }",
"public function setName($name)\n {\n $this->name = $name;\n\n \n }",
"public function setName(string $name) : void\n {\n $this->name = $name;\n }",
"public static function setName($name)\n\t{\n\t\tself::$name = $name;\n\t}",
"private function setName($name) {\n if (is_string($name)) {\n $this->name = $name;\n }\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName(string $name): void\n {\n $this->name = $name;\n }",
"public function setName ($name){\n\t\tif($name){\n\t\t\t$this->Item['name'] = substr($name, 0,100);\n\t\t}\n\t}",
"public function set_name($name);"
] | [
"0.7500354",
"0.7500354",
"0.7500354",
"0.7500354",
"0.7474437",
"0.7439988",
"0.74163663",
"0.7408417",
"0.7408417",
"0.74000436",
"0.73983645",
"0.739825",
"0.739825",
"0.739825",
"0.739825",
"0.739825",
"0.739825",
"0.7396046",
"0.73900473",
"0.73725706",
"0.73725706",
"0.73725706",
"0.73725706",
"0.73725706",
"0.73725706",
"0.73725706",
"0.73725706",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.7370282",
"0.73525196",
"0.73491067",
"0.73449934",
"0.73442245",
"0.7335773",
"0.73302597",
"0.73302597",
"0.73302597",
"0.73302597",
"0.73302597",
"0.73302597",
"0.73302597",
"0.73001784",
"0.7293841",
"0.72896063",
"0.7286224",
"0.7277594",
"0.7271747",
"0.72655416",
"0.72655416",
"0.7249786",
"0.7246082",
"0.72383255",
"0.72337043",
"0.72267914",
"0.72179514",
"0.717911",
"0.717911",
"0.7160021",
"0.71175265",
"0.711251",
"0.7104354",
"0.7091812",
"0.7089807",
"0.7059204",
"0.7059204",
"0.7059204",
"0.7059204",
"0.7059204",
"0.7059204",
"0.7059204",
"0.70577055",
"0.70558685"
] | 0.0 | -1 |
Set the title of this announcement | public function setTitle($title)
{
$this->title = $title;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"public function setTitle($title) {\r\n $this->title = $title;\r\n }",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"public function setTitle($title)\n {\n $this->_title = $title;\n }",
"public function setTitle($title)\n {\n $this->_title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title;\n }",
"public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title){\n $this->title = $title;\n }",
"public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title ;\n }",
"public function setTitle($title = '')\n {\n $this->title = $title;\n }",
"function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}",
"function setTitle($title) {\n\t\t$this->_title = $title;\n\t}",
"function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function set_title($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}",
"public function setTitle($title)\n {\n $this->title = (string) $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($newTitle) { $this->Title = $newTitle; }",
"function setTitle($title)\n {\n $this->m_title = $title;\n }",
"function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}",
"function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}",
"protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}",
"public function setTitle($title){\n \t$this->title = $title;\n }",
"public function setTitle($title){\n $this->p_title = $title;\n }",
"public function set_title($title){\n\t\t$this->set_channel_element('title', $title);\n\t}",
"public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }",
"public function setTitle($title)\n\t{\n\t\tif (!empty($title)) {\n\t\t\t$this->title = $title;\n\t\t}\n\t}",
"public function setTitle(string $title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title)\n {\n $this->setChannelElement('title', $title);\n }",
"public function setTitle($title)\n {\n $this->setValue('title', $title);\n }",
"function setTitle( $title )\n {\n $title = trim( $title );\n $this->properties['TITLE'] = $title;\n }",
"public function setTitle($value)\n {\n $this->_title = $value;\n }",
"function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}",
"public function setTitle($var)\n {\n $this->_title = $var;\n }",
"public function setTitle(string $title)\n {\n $this->title = $title;\n }",
"public function setTitle(string $title)\n {\n $this->title = $title;\n }",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function set_title($title)\n {\n $this->set_default_property(self::PROPERTY_TITLE, $title);\n }",
"public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }",
"public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }",
"public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }",
"public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }",
"public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }",
"public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }",
"public function setTitle($title) {\n\t\t$this->addChannelTag('title', $title);\n\t}",
"public function setTitle(string $title): void\n {\n $this->_title = $title;\n }",
"public function setTitle($value)\n {\n $this->title = $value;\n }",
"function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }",
"public function setTitle(string $title): void {\n\t\t$this->m_title = $title;\n\t}",
"public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}",
"public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}",
"public function set_title($text){\n $this->title=$text;\n }",
"public function set_pagetitle($title)\n {\n $this->pagetitle = $title;\n }",
"public function setTitle(string $title): void\n {\n $this->title = $title;\n }",
"public function setTitle(string $title): void\n {\n $this->title = $title;\n }",
"public function setTitle(string $title): void\n {\n $this->title = $title;\n }",
"public function setTitle(string $title): void\n {\n $this->title = $title;\n }",
"function set_the_title($title) {\n\n md_set_the_title($title);\n \n }",
"public static function setTitle(string $title) {}",
"public function setTitle(string $title)\n {\n if (strlen($title) > 3) {\n $this->title = $title;\n }\n }",
"public function setTitle(string $title);",
"public function setTitle($title)\n {\n if(strlen($title) <= 50 && strlen($title) > 0 && preg_match('#^[a-zA-Z0-9- ]*$#', $title)) {\n $this->title = $title;\n }\n }",
"function SetTitle($title, $isUTF8 = false) {\n parent::SetTitle($title, $isUTF8);\n $this->title = ($isUTF8 ? utf8_encode($title) : $title);\n }",
"public function setTitle($title) {\n\t\t$title = str_replace(\"\\r\\n\", \"|\", $title);\n\t\t$title = str_replace(\" \", \"+\", $title);\n\t\t$this -> setProperty('chtt', $title);\n\t}",
"function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\n\t\tif($this->pageInitialized)\n\t\t{\n\t\t\t$titleElement = $this->document->getElementsByTagName('title')->item(0);\n\t\t\t$titleElement->clear();\n\t\t\t$titleElement->loadHtml($title);\n\t\t}\n\t}",
"private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }",
"public function set_name($title)\n {\n if (!empty($title)) {\n $this->title = Database::escape_string($title);\n }\n }",
"public function setTitle($title) {\n\t\tTemplate::setSiteTitle($title);\n\t}",
"public function setPageTitle($title);",
"public function setTitleTag($title)\n {\n $this->_title_tag = $title;\n }",
"private function setTitle(\\Scrivo\\Str $title) {\n\t\t$this->title = $title;\n\t}",
"public function setPageTitle($title)\n {\n $titleElement = $this->query('title')->first();\n if ($title === '') {\n // If empty value passed we need to remove title tag\n if ($titleElement) {\n $this->removeElement($titleElement);\n }\n } else {\n if ($titleElement) {\n $titleElement->text($title);\n } else {\n $titleElement = new Title($title);\n $head = $this->query('head');\n if ($head->count() > 0) {\n /* @var Element $head */\n $this->appendTo($head->first(), $titleElement);\n }\n }\n }\n }",
"public function setTitle(string $value)\n {\n $this->title = $value;\n }"
] | [
"0.79837865",
"0.7968202",
"0.79653215",
"0.79419917",
"0.7935527",
"0.7920843",
"0.7920843",
"0.7913216",
"0.7913216",
"0.7911611",
"0.79059327",
"0.79059327",
"0.79059327",
"0.7900872",
"0.78972805",
"0.7891776",
"0.7891776",
"0.7891776",
"0.7891776",
"0.7891776",
"0.7891776",
"0.788976",
"0.788775",
"0.7883397",
"0.7858063",
"0.7839952",
"0.7839952",
"0.7837418",
"0.7837418",
"0.7830885",
"0.7825556",
"0.7817065",
"0.78122693",
"0.7801785",
"0.77878946",
"0.7783562",
"0.7783562",
"0.7783562",
"0.77801454",
"0.7761997",
"0.7743421",
"0.77303153",
"0.77206373",
"0.77006304",
"0.7680967",
"0.765305",
"0.76369435",
"0.7623014",
"0.76203316",
"0.7603732",
"0.7594083",
"0.7579322",
"0.75746715",
"0.75408024",
"0.75392467",
"0.7532387",
"0.7532387",
"0.7507389",
"0.7507389",
"0.7507389",
"0.7507389",
"0.7507389",
"0.7507389",
"0.7507389",
"0.75058204",
"0.7504507",
"0.7504507",
"0.7504507",
"0.7504507",
"0.7504507",
"0.7504507",
"0.74873954",
"0.7462961",
"0.74627185",
"0.74462324",
"0.74439573",
"0.74351865",
"0.7434375",
"0.7371208",
"0.73708373",
"0.736897",
"0.736897",
"0.736897",
"0.736897",
"0.73364735",
"0.7333524",
"0.73244816",
"0.73209006",
"0.7274576",
"0.7258321",
"0.7223853",
"0.72193474",
"0.72031015",
"0.718249",
"0.71629936",
"0.7156856",
"0.7152566",
"0.71508914",
"0.71504205",
"0.7143731",
"0.71421385"
] | 0.0 | -1 |
Set the heading of this announcement | public function setHeading($heading)
{
$this->heading = $heading;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setHeading($h)\n\t{\n\t\t$this->_headingText=$h;\n\t}",
"function set_heading()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->heading = $this->_prep_args($args);\n\t}",
"public function setHeading($var)\n {\n GPBUtil::checkDouble($var);\n $this->heading = $var;\n\n return $this;\n }",
"public function set_heading($heading) {\n $this->heading=$heading;\n if (!isset($this->form_name) or $this->form_name=='') {\n $this->form_name=$heading;\n error_log(\"BasicForm: Had to revert form name to form heading\");\n }\n }",
"public function setHeadline($headline) {\n $this->headline = $headline;\n }",
"public function SetHeadTitle ($title) {\r\n\t\t$this->head->SetTitle($title);\r\n\t}",
"private function renderContentHeading() {\n\t\t$this->setMarker('content_id', $this->getContentUid());\n\t\t$this->setMarker(\n\t\t\t'content_heading',\n\t\t\thtmlspecialchars($this->cObj->data['subheader'])\n\t\t);\n\t}",
"function setHeaderTitle($value) {\n $this->header_title = $value;\n}",
"function setHeaderText($value) {\n $this->header_text = $value;\n}",
"public function setHeadings($headings){\n\t\t\t$this->headings = $headings;\n\t\t}",
"public function getHeading()\n {\n return $this->heading;\n }",
"public function setTitle($str)\n\t{\n\t\t$this->headerTitle = $str;\n\t}",
"public function setHeadings($headings);",
"public function setEmailHeadHtml($value) { $this->_emailHeadHtml = $value; }",
"function new_heading()\n {\n }",
"function setHeadTitel($var)\n\t{\n\t\t$this -> head_titel = $var;\n\t}",
"private function headings() {\n\t\t$this->section_data['general_h_tags'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_h_tags',\n\t\t\t'label' \t\t\t\t=> __( 'Headings', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h1' => 'Heading 1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h2' => 'Heading 2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h3' => 'Heading 3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h4' => 'Heading 4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h5' => 'Heading 5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h6' => 'Heading 6',\n\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check which HTML headings automatically generated table of contents.', 'fixedtoc' )\n\t\t);\n\t}",
"public function setNewsFeedHeading($newsFeedHeading)\n {\n $this->newsFeedHeading = $newsFeedHeading;\n }",
"public function setHeader($header)\n {\n $this->_header = $header;\n }",
"protected function getHeadingHtml() {\n\t\t$heading = '';\n\t\tif ( $this->isUserPage ) {\n\t\t\t// The heading is just the username without namespace\n\t\t\t$heading = $this->pageUser->getName();\n\t\t} else {\n\t\t\t$pageTitle = $this->getOutput()->getPageTitle();\n\t\t\tif ( $pageTitle ) {\n\t\t\t\t$heading = $pageTitle;\n\t\t\t}\n\t\t}\n\t\treturn Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );\n\t}",
"protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}",
"public function setHeader($header);",
"public function setTitle($newTitle) { $this->Title = $newTitle; }",
"function setHeadings($headings){\n\t\t\tglobal $tableHeadings;\n\t\t\t\n\t\t\t$tableHeadings = $headings;\n\t\t\t\n\t\t}",
"function setHeadings($headings){\n\t\t\tglobal $tableHeadings;\n\t\t\t\n\t\t\t$tableHeadings = $headings;\n\t\t\t\n\t\t}",
"function addHeading(& $heading, & $parentElement) {\n\t\t$headingElement =& $this->_document->createElement('heading');\n\t\t$parentElement->appendChild($headingElement);\n\t\t\n\t\t$this->addCommonProporties($heading, $headingElement);\n\t\t\n\t\tif ($heading->getField('location') == 'right')\n\t\t\t$headingElement->setAttribute('location', 'right');\n\t\telse\n\t\t\t$headingElement->setAttribute('location', 'left');\n\t}",
"public function setHeader(PoHeader $header) {\n }",
"function Header() {\n if(empty($this->title) || $this->PageNo() == 1) return;\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_HEADER_COLOR['red'],\n PDF_HEADER_COLOR['green'],\n PDF_HEADER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $this->SetY(10, false);\n $this->SetFont('', 'B');\n $this->Cell(0, 10, $this->title);\n $this->SetFont('', '');\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }",
"public function heading(string $heading): CustomTextCard\n {\n return $this->setMeta('heading', $heading);\n }",
"function heading( $data = '', $h = '1', $attributes = '' )\n\t{\n\t\treturn '<h' . $h . _stringify_attributes( $attributes ) . '>' . $data . '</h' . $h . '>';\n\t}",
"public function setHeader(string $header_name, string $header_value): void;",
"private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }",
"public function set_header($key, $value)\n {\n }",
"function setHeadline ($newHeadline) {\n // deleting and then re-creating the ad\n // update the google servers\n $soapClients = &APIlityClients::getClients();\n $someSoapClient = $soapClients->getAdClient();\n // then recreate it with the new headline set\n $soapParameters = \"<addAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <headline>\".$newHeadline.\"</headline>\n <description1>\".utf8_decode($this->getDescription1()).\"</description1>\n <description2>\".utf8_decode($this->getDescription2()).\"</description2>\n <displayUrl>\".$this->getDisplayUrl().\"</displayUrl>\n <destinationUrl>\".$this->getDestinationUrl().\"</destinationUrl>\n <status>\".$this->getStatus().\"</status>\n <adType>TextAd</adType>\n </ads>\n </addAds>\";\n // add the ad to the google servers\n $someAd = $someSoapClient->call(\"addAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setHeadline()\", $soapParameters);\n return false;\n }\n // first delete the current ad\n $soapParameters = \"<updateAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <id>\".$this->getId().\"</id>\n <status>Disabled</status>\n <adType>TextAd</adType>\n </ads>\n </updateAds>\";\n // delete the ad on the google servers\n $someSoapClient->call(\"updateAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setHeadline()\", $soapParameters);\n return false;\n }\n // update local object\n $this->headline = $someAd['addAdsReturn']['headline'];\n // changing the headline of a ad will change its id so update local object\n $this->id = $someAd['addAdsReturn']['id'];\n return true;\n }",
"public function setTitle($value)\n {\n $this->_title = $value;\n }",
"private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }",
"public function setHeader($name, $value) {}",
"public function setTitle($t){\n\t\t$this->title = $t;\n\t}",
"public function setTitle($value)\n {\n $this->title = $value;\n }",
"function admin_setting_heading($name, $heading, $information) {\n parent::admin_setting($name, $heading, $information, '');\n }",
"protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }",
"public function setHeader($name, $value);",
"public function setHeader($name, $value);",
"public function get_heading() {\n\t\tif ( $this->object['voucher_count'] == 1 ) {\n\t\t\treturn apply_filters( 'woocommerce_email_heading_' . $this->id, $this->format_string( $this->heading ), $this->object );\n\t\t} else {\n\t\t\treturn apply_filters( 'woocommerce_email_heading_' . $this->id, $this->format_string( $this->heading_multiple ), $this->object );\n\t\t}\n\t}",
"public function apb_email_header( $email_heading ) {\r\n\t\tinclude AWE_function::template_exsits( 'emails/apb-email-header', array( 'email_heading' => $email_heading ) );\r\n\t}",
"function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }",
"public static function setHeader($header)\n {\n header($header, true);\n }",
"public function setHeader(HtmlElementInterface $header): void\n {\n $this->header = $header;\n }",
"public static function setHeader($key, $value)\n {\n self::$__headers[strtolower($key)] = $value;\n }",
"public function set_pagetitle($title)\n {\n $this->pagetitle = $title;\n }",
"public function setTitle($title = '', $prepend = true) {\n $this->response->setTitle($title . ($prepend ? $this->title['d'] . $this->title['t'] : ''), false);\n }",
"public static function setHTMLHeader($header) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::setHTMLHeader($header);\t\t\n\t}",
"protected function setHeaders(): void\n {\n if (empty($this->headers) === false || empty($this->data) === true) {\n return;\n }\n\n $headers = array_keys(reset($this->data));\n\n array_walk($headers, fn(&$header) => $header = ucwords(str_replace(\"_\", \" \", $header)));\n\n $this->headers = $headers;\n }",
"public function get_title()\n {\n return __('Section Heading', 'careerfy-frame');\n }",
"function setHead($tagName,$attributes,$inner = '',$index = ''){\r\n\t\t$this->head($index,$tagName,$attributes,$inner);\r\n\t}",
"public function setHeaderText($value)\n {\n if (is_array($value)) {\n $this->fields['options']['header_text_left'] = $value[0];\n $this->fields['options']['header_text_center'] = $value[1];\n $this->fields['options']['header_text_right'] = $value[2];\n } else {\n $this->fields['options']['header_text_left'] = $value;\n }\n }",
"function setHeaders() {\n\t\t\t// Sets the message id\n\t\t$oldMsgID = $this->messageid;\n\t\t$host = t3lib_div::getHostname();\n\t\tif (!$host || $host == '127.0.0.1' || $host == 'localhost' || $host == 'localhost.localdomain') {\n\t\t\t$host = ($TYPO3_CONF_VARS['SYS']['sitename'] ? preg_replace('/[^A-Za-z0-9_\\-]/', '_', $TYPO3_CONF_VARS['SYS']['sitename']) : 'localhost') . '.TYPO3';\n\t\t}\n\t\t$this->messageid = md5(microtime()) . '@' . $host;\n\t\t\n\t\t//adding testmail-subject if it is set\n\t\tif ($this->testmail !== FALSE) {\n\t\t\t$this->subject = (string)$this->testmail.' '.$this->subject;\n\t\t}\n\t\t\n\t\tparent::setHeaders();\n\t\t$this->messageid = $oldMsgID;\n\t}",
"public function setHeader($key, $value)\n {\n $this->httpClient->setHeader($key, $value);\n }",
"protected function addHeading(DomNode $node)\n {\n $heading = $this->newHeading($node);\n $this->headings[] = $heading;\n\n $number = new DomText();\n\n switch ($this->numbering) {\n case false:\n $number->nodeValue = '';\n break;\n case 'decimal':\n default:\n $number->nodeValue = $heading->getNumber() . ' ';\n break;\n }\n\n $node->insertBefore($number, $node->firstChild);\n\n $node->setAttribute('id', $heading->getAnchor());\n }",
"public function writeHeader($uHeading, $uMessage)\n {\n echo \"<h{$uHeading}>{$uMessage}</h{$uHeading}>\";\n }",
"public function set_header($header, $value);",
"protected function setMetaTitle() {\r\n\t\t$partStg = trim($this->settings['news']['semantic']['general']['metaTitle']);\r\n\t\tif (is_int(strpos($partStg, '+'))) {\r\n\t\t\t$parts = t3lib_div::trimExplode('+', $partStg);\r\n\t\t\tforeach ($parts as $part) {\r\n\t\t\t\t$action = 'get' . ucfirst($part);\r\n\t\t\t\t$value = $this->newsItem->$action();\r\n\t\t\t\tif ($value !== '') {\r\n\t\t\t\t\t$data[] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->metaTitle = implode(': ', $data);\r\n\t\t} elseif (is_int(strpos($partStg, '//'))) {\r\n\t\t\t$parts = t3lib_div::trimExplode('//', $partStg);\r\n\t\t\tforeach ($parts as $part) {\r\n\t\t\t\t$action = 'get' . ucfirst($part);\r\n\t\t\t\t$data = $this->newsItem->$action();\r\n\t\t\t\tif ($data !== '') {\r\n\t\t\t\t\t$this->metaTitle = $data;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$action = 'get' . ucfirst($partStg);\r\n\t\t\t$this->metaTitle = $this->newsItem->$action();\r\n\t\t}\r\n\t}",
"public function modifyHeader($key, $value): void\n {\n $this->setNestedProperty(\"header.{$key}\", $value);\n }",
"function setHeadDescription($var)\n\t{\n\t\t$this -> head_description = $var;\n\t}",
"public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}",
"public function headline($text) {\n\t\treturn \"<h2 class='headline'>$text</h2>\";\n\t}",
"public function set_header($header, $value)\n {\n }",
"public function getNewsFeedHeading()\n {\n return $this->newsFeedHeading;\n }",
"private function setHeader($header)\n {\n $this->header = trim((string) $header);\n $this->headerComment = '';\n\n if ('' !== $this->header) {\n $this->headerComment = $this->encloseTextInComment($this->header);\n }\n }",
"function addHeadElement($include) {\n\t $this->_headSection .= $include . \"\\n\";\n\t}",
"public function setHeader($header, $value) {\r\n $this->headers[$header] = $value;\r\n }",
"public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}",
"function headings() {\r\n\t\t// and that they receive anchors so that they may be linked to from the table of contents.\r\n\t\t//ReTidy::force_headings();\r\n\t\tReTidy::heading_anchors();\r\n\t}",
"function setHeader($a_sHeader)\n {\n if (!is_null($this->_sHeader) && $this->_sHeader !== (string) $a_sHeader) {\n $this->_markModified();\n }\n $this->_sHeader = (string) $a_sHeader;\n }",
"public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}",
"public function setHeader($header, $value)\r\n {\r\n $this->_headers[$header] = $value;\r\n }",
"public function setTitle($title) {\r\n $this->title = $title;\r\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"public function setHeader($key,$val){ return $this->headers->set($key,$val); }",
"public function setTitle(string $value)\n {\n $this->title = $value;\n }",
"public function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"abstract public function SetHeaders();",
"public function appendH1(mixed $content = null): H1;",
"public function setTitle($var)\n {\n $this->_title = $var;\n }",
"public static function setHeader($name, $value = null, $replace = null) {}",
"public function getHeading(): string;",
"function setHeader($string)\n {\n if (!empty($this->header))\n {\n $this->header .= $string;\n }\n else \n {\n $this->header = $string;\n }\n }",
"public function set_header($header, $value)\r\n {\r\n $this->headers[$header] = $value;\r\n }",
"public function headingHtml(string $html): CustomTextCard\n {\n return $this->setMeta('headingHtml', $html);\n }",
"public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"public static function header($caption)\n {\n $session = self::getSession();\n\n if ($caption) {\n $session->content .= \"\\n<h6><b>\" . $caption . \"</b></h6>\\n\\n\";\n }\n }",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"function remove_h1_from_heading($args) {\n$args['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Pre=pre';\nreturn $args;\n}",
"public static function setHeader($pHeader)\n\t{\n\t\theader($pHeader);\n\t}",
"function setHeadLink($var)\n\t{\n\t\t$this -> head_link = $var;\n\t}",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }",
"public function setCustomHead($customHead) {\n $this->_customHead = $customHead;\n }"
] | [
"0.8044966",
"0.7395246",
"0.6890738",
"0.6690357",
"0.6496962",
"0.63836145",
"0.62960356",
"0.6287221",
"0.6279528",
"0.62336063",
"0.6228237",
"0.62102336",
"0.61218226",
"0.6119339",
"0.6111601",
"0.6089011",
"0.6078367",
"0.60138553",
"0.5990851",
"0.59080684",
"0.5888911",
"0.58717316",
"0.5868383",
"0.581",
"0.581",
"0.58056986",
"0.58015573",
"0.5792405",
"0.5792138",
"0.5786136",
"0.57835865",
"0.5774597",
"0.57575357",
"0.5756616",
"0.57546496",
"0.5746834",
"0.57283896",
"0.57126766",
"0.5710834",
"0.57007116",
"0.56976515",
"0.56631094",
"0.56631094",
"0.5645862",
"0.5641024",
"0.56373185",
"0.5634443",
"0.56330127",
"0.5617761",
"0.56093377",
"0.5603867",
"0.5603441",
"0.55933756",
"0.5591739",
"0.5573628",
"0.55734587",
"0.5572371",
"0.5560201",
"0.5553428",
"0.55425376",
"0.55301094",
"0.5506985",
"0.5505891",
"0.55055785",
"0.55054027",
"0.5504391",
"0.5487591",
"0.548674",
"0.54763186",
"0.5471906",
"0.5469526",
"0.54629534",
"0.5453199",
"0.544672",
"0.54331315",
"0.5431702",
"0.5430291",
"0.5428904",
"0.5427267",
"0.5425352",
"0.54229015",
"0.54196846",
"0.5413201",
"0.5412741",
"0.54120374",
"0.54115355",
"0.5409447",
"0.54092926",
"0.54091346",
"0.5407249",
"0.540538",
"0.53991884",
"0.5389797",
"0.5387974",
"0.5382689",
"0.5381971",
"0.5376039",
"0.53687155",
"0.5364094",
"0.53630316"
] | 0.636149 | 6 |
Set the content of this announcement | public function setContent($content)
{
$this->content = $content;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setContent($content){\n $this->_content = $content;\n }",
"protected function setContent() {}",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent ($content) {\r\n\t\t$this->content = (string)$content;\r\n\t}",
"public function setContent( string $content );",
"abstract function setContent();",
"public function setContent($content)\r\n {\r\n $this->_content = $content;\r\n }",
"public function setContent($content)\r\n {\r\n $this->content = $content;\r\n }",
"public function setContent($content) {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->_content = $content;\n }",
"public function set_content ($content) {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content) {\n\n $this->content = $content;\n }",
"public function setContent($content) {\n\n $this->content = $content;\n }",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent()\n {\n }",
"public function setContent($newContent) {\n\t\t$this->content = $newContent; \n\t}",
"public function set_content(string $content) {\n $this->content = $content;\n }",
"public function setContent( string $content ) : void\n {\n $this->content = $content;\n }",
"public function setContent($content){\n $this->_content = $this->checkFormat($content);\n }",
"public function setContent(string $content): void\n {\n $this->_content = $content;\n }",
"function setContent(string $content_html): void\n {\n $this->data['content'] = $content_html;\n }",
"public function setContent(string $content): void\n {\n $this->content = $content;\n }",
"function setContent($value)\n {\n $this->setAttribute(\"content\", $value);\n return $this;\n }",
"public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}",
"function setContent($c) {\n\t\t$this->set(\"content\",$c);\n\t}",
"protected function setPlainContent() {}",
"protected function setHtmlContent() {}",
"public function setContent($subst)\n\t{\n\t\t$this->vars['content'] = $subst;\n\t}",
"public function setContentAttribute($value)\n {\n $data = [\n 'raw' => $value,\n 'html' => (new Markdowner)->convertMarkdownToHtml($value)\n ];\n\n $this->attributes['content'] = json_encode($data);\n }",
"public function setParsedContentAttribute($value)\n {\n $this->attributes['content'] = $value;\n }",
"public function setContent($value) {\n\t\tif(strlen($value) < 1)\n\t\t\tthrow new \\Exception('Comment::setContent() failed: value must be longer than 0');\n\n\t\t$this->content = \\common\\Filter::sanitize($value);\n\t}",
"public function setEncapsulateContent($value)\n {\n $this->_encapsulateContent = $value;\n }",
"public function setContent($value)\n {\n if (!array_key_exists('content', $this->fieldsModified)) {\n $this->fieldsModified['content'] = $this->data['fields']['content'];\n } elseif ($value === $this->fieldsModified['content']) {\n unset($this->fieldsModified['content']);\n }\n\n $this->data['fields']['content'] = $value;\n }",
"public function setContent(string $content)\n {\n if (strlen($content) > 5) {\n $this->content = $content;\n }\n }",
"public function setContent($value)\n {\n return $this->set('Content', $value);\n }",
"public function setContent($value)\n {\n return $this->set('Content', $value);\n }",
"function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}",
"function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}",
"public function setBodyContent($data)\n\t{\n\t\t$this->_pageData['data']['content'] = $data;\n\t}",
"public function setContent($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->content !== $v) {\n\t\t\t$this->content = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::CONTENT;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setTextContent($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->text_content !== $v) {\n\t\t\t$this->text_content = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::TEXT_CONTENT;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setTextContent($text)\n {\n $this->textContent = $text;\n }",
"public function setAutoResponderEmailContent($value) { $this->_autoResponderEmailContent = $value; }",
"public function setContentAttribute( $value )\n\t{\n\t\t$value = cleanupHTML( $value );\n\n\t\t// Comment are only allowed to have specific html tags\n\t\t// We will whitelist them in advance\n\t\t$this->attributes['content'] = strip_tags($value,'<a><br><p><b><i><em><strong>');\n\n\t\t\n\t}",
"public function setContent($content)\n {\n $this->original = $content;\n\n // If the content is \"JSONable\" we will set the appropriate header and convert the content to JSON, This is\n // useful when returning something like models from routes that will be automatically transformed to their\n // JSON form.\n if ($this->shouldBeJson($content)) {\n $this->header('Content-Type', 'application/json');\n\n $content = $this->morphToJson($content);\n }\n // If this content implements the \"Renderable\" interface then we will call the render method on the object so\n // we will avoid any \"__toString\" exceptions that might be thrown and have their errors obscured(使模糊,费解)\n // by PHP's handling.\n elseif ($content instanceof Renderable) {\n $content = $content->render();\n }\n\n parent::setContent($content);\n\n return $this;\n }",
"public function setContent(Down_MailContent $value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"public function set_content( $content )\r\n\t {\r\n\t \t$this->_content_to_load = $con;\r\n\t }",
"public function setContents($contents) {\n $this->_contents = $contents;\n }",
"public function setContent($content) {\n\t\tif(!empty($content)){\n\t\t\t$this->content = trim($content);\n\t\t} elseif(!empty($_POST['content'])) {\n\t\t\t$this->content = trim($_POST['content']);\n\t\t}\n\t}",
"public function setContent($content)\n {\n return $this->setData(self::CONTENT, $content);\n }",
"public function setSugarContent($value)\n {\n $this->sugarContent = $value;\n }",
"function setTextContent(&$content) {\n\t\t$this->lobSub->lobText =& $content;\n\t\t$this->repoObj->lobSubType = 'text';\n\t\t$this->repoObj->lobBytes = strlen($content);\n\t\t$this->lobSub->lobBinary = null;\n\t}",
"public function setContent($value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"public function setContent($value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"public function Set_Content($Content=NULL)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(!in_array(gettype($Content), UniCAT::ShowOptions_Scalars()))\n\t\t\t{\n\t\t\t\tthrow new UniCAT_Exception(UniCAT::UNICAT_XCPT_MAIN_CLS, UniCAT::UNICAT_XCPT_MAIN_FNC, UniCAT::UNICAT_XCPT_MAIN_PRM, UniCAT::UNICAT_XCPT_SEC_PRM_WRONGVALTYPE);\n\t\t\t}\n\t\t}\n\t\tcatch(UniCAT_Exception $Exception)\n\t\t{\n\t\t\t$Exception -> ExceptionWarning(__CLASS__, __FUNCTION__, MethodScope::Get_ParameterName(__CLASS__, __FUNCTION__), gettype($Content), UniCAT::ShowOptions_Scalars());\n\t\t}\n\t\t\n\t\t$this -> Content = $Content;\n\t}",
"public function set_content($content) {\n if (!is_string($content)) { return false; }\n $this->_content = $content;\n return true;\n }",
"public function setContent($content){\n\t\t$this->content = $content;\n\t\t\n\t\treturn $this;\n\t}",
"public function setHtmlContent($html)\n {\n $this->htmlContent = $html;\n }",
"protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }",
"private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }",
"function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n\n return $this;\n }",
"public function set_text_content( $content ) {\n\t\t$this->text_content = $content;\n\t\treturn $this;\n\t}",
"public function content($value) {\n return $this->setProperty('content', $value);\n }",
"public function setContent($content) {\n if (is_string($content) && strlen($content) > 3 && strlen($content) < 500) {\n $this->content = htmlspecialchars($content);\n }\n return $this;\n }",
"public function setRawContent($content);",
"abstract public function setContentFromString($string);",
"public function content($content)\n {\n $this->content = $content;\n return $this;\n }",
"public function setContentAttribute($value, User $actor = null)\n {\n $this->attributes['content'] = $value ? static::$formatter->parse($value, $this, $actor ?? $this->user) : null;\n }",
"public function setContent($content = NULL, $mode = self::RENDER_TEXT)\n\t{\n\t\tif ($mode == self::RENDER_TEXT) {\n\t\t\t$content = strip_tags((string) $content);\n\t\t}\n\t\tif ($content === NULL) {\n\t\t\t$content = '';\n\t\t}\n\t\tif (!is_string($content)) {\n\t\t\tthrow new L8M_MailV2_Part_Exception('Content needs to be a string.');\n\t\t}\n\t\t$content = trim($content);\n\t\tif ($mode == self::RENDER_HTML) {\n\t\t\t$this->_content_html = $content;\n\t\t} else {\n\t\t\t$this->_content = $content;\n\t\t}\n\t\treturn $this;\n\t}",
"public function setSodiumContent($value)\n {\n $this->sodiumContent = $value;\n }",
"public function SetContent(Content $content)\n {\n $this->texts = array();\n $wordings = ContentWording::Schema()->FetchByContent(false, $content);\n foreach($wordings as $wording)\n {\n $prefix = Str::Replace('-', '.', $content->GetType());\n $this->texts[$prefix . '.' . $wording->GetPlaceholder()] = $wording->GetText();\n }\n }",
"public function setData( $html = '' ) {\r\n\t\t\t$this->content = $html;\r\n\t\t\tparent::setData( $html );\r\n\t\t}",
"public function setContent(?string $value): void {\n $this->getBackingStore()->set('content', $value);\n }",
"protected function setSuccessContent()\n {\n $this->title = 'Meditation Restored';\n \n $content = $this->getTitle();\n $content .= \"Your meditation time on <b>\";\n $content .= $this->data['long_date'];\n $content .= \"</b> has been restored.</p>\";\n \n $content .= '<p><a href=\"/journal\">Back to Journal</a></p>';\n \n $this->content = $content;\n }",
"public function SetContent($pContent)\n {\n $this->_content = $pContent;\n return $this;\n }",
"function addContent($content)\n {\n $this->content .= $content;\n }",
"public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}",
"public function setContent(?string $content) {\n\t\t$this->content = $content;\n\n\t\treturn $this;\n\t}",
"public function setDataContent($content)\n {\n if (is_array($content)) {\n $this->headers->set('Content-Type', 'application/json');\n $content = json_encode($content);\n }\n\n $this->setContent($content);\n }",
"public function setContent(string $content): self\n {\n $this->content = $content;\n return $this;\n }",
"public function setBody($content) {\n\n\t\t// auto-detect html\n\t\tif (stripos($content, '<html') !== false) {\n\t\t\t$this->_mail->IsHTML(true);\n\t\t}\n\n\t\t// set body\n\t\t$this->_mail->setBody($content);\n\t}",
"public function setPopupContent($content);"
] | [
"0.7455095",
"0.744482",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.74317396",
"0.7352828",
"0.72611874",
"0.72558486",
"0.72472763",
"0.72313184",
"0.72175986",
"0.7215092",
"0.717205",
"0.71679777",
"0.71679777",
"0.71679777",
"0.7156174",
"0.7156174",
"0.71320915",
"0.71320915",
"0.71320915",
"0.70433605",
"0.7028326",
"0.701331",
"0.6936995",
"0.6920027",
"0.689671",
"0.68928033",
"0.68633235",
"0.6856499",
"0.68544626",
"0.6798647",
"0.6760448",
"0.67025286",
"0.66990644",
"0.66271454",
"0.6598572",
"0.65460867",
"0.6493359",
"0.64676666",
"0.644497",
"0.6384033",
"0.6384033",
"0.63570297",
"0.63570297",
"0.6348154",
"0.6310852",
"0.6292561",
"0.6292035",
"0.62732226",
"0.6267916",
"0.6199756",
"0.61974746",
"0.6169305",
"0.6158537",
"0.61362565",
"0.6084515",
"0.6067732",
"0.6063612",
"0.60567105",
"0.60567105",
"0.603201",
"0.60179406",
"0.6012195",
"0.6007251",
"0.6003384",
"0.5991946",
"0.5985057",
"0.59777504",
"0.59723496",
"0.5971473",
"0.59640664",
"0.59508115",
"0.5941197",
"0.59180474",
"0.5915232",
"0.5906036",
"0.59042805",
"0.59000456",
"0.58939826",
"0.58930403",
"0.58886725",
"0.58731264",
"0.5857376",
"0.5846551",
"0.584607",
"0.5841041",
"0.58406407",
"0.58339894",
"0.5832676"
] | 0.5910661 | 85 |
Set the footer of this announcement | public function setFooter($footer)
{
$this->footer = $footer;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function defineFooter()\n {\n $this->footer = new Footer();\n }",
"public function setFooter() {\n\n // set the footer html.\n echo '<div class=\"footer\">\n \n </div>\n </div>\n </body>\n</html>' . PHP_EOL;\n }",
"function set_footer() {\r\n $args = func_get_args();\r\n $this->footer = $this->_prep_args($args);\r\n }",
"function Footer()\n\t\t{\n\t\t\t$this->SetY(-15);\n\t\t\t// Select Arial italic 8\n\t\t}",
"function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-13);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Page number\n\t\t$this->Cell(0,10,'Designed by winnie(+254701008108)',0,0,'C');\n\t\t$this->SetY(-18);\n\t\t$this->Cell(0,10,'www.veranevents.com',0,0,'C');\n\t}",
"function setFooter(){\n $this->footer.= <<<EOD\n</div>\n</div>\n</body>\n</html>\nEOD;\n }",
"public function footer()\n {\n }",
"protected function setFooter() {\n $footer = \"<div class='footer'>\n <center>\n <a href='https://www.linkedin.com/in/ali-mohtasham-a75a2886' >Designed by <strong> Ali Mohtasham Gilani </strong> All rights reserved.</a>\n </center>\n </div>\n \";\n return $footer;\n }",
"function set_footer()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->footer = $this->_prep_args($args);\n\t}",
"function Footer()\n {\n //$year = date('Y');\n //$footertext = sprintf($this->xfootertext, '');\n $this->SetY(-15);\n //$this->SetFont('', '', 5);\n //$this->SetTextColor(0, 0, 0);\n //$this->SetFont($this->xfooterfont,'',$this->xfooterfontsize);\n $this->writeHTML($this->xfootertext, true, false, true, false, '');\n //$this->Cell(0,8, $footertext,'T',3,'L');\n }",
"function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}",
"function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }",
"function Footer() {\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_FOOTER_COLOR['red'],\n PDF_FOOTER_COLOR['green'],\n PDF_FOOTER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $footerY = $this->GetPageHeight() -20;\n $this->SetXY(170, $footerY);\n $this->Cell(0, 10, ($this->footerPage.$this->PageNo().$this->footerOutOf.$this->AliasNbPages));\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',9);\n\t\t// Page number\n\t\t$this->Cell(0,10,utf8_decode('Puede contactar con nosotros a través de el correo [email protected] o en la página tapibautista.com/contact'),0,0,'C');\n\t\t\n\t}",
"public function footer() {\n\t}",
"public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }",
"function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }",
"protected function makeFooter()\n {\n }",
"public function put_on_footer() {\n\t\t$this->items[ $this->id ]['in_footer'] = true;\n\t\treturn $this;\n\t}",
"function Footer()\n\t\t{\n\t\t}",
"public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }",
"protected function footer()\n {\n\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright © 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}",
"function Footer()\n {\n $this->SetY(-20);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0,10,'Post address: PO Box K595, Haymarket,NSW 1240, Australia',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,10,'Office address: Suite 309-311 Sussex Centre. 401 Sussex St. Sydney, 2000',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,10,'Tel: 00612 9281 6299 www.geic.com.au',0,0,'C');\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(10,$this->GetY(),210,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright gubugkoding.com Semarang ' . date('Y'),0,0,'L');\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}",
"public function footer($value) {\n return $this->setProperty('footer', $value);\n }",
"function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }",
"function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }",
"public function Footer()\n {\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-15);\n $this->Write(4, 'Dokumen ini dicetak secara otomatis menggunakan sistem terkomputerisasi');\n\n $time = \"Dicetak pada tanggal \" . date('d-m-Y H:i:s') . \" WIB\";\n\n $this->SetX(-150);\n $this->Cell(0, 4, $time, 0, 0, 'R');\n }",
"public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }",
"function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }",
"public function Footer()\n {\n global $PMF_LANG;\n\n // Set custom footer\n $this->setCustomFooter();\n\n $date = new PMF_Date($this->_config);\n\n $footer = sprintf(\n '(c) %d %s <%s> | %s',\n date('Y'),\n $this->_config->get('main.metaPublisher'),\n $this->_config->get('main.administrationMail'),\n $date->format(date('Y-m-d H:i'))\n );\n\n if (0 < PMF_String::strlen($this->customFooter)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customFooter);\n }\n\n $currentTextColor = $this->TextColor;\n $this->SetTextColor(0, 0, 0);\n $this->SetY(-25);\n $this->SetFont($this->currentFont, '', 10);\n $this->Cell(0, 10, $PMF_LANG['ad_gen_page'].' '.$this->getAliasNumPage().' / '.$this->getAliasNbPages(), 0, 0, 'C');\n $this->SetY(-20);\n $this->SetFont($this->currentFont, 'B', 8);\n $this->Cell(0, 10, $footer, 0, 1, 'C');\n if ($this->enableBookmarks == false) {\n $this->SetY(-15);\n $this->SetFont($this->currentFont, '', 8);\n $baseUrl = 'index.php';\n if (is_array($this->faq) && !empty($this->faq)) {\n $baseUrl .= '?action=artikel&';\n if (array_key_exists($this->category, $this->categories)) {\n $baseUrl .= 'cat='.$this->categories[$this->category]['id'];\n } else {\n $baseUrl .= 'cat=0';\n }\n $baseUrl .= '&id='.$this->faq['id'];\n $baseUrl .= '&artlang='.$this->faq['lang'];\n }\n $url = $this->_config->getDefaultUrl().$baseUrl;\n $urlObj = new PMF_Link($url, $this->_config);\n $urlObj->itemTitle = $this->question;\n $_url = str_replace('&', '&', $urlObj->toString());\n $this->Cell(0, 10, 'URL: '.$_url, 0, 1, 'C', 0, $_url);\n }\n $this->TextColor = $currentTextColor;\n }",
"public function Footer(){\n // Position at 15 mm from bottom\n $this->SetY(-15);\n // Set font\n\t\t$html = \"<table>\";\n\t\t$html .= \"<tr><td>unidad de adm y serv</td><td>responsable del proyecto o accion centralizada</td><td>unidad de finanzas</td><td>unidad de planificacion ppto</td><td>presidente</td><td>secreatria de adcripcion</td><td>Secretaria de Planificacion presupuesto y control de gestion</td><td>Gobernador del estado</td></tr>\";\n\t\t$html .= \"<tr><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\t$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}",
"public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }",
"public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }",
"function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('PlatSource © '.date('Y')),0,0,'L');\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}",
"public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}",
"function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }",
"function Footer() {\n\t$this->SetY(-15);\n\t// Arial italic 8\n\t$this->SetFont('Arial','I',8);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}",
"function Footer()\n{\n $this->SetY(-15);\n //Select Arial italic 8\n\t$this->Cell(0,10,' '.$this->PageNo(),0,0,'R');\n}",
"public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }",
"function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }",
"function Footer() {\r\n $this->SetY(-15);\r\n // Set font\r\n $this->SetFont('Helvetica', 'I', 12);\r\n // Page number\r\n $this->Cell(0, 10, 'PvMax Summary | Schletter Inc. | (888) 608 - 0234', 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n}",
"public function setFooter(HtmlElementInterface $footer): void\n {\n $this->footer = $footer;\n }",
"function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}",
"function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}",
"function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }",
"public function Footer(){\n $this->SetY(-15);\n $this->SetFont('Arial','I',6);\n $this->Cell(0,5,'\"ESTA FACTURA CONTRIBUYE AL DESARROLLO DEL PAIS, EL USO ILICITO DE ESTA SERA SANCIONADO DE ACUERDO A LEY\"',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,5,'Ley No 453: Tienes derecho a un trato equitativo sin discriminacion en la oferta de servicios.',0,0,'C');\n }",
"public function footer() {\n\t\tRequirements::clear();\n\n\t\t$templates = ['Grasenhiller\\WkHtmlToX\\PdfFooter'];\n\t\t$data = $this->getHeaderFooterVariables();\n\n\t\tif (isset($data['template']) && $data['template']) {\n\t\t\t$templates[] = $data['template'];\n\t\t}\n\n\t\t$this->extend('updateFooter', $templates, $data);\n\n\t\treturn $this\n\t\t\t->customise($data)\n\t\t\t->renderWith(array_reverse($templates));\n\t}",
"abstract protected function footer();",
"abstract protected function footer();",
"private function getFooter() {\n\t\t$this->data['oxfooter']\t= \"\\n\"\n\t\t. '<!-- Module ' . ucfirst( $this->_name )\n\t\t.' v.'. $this->_version . ' by http://osworx.net (c) '\n\t\t. date('Y')\n\t\t. ' -->' . \"\\n\";\n\t}",
"function footer() {\n }",
"function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }",
"public function addFooter(){\n\n$this->page .= <<<EOD\n<pre>\n$this->title\n</pre>\n</body>\n</html>\nEOD;\n}",
"function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}",
"function Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }",
"public function apb_email_footer() {\r\n\t\tinclude AWE_function::template_exsits( 'emails/apb-email-footer' );\r\n\t}",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','b',8);\n\t\t\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t$this->Cell(210,1,'',0,0);\n\t\t// $this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t// $this->Cell(50,1,'',0,0);\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,1,'C');\n\t\t\n\t\t$this->Cell(30,4,\"Prepared/Class Teacher\",0,0,'C');\n\t\t// $this->Cell(50,4,'',0,0);\n\t\t// $this->Cell(30,4,\"Controlar of Examination\",0,0,'C');\n\t\t$this->Cell(210,4,'',0,0);\n\t\t$this->Cell(30,4,\"Principal/VP\",0,1,'C');\n\t\t\n\t\t$this->Cell(50,4,date(\"d-m-y h:i:s A\"),0,0,'L');\n\t\t// Page number\n\t\t//$this->Cell(140,4,''.$this->PageNo().'/{nb}',0,0,'C');\n\t}",
"function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(30,$this->GetY(),185,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}",
"public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }",
"public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}",
"function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }",
"function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}",
"function Footer()\n {\n $this->SetY(-100);\n\n for ( $i=0; $i<1; $i++ ) {\n $this->SetFont( 'Arial', 'B', 8 );\n $this->Cell( 80, 5, \"ACCOUNT MANAGER'S SIGNATURE\", 1, 0, 'C', false );\n }\n\n $this->SetY(-100);\n\n for ( $i=0; $i<1; $i++ ) {\n $this->SetX(110);\n $this->SetFont( 'Arial', 'B', 8 );\n $this->Cell( 80, 5, \"EMPLOYEE'S SIGNATURE\", 1, 0, 'C', false );\n }\n\n $this->SetY(-15);\n $this->SetFont( 'Arial', 'I', 8 );\n $this->Cell( 40, 0, \"Date Printed: \".$_SESSION[\"DATE_PRINTED\"], 0, 0, 'C', false );\n\n }",
"public function addFooterContent($content);",
"function Footer()\r\n {\r\n $this->SetY(-15);\r\n //courier italic 8\r\n $this->SetFont('courier','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n $this->SetX(5);\r\n $this->SetFont('courier','I',6);\r\n\r\n $this->Cell(0,10,'Tanggal Cetak : '.date(\"d/m/Y\"),0,0,'L');\r\n $this->SetY($this->GetY()+3);\r\n $this->Cell(0,10,'Cetak Oleh : '.$this->printby,0,0,'L');\r\n }",
"function Footer()\n{\n $this->SetY(-17);\n\n $this->SetFont( PDF_INV_FOOTER_TEXT_FONT,\n PDF_INV_FOOTER_TEXT_EFFECT,\n PDF_INV_FOOTER_TEXT_HEIGHT); \n \n $text_color=explode(\",\",PDF_INV_FOOTER_TEXT_COLOR );\n $this->SetTextColor($text_color[0], $text_color[1], $text_color[2]);\n \n\t$this->Cell(0,10, PDF_INV_FOOTER_TEXT, 0, 0,'C');\n\t\n\t$this->SetY(-14);\n\t//Page number\n $this->Cell(0,10,PRINT_INVOICE_PAGE_NUMBER.$this->PageNo(),0,0,'C' );\n\t}",
"function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}",
"public function footer( bool $footer = true ): self {\n\t\t$this->footer = $footer;\n\t\treturn $this;\n\t}",
"function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}",
"public function footer($footer)\n {\n $this->footer = $footer;\n\n return $this;\n }",
"public function footer($footer)\n {\n $this->footer = $footer;\n\n return $this;\n }",
"function Footer()\n {\n //Position at 1.5 cm from bottom\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number and page amount\n $this->Cell(0,10, text(\"bill_page\").\" \".$this->PageNo().'/{nb}',0,0,'C');\n }",
"public function getFooter();",
"public function getFooter();",
"function footer()\r\n{\r\n}",
"public function Footer(){\n\t\t$cur_y = $this->y;\n\t\t$this->SetTextColorArray($this->footer_text_color);\n\t\t//set style for cell border\n\t\t$line_width = (0.85 / $this->k);\n\t\t$this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $this->footer_line_color));\n\n\t\t//$w_page = isset($this->l['w_page']) ? $this->l['w_page'].' ' : '';\n\t\t//AJK, 28-JUN-2015: Could not find where l['w_page'] is set in class TCPDF, so simplifying code with own private member\n\t\tif (empty($this->pagegroups)) {\n\t\t\t$pagenumtxt = $this->w_page. ' ' . $this->getAliasNumPage().' OF '.$this->getAliasNbPages();\n\t\t} else {\n\t\t\t$pagenumtxt = $this->w_page. ' ' . $this->getPageNumGroupAlias().' OF '.$this->getPageGroupAlias();\n\t\t}\n\t\t$this->SetY($cur_y);\n\t\t//AJK, 28-JUN-2015: Print page number twice, i.e., on left and right edge of footer. \n\t\t// Taking advantage of existing code that printed once based on whether document was set for RTL or LTR\n\t\t$this->SetX($this->original_lMargin);\n\t\t$this->Cell(0, 0, $pagenumtxt, 0, 0, 'L');\n\t\t$this->SetX($this->original_rMargin);\n\t\t$this->Cell(0, 0, $this->getAliasRightShift().$pagenumtxt, 0, 0, 'R');\n\t}",
"function Footer()\n {\n $this->SetY(-12);\n $this->SetFont('Arial','B',5); \n $this->Cell(505,10,utf8_decode(\"TI. Fecha de creación: \").date(\"d-m-Y H:i\").\" \".\"Pag \".$this->PageNo(),0,0,'C'); \n }",
"function Footer()\n {\n $this->SetY(-12);\n $this->SetFont('Arial','B',5); \n $this->Cell(505,10,utf8_decode(\"TI. Fecha de creación: \").date(\"d-m-Y H:i\").\" \".\"Pag \".$this->PageNo(),0,0,'C'); \n }",
"function Footer()\n {\n $this->SetY(-15);\n\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }",
"protected function footer()\n {\n require SCRIPT_BASE . \"build/rox/templates/footer.php\";\n }",
"function setFooter($footer_template_name)\n\t{\n\t\tglobal\t$site_path;\n\n\t\t$footer_string\t\t=\t\t$this->gCache->cache_or_get(CACHE_CACHE_TIME_TINY, \"template\",$footer_template_name, \"load_template_file\",$footer_template_name);\n\n\n\t\t$basic_tags\t\t\t=\n\n\t\t\tarray\n\t\t\t(\n\t\t\t\t\"{{footer}}\"\t\t\t\t=>\t$footer_string,\n\t\t\t\t\"{{site_path}}\"\t\t\t\t=>\t$site_path,\n\t\t\t);\n\n\n\t\t# append the array\n\t\t$this->sub_tags($basic_tags);\n\n\t}",
"public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('helvetica','I',8);\n \n }",
"function Footer(){\n $this->SetY(-12);\n\n $this->Cell(0,5,'Page '.$this->PageNo(),0,0,'L');\n $this->Cell(0,5,iconv( 'UTF-8','cp874','วันที่พิมพ์ :'.date('d').'/'.date('m').'/'.(date('Y')+543)),0,0,\"R\");\n}",
"function Footer()\r\n {\r\n }",
"function extamus_change_admin_footer(){\n\t echo '<span id=\"footer-note\">Please dont hesitate to reach out to your friends at <a href=\"http://www.extamus.com/\" target=\"_blank\">Extamus Media</a> with any questions.</span>';\n\t}",
"function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}",
"function Footer(){\n\t}",
"public function displayContentFooter() {\n ?>\n <footer class=\"container-fluid text-center\">\n <p>IT360 Applied Database Systems Project By Harrison Bleckley, Drake Bodine, and Lani Davis</p>\n </footer>\n <?php\n }",
"public function Footer(){\n $this->SetFont('Arial','',8);\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(-10);\n $str = \"Elaborado Por Mercurio\";\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,'T',0,'L');\n $this->Cell(0,5,'Pagina '.$this->PageNo().' de {nb}','T',1,'R');\n }",
"function display_portal_footer()\r\n {\r\n Display :: footer();\r\n }",
"public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }",
"public static function footer()\n {\n require_once(getcwd() . \"/views/Template/footer.php\");\n }",
"function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }"
] | [
"0.7582049",
"0.75790864",
"0.7327594",
"0.7311569",
"0.730717",
"0.7288832",
"0.725705",
"0.72454345",
"0.7226048",
"0.7198613",
"0.7182465",
"0.71715087",
"0.7117021",
"0.7101465",
"0.7099482",
"0.7096122",
"0.7068294",
"0.7049024",
"0.704255",
"0.703959",
"0.7036456",
"0.70214003",
"0.7004642",
"0.69584376",
"0.69221884",
"0.6919073",
"0.6913474",
"0.6906159",
"0.6906159",
"0.68925285",
"0.6877968",
"0.6877028",
"0.68681055",
"0.68611306",
"0.6860572",
"0.68449646",
"0.6843231",
"0.6837013",
"0.6828738",
"0.682408",
"0.68216795",
"0.6810873",
"0.6807264",
"0.6801851",
"0.6801169",
"0.6787135",
"0.6782055",
"0.6748271",
"0.67421734",
"0.67350274",
"0.67335904",
"0.67229414",
"0.6721997",
"0.67193884",
"0.67193884",
"0.6718773",
"0.6715874",
"0.67050445",
"0.6696779",
"0.66924167",
"0.6691519",
"0.6685214",
"0.66794777",
"0.667825",
"0.6676033",
"0.6672966",
"0.66725355",
"0.6665909",
"0.66634274",
"0.6657375",
"0.66309446",
"0.661994",
"0.6611812",
"0.6609913",
"0.658998",
"0.6586751",
"0.6579545",
"0.6579545",
"0.65666527",
"0.65637696",
"0.65637696",
"0.65582377",
"0.65485984",
"0.65409565",
"0.65409565",
"0.6531782",
"0.65300757",
"0.6525285",
"0.652304",
"0.6515393",
"0.65034544",
"0.6502789",
"0.649439",
"0.64883095",
"0.6480409",
"0.648029",
"0.64791477",
"0.6461534",
"0.6436157",
"0.6435927"
] | 0.6622328 | 71 |
Set the SS template that this announcement should use to render with. The default is the FQCN | public function setTemplate($template)
{
$this->template = $template;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTemplate(string $template);",
"public function setTemplate($template);",
"public function setTemplate($template);",
"function setTemplate($template);",
"function _setTemplate($template = null) {\n if (empty($template)) {\n $backtrace = debug_backtrace();\n if (empty($backtrace[1]['function'])) {\n return $this->template = null;\n }\n $parent = $backtrace[1]['function'];\n $method = '';\n if ($parent == '__call') {\n $method = str_replace('send', '', $backtrace[2]['function']);\n } else {\n $method = $backtrace[1]['function'];\n }\n $template = Inflector::underscore($method);\n }\n $this->template = sprintf('%s%s%s',\n $this->_templateFolder(),\n DS,\n $template\n );\n }",
"function setTemplate($value) {\n $this->template = $value;\n }",
"public function setTemplate($template) {\n \n\n \t$this->display($template);\n }",
"public function setTemplate(string $template_name);",
"public function setTemplate($template = '')\n {\n $this->template = ROOT . DS . $this->configuration->get('app.name') . DS . 'view' . DS . $this->action . DS . $template . '.phtml';\n }",
"function setTemplate($template) {\n $this->template = $template;\n }",
"public function setTemplate($value);",
"function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}",
"public static function setTemplate($template)\n {\n self::$template = $template;\n }",
"public function setTemplateName($sTemplate)\n {\n $this->_sThisTemplate = $sTemplate;\n }",
"function set_template($template_name) {\n\t\t$this->template = $template_name;\n\t}",
"public function setTemplate($val){ return $this->setField('template',$val); }",
"public function setTemplate($template_string){\n\t\t$this->template = $template_string;\n\t}",
"private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }",
"public function setTemplate($template)\n\t{\n\t\t$this->template = $template;\n\t\t$this->pageInitialized = false;\n\t}",
"public function setTemplate($template)\n {\n // store instance of template\n\t\t$this->_template = $template;\n }",
"public static function setUpSiteTemplate($template){\n \t//get fontController and then get plugin instance\n \t$front = Zend_Controller_Front::getInstance();\n\t\t$st = $front->getPlugin('Hotspot_Plugin_ViewSetup');\n\t\t//set template number\n\t\t$st->setRenderLayout($template);\n }",
"function qa_set_template($template)\n{\n\tglobal $qa_template;\n\t$qa_template = $template;\n}",
"protected function setDefaultTemplate()\n {\n $defaultTemplate = $this->config->getKey('default_template');\n $this->setTemplate($defaultTemplate);\n }",
"public function setView($template);",
"public function template($template = NULL)\r\n\t{\r\n\t\t// No template name provided\r\n\t\tif ($template === NULL)\r\n\t\t\treturn $this;\r\n\r\n\t\t// We are a bit flexible in the names we accept\r\n\t\t$this->template = str_replace(array('-', ' '), '_', strtolower(trim($template)));\r\n\r\n\t\t// Chainable method\r\n\t\treturn $this;\r\n\t}",
"function setXTemplate($newXTemplate) {\n $this->xTemplate = $newXTemplate;\n}",
"public function setTemplate($template)\n {\n if(is_array($template)){\n $this->current_template = $this->igt_template;\n $this->setValue($template);\n }\n\n }",
"public function setTemplate( $template )\n\t{\n\t\t// Search for the template layout.\n\t\tif ( 'MAIN' == $this->context_name )\n\t\t{\n\t\t\t$found\t= false;\n\t\t\t$path\t= dirname( $template );\n\n\n\t\t\tfor ( $i = 0; !$found && $i < 3; $i++ )\n\t\t\t{\n\t\t\t\tif ( file_exists( TEMPLATE_PATH . $path . '/layout' . TEMPLATE_EXTENSION ) )\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t\t$path = $path . '/layout' . TEMPLATE_EXTENSION;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$path\t= dirname( $path );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $found )\n\t\t\t{\n\t\t\t\t$this->layout\t= $this->twig->loadTemplate( $path );\n\t\t\t}\n\t\t}\n\t\t$this->current_context['template'] = $this->twig->loadTemplate( $template );\n\t}",
"public function setTemplate($p);",
"protected function template($template) {\n if(is_string($template)){\n $template = AppTemplate::load($template);\n }\n return parent::template($template);\n }",
"function insert_template()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::insert('sssis', $parameter_array);\n }",
"function zenTemplate( $template ) {\n $this->_template = $template;\n $this->_get();\n }",
"public function setTemplate($template)\n {\n if (sfToolkit::isPathAbsolute($template))\n {\n print \">>>1\";\n $this->directory = dirname($template);\n $this->template = basename($template);\n }\n else\n {\n print \">>>2\";\n $this->directory = $this->context->getConfiguration()->getTemplateDir($this->moduleName, $template);\n $this->template = $template;\n }\n }",
"public function setEmailTpl($value){$this->_emailTpl = $value;}",
"public function template()\n {\n if ($this->template === null) {\n return 'charcoal/app/handler/layout';\n }\n\n return $this->template;\n }",
"public function template(string $template = \"\"): string|static\n {\n if ($template) {\n $this->template = $template;\n\n return $this;\n }\n\n return $this->template;\n }",
"public function setProfileTemplate ($template = null){\n $db = new db();\n $db->connect();\n if (isset($template)){\n $this->profileTemplate = $template;\n }\n\n $ini_file = conf::pathHtdocs() . \"/templates/$this->profileTemplate/$this->profileTemplate.ini\";\n $ini_file_dist = $ini_file . \"-dist\";\n\n if (conf::isCli()) {\n if (file_exists($ini_file_dist)){\n copy($ini_file_dist, $ini_file);\n }\n }\n $values = array('template' => $this->profileTemplate);\n return $db->update('settings', $values, 1); \n }",
"function update_template()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::update($this->id, 'sssis', $parameter_array);\n }",
"public function setTemplate($template)\n {\n $this->template = ($template === false) ? false : $template . '.html.twig';\n return true;\n }",
"protected function template() {\n\t\treturn '';\n\t}",
"public function setTemplate()\n {\n $root = &XCube_Root::getSingleton();\n $language = $root->mContext->getXoopsConfig('language');\n $this->mMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/user/language/' . $language . '/mail_template/');\n $this->mMailer->setTemplate('register.tpl');\n }",
"public function template(string $template): self\n {\n $this->template = $template;\n\n return $this;\n }",
"protected function setPageTemplate($template)\r\n {\r\n $this->pageTemplate = $template;\r\n }",
"public function set_template($template)\n\t{\n\t\t// On regarde si une modification du template existe\n\t\t$updated_template = dirname($template) . '/' . get_file_data(basename($template), 'filename') . '.updated';\n\t\tif (file_exists($updated_template))\n\t\t{\n\t\t\t$template = $updated_template;\n\t\t}\n\n\t\tif (!file_exists($template))\n\t\t{\n\t\t\ttrigger_error('Le template ' . $template . ' n\\'existe pas', FSB_ERROR);\n\t\t}\n\t\t\n\t\t// Recuperation du contenu du template\n\t\t$this->body = file_get_contents($template);\n\t}",
"public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }",
"public function get_chosen_template_name($template) {\n\t\treturn self::$template = $template;\n\t}",
"public function __construct($template = null)\n {\n $this->_template = $template;\n }",
"public function setTemplateType($value);",
"public function setTemplate($tpl_name){\n \tif($this->isAllowedToChangeTemplate()){\n \t\t$this->template = $tpl_name;\n \t\t$this->baseReplaces['tpl_folder'] = $this->getTemplateDir();\n \t\t$GLOBALS['tpl']['activeTemplate'] = $tpl_name;\n \t}\n }",
"public function __construct($template = null)\n {\n $this\n ->setTemplate($template);\n }",
"protected function setLayoutTemplate($template)\r\n {\r\n $this->layoutTemplate = $template;\r\n }",
"public function template($template)\n {\n $this->template = $template;\n\n return $this;\n }",
"public function setTemplate($template) {\n\t\t$this->template = $template;\n\n\t\treturn NULL;\n\t}",
"protected function display(string $template = null): void\n {\n if ($template !== null) {\n $this->templatePath = (string) $template;\n }\n }",
"function edd_pup_template(){\r\n\r\n\t$template = edd_get_option( 'edd_pup_template' );\r\n\r\n\tif ( ! isset( $template ) ) {\r\n\t\t$template = 'default';\r\n\t}\r\n\r\n\tif ( $template == 'inherit' ) {\r\n\t\treturn edd_get_option( 'email_template' );\r\n\t} else {\r\n\t\treturn $template;\r\n\t}\r\n}",
"public function setTemplate($nomtmp) {\r\n $filevue = \"application/templates/\" . $nomtmp . \".template.php\";\r\n if (file_exists($filevue)) {\r\n $this->template = $nomtmp;\r\n } else {\r\n die(\"template $filevue inexistante \");\r\n }\r\n }",
"public function setTpl($tpl)\n {\n $this->tpl = $tpl;\n }",
"protected function setupTemplate() {\r\n \r\n }",
"public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}",
"public function setTemplate(DataStreamTemplate $data_stream_template);",
"public function template($template)\n {\n $janrain = get_query_var('janrain');\n\n if ($janrain) {\n return Controller::serve($janrain);\n }\n\n return $template;\n }",
"public function setTemplate($file);",
"public static function setTemplate($name) {\n $settings = self::getSettings();\n \n $settings->template = $name;\n $settings->save();\n }",
"function modifyUITemplate(&$template) {\r\n\t\t$template->set('create',false);\r\n\t\t$template->set('usedomain',false);\r\n\t\t$template->set('useemail',true);\r\n\t}",
"public final function setTemplateBefore($template){\n\t\tself::$_templateBefore[get_class($this)] = $template;\n\t}",
"public function template($value) {\n return $this->setProperty('template', $value);\n }",
"public function template($value) {\n return $this->setProperty('template', $value);\n }",
"private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}",
"public function display($template) {\r\n\t\t\tif(!strpos($template, '.'))\r\n\t\t\t\t$template = \"$template.$this->defaultSuffix\";\r\n\t\t\techo $this->twig->render($template, $this->templateVariables);\r\n\t\t\treturn $this;\r\n\t\t}",
"function ca_services_node_template_access_summary($conf, $context) {\n if ($conf['ca_services_node_template'] == 'ca_services_node_template_one') {\n $template = t('Template one');\n }\n elseif ($conf['ca_services_node_template'] == 'ca_services_node_template_two') {\n $template = t('Template two');\n }\n else {\n $template = t('Template three');\n }\n\n return t('Display template is set to: ' . $template);\n}",
"public function setTemplateSet($templateSet){\n\t\t$this->templateSet = $templateSet;\n\t}",
"public function setTemplate($template)\n {\n if (!($template instanceof KTemplateAbstract)) {\n if (is_string($template) && strpos($template, '.') === false) {\n $identifier = clone $this->getIdentifier();\n $identifier->path = array('template');\n $identifier->name = $template;\n } else {\n $identifier = $this->getIdentifier($template);\n }\n\n if ($identifier->path[0] != 'template') {\n throw new KViewException('Identifier: '.$identifier.' is not a template identifier');\n }\n\n register_default(array('identifier' => $identifier, 'prefix' => $this, 'name' => array('Template'.ucfirst($this->getName()), 'TemplateDefault')));\n\n $template = $identifier;\n }\n\n $this->_template = $template;\n\n return $this;\n }",
"public function setTemplate(CsviHelperTemplate $template)\n\t{\n\t\t$this->template = $template;\n\t}",
"function setCustomTemplate($isCustomTemplate) {\n\t\t$this->isCustomTemplate = $isCustomTemplate;\n\t}",
"function setCustomTemplate($isCustomTemplate) {\n\t\t$this->isCustomTemplate = $isCustomTemplate;\n\t}",
"function set_template($group) {\n if (isset($this->config[$group])) {\n $this->template = $this->config[$group];\n } else {\n show_error('The \"' . $group . '\" template group does not exist. Provide a valid group name or add the group first.');\n }\n $this->initialize($this->template);\n }",
"protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }",
"abstract protected function setTemplate($item);",
"protected function getTemplate() {\n\t\treturn new Template('Premanager', 'changeEmail');\n\t}",
"function get_template_name($instance) {\n return 'template';\n }",
"function set_template( $template_file = 'template.php' )\n {\n // make sure that $template_file has .php extension\n $template_file = substr( $template_file, -4 ) == '.php' ? $template_file : ( $template_file . \".php\" );\n\n $this->template = \"../../{$this->settings->root_folder}/themes/{$this->settings->theme}/{$template_file}\";\n }",
"function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }",
"public function setTemplate($tpl)\n {\n if(isset($tpl) && !empty($tpl))\n {\n $this->template = $tpl;\n $this->css->setTemplate($tpl);\n $this->js->setTemplate($tpl);\n }\n }",
"protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}",
"function get_template_name( $instance ) {\n\t\t\treturn isset($instance['template']) ? $instance['template'] : 'base';\n\t\t}",
"public function setTemplate($template)\n {\n if (empty($template)) {\n $this->template = null;\n return $this;\n }\n\n if (!is_string($template)) {\n throw new InvalidArgumentException(\n 'Handler view template must be a string identifier.'\n );\n }\n\n $this->template = $template;\n return $this;\n }",
"public function setSource($templateSource)\n {\n $this->fluidTemplate->setTemplateSource($templateSource);\n }",
"public function set_template($p_template)\n {\n global $g_dirs;\n $this->m_template_file = $g_dirs[\"class\"] . DS . \"modules\" . DS . \"jdisc\" . DS . \"templates\" . DS . \"content\" . DS . \"bottom\" . DS . \"content\" . DS . $p_template;\n\n return $this;\n }",
"function modifyUITemplate( &$template, &$type ) {\n $template->set( 'usedomain', false );\n }",
"protected function _content_template() {\n \n }",
"final public function getTemplate() {\n\t\treturn '';\n\t}",
"public function setTemplateId($value);",
"function setXTemplatePath($value) {\n $this->xTemplatePath= $value;\n}",
"function ca_video_gallery_list_template_access_summary($conf, $context) {\n if ($conf['ca_video_gallery_list_template'] == 'ca_video_gallery_list_template_one') {\n $template = t('Template One');\n }\n elseif ($conf['ca_video_gallery_list_template'] == 'ca_video_gallery_list_template_two') {\n $template = t('Template Two');\n }\n else {\n $template = t('Template Three');\n }\n return t('Display template is set to: ' . $template);\n}",
"function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }",
"protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}",
"public function template()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/template', [\n\t\t\t'templates_availables' => $this->templates_availables,\n\t\t]);\n\t}",
"protected function _getTemplateName()\n {\n $tag = $this->getTemplateTag();\n $lang = app()->getLocale();\n $fallbackLang = config('app.fallback_locale');\n\n $name = \"mail_{$tag}_{$lang}\";\n\n if (empty(setting($name))) return \"mail_{$tag}_{$fallbackLang}\";\n\n return $name;\n }",
"function default_template_shipping ()\r\n{\r\n$template = '\r\n{shipping_content alias=$shipping_alias}\r\n';\r\nreturn $template;\r\n}"
] | [
"0.6720405",
"0.65640235",
"0.65640235",
"0.64706266",
"0.6376285",
"0.6333843",
"0.6333431",
"0.6281091",
"0.6278573",
"0.62737405",
"0.6271603",
"0.62185913",
"0.61983925",
"0.6180355",
"0.6164226",
"0.6161687",
"0.6104155",
"0.6051642",
"0.59688145",
"0.5959936",
"0.59526575",
"0.5909991",
"0.5894475",
"0.5888422",
"0.58590144",
"0.5790671",
"0.5782006",
"0.5704915",
"0.56826645",
"0.5647396",
"0.5631182",
"0.56286085",
"0.56218714",
"0.56192404",
"0.56106",
"0.5607873",
"0.56048584",
"0.5592335",
"0.5573229",
"0.5567734",
"0.5564284",
"0.5544097",
"0.5523349",
"0.5519692",
"0.55169594",
"0.5513299",
"0.5511653",
"0.55027294",
"0.5500297",
"0.5497611",
"0.54717666",
"0.5455649",
"0.5453263",
"0.5422151",
"0.54163295",
"0.539542",
"0.53896445",
"0.53894216",
"0.5381663",
"0.5380471",
"0.53713405",
"0.5370019",
"0.5365875",
"0.53547835",
"0.53410095",
"0.5328876",
"0.5328876",
"0.53285885",
"0.5325125",
"0.53238225",
"0.53060937",
"0.52946573",
"0.52928746",
"0.52795374",
"0.52795374",
"0.5254936",
"0.52497256",
"0.5245446",
"0.5244382",
"0.5231814",
"0.5231633",
"0.5230868",
"0.52280474",
"0.522476",
"0.52222747",
"0.5210888",
"0.52037215",
"0.5203651",
"0.51894677",
"0.5173727",
"0.5172281",
"0.51647526",
"0.5153299",
"0.5146988",
"0.5141427",
"0.5130948",
"0.51297635",
"0.5124296",
"0.51225734"
] | 0.6108657 | 16 |
Return the template to render this announcement with | public function getTemplate()
{
return $this->template;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function forTemplate()\n {\n return $this->renderWith($this->defaultTemplate());\n }",
"protected function template() {\n\t\treturn '';\n\t}",
"public function render()\n\t{\n\t\t$template = $this->template\n\t\t\t? '<div class=\"wkm-template\" for=\"' .$this->id. '\">' .$this->template. '</div>'\n\t\t\t: '';\n\n\t\treturn parent::render().$template;\n\t}",
"public function template()\n {\n if ($this->template === null) {\n return 'charcoal/app/handler/layout';\n }\n\n return $this->template;\n }",
"final public function getTemplate() {\n\t\treturn '';\n\t}",
"public function provideForTemplate() {\n\t\treturn $this()->renderWith($this()->ContentType);\n\t}",
"public function renderTemplate();",
"public function forTemplate()\n {\n if (!$this->canBeCached()) {\n HTTPCacheControlMiddleware::singleton()->disableCache();\n }\n\n $context = $this;\n $this->extend('onBeforeRender', $context);\n\n $return = $context->renderWith($context->getTemplates());\n\n // Now that we're rendered, clear message\n $context->clearMessage();\n\n return $return;\n }",
"public function template()\n {\n return view('admin::dashboard.template');\n }",
"public function getHtmlTemplate() {}",
"protected function getTemplate() {\n\t\treturn new Template('Premanager', 'changeEmail');\n\t}",
"protected function content_template() {}",
"protected function content_template() {}",
"protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}",
"public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }",
"public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}",
"public function render()\n {\n return $this\n ->blade_instance\n ->view()\n ->make(static::TEMPLATE_NAME, $this->entity_data)\n ->render();\n }",
"protected function get_template() {\n\t\treturn 'post';\n\t}",
"public function returnTemplate() {\n\t\treturn $this->template;\n\t}",
"private function renderTemplate()\n {\n $this->html = view($this->template, [$this->contextAs => $this->viewData])->render();\n\n // We may try to minify the html before storing it in cache to save space.\n if (env('WIDGET_MINIFICATION', false)) {\n $this->minifyHtml();\n }\n\n // We add some comments to be able to easily identify the widget in browser's developer tool.\n if(env('WIDGET_IDENTIFIER',false)){\n $this->addIdentifierToHtml();\n }\n\n return $this->html;\n }",
"public function renderStatic()\n {\n return $this->template;\n }",
"public function getTemplate() {}",
"protected function _content_template() {\n \n }",
"public function getTemplate()\r\n {\r\n return $this->_customTemplate;\r\n }",
"public function getMessageTemplate() {\n\t\treturn $this->messageTemplate;\n\t}",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function render()\n {\n return $this->getTemplateName();\n }",
"public function getTemplate()\n {\n return 'Components/renderRapport.html.twig';\n }",
"public function get_template() {\n return $this->_template;\n }",
"public function render()\n {\n parent::render();\n\n $oContent = $this->getContent();\n if ($oContent && !$this->_canShowContent($oContent->oxcontents__oxloadid->value)) {\n oxRegistry::getUtils()->redirect($this->getConfig()->getShopHomeURL() . 'cl=account');\n }\n\n $sTpl = false;\n if ($sTplName = $this->_getTplName()) {\n $this->_sThisTemplate = $sTpl = $sTplName;\n } elseif ($oContent) {\n $sTpl = $oContent->getId();\n }\n\n if (!$sTpl) {\n error_404_handler();\n }\n\n // sometimes you need to display plain templates (e.g. when showing popups)\n if ($this->showPlainTemplate()) {\n $this->_sThisTemplate = $this->_sThisPlainTemplate;\n }\n\n if ($oContent) {\n $this->getViewConfig()->setViewConfigParam('oxloadid', $oContent->getLoadId());\n }\n\n return $this->_sThisTemplate;\n }",
"public function get_template()\n {\n }",
"public function get_template()\n {\n }",
"public function render()\n {\n $template = $this->extractTemplate($this->presentation);\n\n if (null === $template)\n {\n return null;\n }\n\n $html = '';\n\n if (!empty($template))\n {\n $html .= $this->templatesService->render($template, $this->arguments);\n }\n\n return $html;\n }",
"public function template()\n {\n return $this->getView('flagrow.download.templates::image-preview');\n }",
"public function getTemplate() {\n return $this->template;\n }",
"public function renderTemplate()\n {\n $template[] = '<div class=\"slides\"></div>';\n $template[] = '<h3 class=\"title\"></h3>';\n $template[] = '<a class=\"prev text-light\">‹</a>';\n $template[] = '<a class=\"next text-light\">›</a>';\n $template[] = '<a class=\"close text-light\"></a>';\n $template[] = '<a class=\"play-pause\"></a>';\n $template[] = '<ol class=\"indicator\"></ol>';\n return Html::tag('div', implode(\"\\n\", $template), $this->templateOptions);\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"public function html()\n {\n return $this->builder() \n ->columns($this->getColumns())\n ->addColumnBefore($this->getSrNoColumn())\n ->addColumn($this->getActionColumn())\n ->ajax([\n 'url' => url('admin/email-template'),\n 'type' => 'GET',\n 'data' => 'function(d) { d.timezone = $.laravel.datetime.getTimeZone(); }',\n ])\n ->parameters($this->getBuilderParameters());\n }",
"protected function get_entry_template() {\n if ($this->_entrytemplate === null) {\n $this->_entrytemplate = '';\n if ($this->param2) {\n // Apply text filters to template.\n $formatoptions = array(\n 'para' => false,\n 'allowid' => true,\n 'trusted' => true,\n 'noclean' => true\n );\n $this->_entrytemplate = format_text($this->param2, FORMAT_HTML, $formatoptions);\n }\n }\n return $this->_entrytemplate;\n }",
"public function get_email_template() {\n\t\t// determine which template file to use\n\t\t$template_file = locate_template( sprintf( 'templates/emails/%s.php', $this->get_key() ) );\n\t\tif ( ! $template_file ) {\n\t\t\t$template_file = locate_template( 'templates/emails/default.php' );\n\t\t}\n\n\t\t// load template\n\t\tob_start();\n\t\trequire $template_file;\n\t\t$template = ob_get_clean();\n\n\t\t// inline styles\n\t\ttry {\n\t\t\t$emogrifier = new \\MyListing\\Utils\\Emogrifier( $template );\n\t\t\t$rendered_template = $emogrifier->emogrify();\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// if inline styles can't be applied, use the original markup as the message body\n\t\t\t$rendered_template = $template;\n\t\t}\n\n\t\treturn $rendered_template;\n\t}",
"public function render()\n {\n parent::render();\n\n // is logged in ?\n $oUser = $this->getUser();\n if (!$oUser) {\n return $this->_sThisTemplate = $this->_sThisLoginTemplate;\n }\n\n return $this->_sThisTemplate;\n }",
"public function render()\n {\n $html = System::template('admin/v_main.php', [\n 'title' => $this->title,\n 'content' => $this->content,\n ]);\n \n return $html;\n }",
"public function render()\n {\n parent::render();\n\n $soxId = $this->getEditObjectId();\n if ($soxId != \"-1\" && isset($soxId)) {\n // load object\n $oNewsletter = oxNew(\"oxnewsletter\");\n $oNewsletter->load($soxId);\n $this->_aViewData[\"edit\"] = $oNewsletter;\n\n // user\n $sUserID = oxRegistry::getSession()->getVariable(\"auth\");\n\n // assign values to the newsletter and show it\n $oNewsletter->prepare($sUserID, $this->getConfig()->getConfigParam('bl_perfLoadAktion'));\n\n $this->_aViewData[\"previewhtml\"] = $oNewsletter->getHtmlText();\n $this->_aViewData[\"previewtext\"] = $oNewsletter->getPlainText();\n }\n\n return \"newsletter_preview.tpl\";\n }",
"public function __toString()\n {\n return $this->view->fetch($this->template);\n }",
"protected function getTemplate(){\n\t\treturn 'invoice_form_html.tpl';\n\t}",
"public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }",
"public function __toString()\n {\n return $this->viewTemplate;\n }",
"public function getTemplate(){\n\t\treturn $this->template;\n\t}",
"public function render() {\n\t\treturn $this->template( 'page' );\n\t}",
"public function getTemplate() {\r\n return $this->_template;\r\n }",
"public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}",
"public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}",
"protected function content_template() {\n\t}",
"protected function render_template() {\n\t\t?>\n\t\t<li id=\"accordion-section-{{ data.id }}\" class=\"accordion-section control-section control-section-{{ data.type }} cannot-expand\">\n\t\t\t<h3 class=\"accordion-section-title\">\n\t\t\t\t{{ data.title }}\n\t\t\t\t<a href=\"{{ data.button_url }}\" class=\"button alignright\" target=\"_blank\" rel=\"nofollow\">{{ data.button_text }}</a>\n\t\t\t</h3>\n\t\t</li>\n\t\t<?php\n\t}",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}",
"public function render()\n {\n if (is_archive()) {\n // Archive stuff\n } else {\n // Get Template vars\n $context = Timber::get_context();\n $post = new \\TimberPost();\n $context['post'] = $post;\n // Render Template\n Timber::render('pages/single-book.twig', $context);\n }\n }",
"public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}",
"protected function _content_template()\n {\n\n }",
"public function getContent()\r\n {\r\n return $this->template;\r\n }",
"protected function getTpl()\n\t{\n\t\treturn 'ActivityStateModal.tpl';\n\t}",
"public static function getTemplate() {\n $settings = self::getSettings();\n \n return $settings->template;\n }",
"public static function renderTemplate()\n {\n echo self::$template;\n }",
"public function template()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/template', [\n\t\t\t'templates_availables' => $this->templates_availables,\n\t\t]);\n\t}",
"public function render()\n {\n return view('components.layout.footer-latest-post', [\n 'post' => $this->postRepository->getLatestPost(),\n ]);\n }"
] | [
"0.69763005",
"0.69255555",
"0.6916336",
"0.68359303",
"0.67668706",
"0.6755597",
"0.66481274",
"0.6626279",
"0.65985006",
"0.65972877",
"0.65707386",
"0.65576315",
"0.65576315",
"0.6554446",
"0.64819413",
"0.64138633",
"0.640421",
"0.6400523",
"0.6397581",
"0.63860935",
"0.6371027",
"0.6351857",
"0.6337459",
"0.6331794",
"0.6323717",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.63147414",
"0.6313896",
"0.6305815",
"0.6296712",
"0.6287601",
"0.6284897",
"0.6284026",
"0.62729645",
"0.62692183",
"0.6261463",
"0.6260656",
"0.62566346",
"0.62566346",
"0.62566346",
"0.62566346",
"0.62566346",
"0.62566346",
"0.62505376",
"0.62489283",
"0.62489283",
"0.62489283",
"0.62483084",
"0.62356156",
"0.6232301",
"0.6229309",
"0.62195337",
"0.6201495",
"0.61931264",
"0.6185981",
"0.6175082",
"0.61684626",
"0.61607534",
"0.6158578",
"0.6153206",
"0.61461055",
"0.61461055",
"0.6130955",
"0.6127851",
"0.6126054",
"0.6126054",
"0.6126054",
"0.6126054",
"0.6126054",
"0.6126054",
"0.61198556",
"0.61169314",
"0.6111344",
"0.609691",
"0.60882974",
"0.6078453",
"0.6075211",
"0.60733575",
"0.6068109",
"0.6064901"
] | 0.6309457 | 47 |
CX Events List Section Helpers functions to display events related data in the grid | function obj_cx_events_list_section( $events, $bottom_banner, $pagination, $event_list_deets = null, $section_classes = null, $bg_shapes = null ) {
$sec_meta = decide_section_meta( 'event-list-section', $section_classes, $event_list_deets, $bg_shapes );
if ( ! empty( $event_list_deets ) ) {
do_section_top( $sec_meta );
obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets );
do_section_bottom( $sec_meta );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}",
"function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }",
"function event_grid_view() {\n\tsp_calendar_grid();\n}",
"function obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets = null ) {\n echo '<h3 class=\"section-title green\">Upcoming events</h3>';\n obj_do_cx_events_list_filter( $events );\n obj_do_cx_events_list( $events );\n obj_do_cx_event_bottom_banner_output( $bottom_banner );\n obj_do_cx_events_list_pagination( $pagination );\n}",
"function showEvents() {\r\n\r\n\t// Lets import some globals, shall we?\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\tglobal $TIMEMARK;\r\n\t$delta = $TIMEMARK -259200;\r\n\t\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\r\n\t// Load all events.\r\n\t$EVENTS_DS = $DB->query(\"SELECT * FROM events WHERE starttime >= '\" . $delta . \"' ORDER BY starttime ASC\");\r\n\r\n\t// .. right?\r\n\tif ($EVENTS_DS->numRows() >= 1) {\r\n\r\n\t\t// Lets keep in mind: We have events.\r\n\t\t$haveEvents = true;\r\n\r\n\t\twhile ($event = $EVENTS_DS->fetchRow()) {\r\n\r\n\t\t\t// get the date.\r\n\t\t\t$date = date(\"d.m.y\", $event[starttime]);\r\n\r\n\t\t\t// open up a new table for each day.\r\n\t\t\tif ($date != $previousdate) {\r\n\r\n\t\t\t\t$workday = date(\"l\", $event[starttime]);\r\n\r\n\t\t\t\tif ($beenhere) {\r\n\t\t\t\t\t$html .= $temp->flush();\r\n\t\t\t\t\t$html .= \"<br>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$beenhere = true;\r\n\r\n\t\t\t\t// We need an additional row if we are allowed to delete events.\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp = new table(8, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$temp = new table(7, true);\r\n\t\t\t\t}\r\n\t\t\t\t$temp->addHeader(\">> Events for \" . $workday . \", the \" . $date);\r\n\t\t\t\t$previousdate = $date;\r\n\r\n\t\t\t\t$temp->addRow(\"#060622\");\r\n\t\t\t\t$temp->addCol(\"ID\");\r\n\t\t\t\t$temp->addCol(\"Starttime\");\r\n\t\t\t\t$temp->addCol(\"Starts in / Runs for\");\r\n\t\t\t\t$temp->addCol(\"Mission Type\");\r\n\t\t\t\t$temp->addCol(\"Short Description\");\r\n\t\t\t\t$temp->addCol(\"System\");\r\n\t\t\t\t$temp->addCol(\"Security\");\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp->addCol(\"Delete\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add Event to the current database.\r\n\t\t\t$temp->addRow();\r\n\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=showevent&id=\" . $event[id] . \"\\\">\" . str_pad($event[id], 4, \"0\", STR_PAD_LEFT) . \"</a>\");\r\n\t\t\t$temp->addCol(date(\"d.m.y H:i\", $event[starttime]));\r\n\r\n\t\t\t$delta = $TIMEMARK - $event[starttime];\r\n\t\t\tif ($TIMEMARK > $event[starttime]) {\r\n\t\t\t\t// Event underway.\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#00ff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t} else {\r\n\t\t\t\t// Event not started yet.\r\n\t\t\t\t$delta = $delta * -1;\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#ffff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t}\r\n\r\n\t\t\t$temp->addCol($event[type]);\r\n\t\t\t$temp->addCol($event[sdesc]);\r\n\t\t\t$temp->addCol($event[system]);\r\n\t\t\t$temp->addCol($event[security]);\r\n\t\t\t\r\n\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=deleteevent&id=$event[id]\\\">delete event</a>\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Lets recall, did we have events scheduled?\r\n\tif ($haveEvents) {\r\n\t\t// We do!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2>\" . $html . $temp->flush();\r\n\t} else {\r\n\t\t// We dont!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>\";\r\n\t}\r\n\t// Return what we got.\r\n\treturn ($html);\r\n\r\n}",
"function listEventInfo() {\n\t\t$query = \"SELECT e_description, c_name, tag_name, start_datetime, end_datetime, capacity, v.name AS vname, address,o.name AS oname, v.address, v.city, v.state, v.postal_code \n\t\tFROM yam14.F_event e, yam14.F_venue v, yam14.F_category c, yam14.F_topic t, yam14.F_organizer o\n\t\tWHERE e.venue_id = v.v_id \n\t\tAND c.c_id = e.c_id \n\t\tAND t.tag_id = e.tag_id \n\t\tAND o.o_id = e.organizer_id\n\t\tAND e.e_id = $this->eid ;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->category = $row['c_name'];\n\t\t\t$this->tag = $row['tag_name'];\n\t\t\t$this->description = $row['e_description'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t$this->capacity = $row['capacity'];\n\t\t\t$this->venue = $row['vname'];\n\t\t\t$this->address = $row['address'] . \", \" . $row['city'] . \", \" . $row['state'] . \" \" . $row['postal_code'];\n\t\t\t$this->organizer = $row['oname'];\n\t\t\techo \"<hr />\";\n\t\t\techo \"<div class=\\\"panel panel-default\\\">\";\n\t\t\techo \t\"<div class=\\\"panel-heading\\\">\";\n\t\t\techo \t\"<h3 class=\\\"panel-title\\\">Event Information</h3>\";\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"<div class=\\\"panel-body\\\">\";\n\t\t\techo \"<p><b>Description: </b>$this->description</p>\";\n\t\t\techo \t\"<p><b>Category: </b>$this->category</p>\";\n\t\t\techo \t\"<p><b>Topic: </b>$this->tag</p>\";\n\t\t\techo \t\"<p><b>Start Date: </b>$this->startdate</p>\";\n\t\t\techo \t\"<p><b>Start Time: </b>$this->starttime</p>\";\n\t\t\techo \t\"<p><b>End Date: </b>$this->enddate</p>\";\n\t\t\techo \t\"<p><b>End Time: </b>$this->endtime</p>\";\n\t\t\techo \t\"<p><b>Capacity: </b>$this->capacity</p>\";\n\t\t\techo \t\"<p><b>Organizer: </b>$this->organizer</p>\";\n\t\t\techo \t\"<p><b>Location: </b>$this->venue</p>\";\n\t\t\techo \t\"<p><b>Address: </b>$this->address</p>\";\n\t\t\t\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"</div>\";\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t}",
"function display_list(){\n\t\t\t$this->load->model('admin_career_event_model');\n\t\t\t$this->gen_contents['modal_path'] \t= '/career_event/class_details';\n\t\t\t$this->gen_contents['current_date']\t= $_POST['datecurrent'];\n \n $chp_list = $this->config->item('chapter_list');\n\t\t\t$this->gen_contents['arr_list'] \t= $this->admin_career_event_model->dbGetEventListWithSearchUser($_POST,$chp_list);\n\t\t\t$this->load->view('user/career_event/display_list_event',$this->gen_contents);\n\t\t}",
"function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}",
"public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }",
"public function eventsAction()\n {\n $events = $this->manager->getRepository('Event\\Doctrine\\Orm\\Event')->findBy(array(), array('date' => 'ASC'));\n\n return $this->renderView('events', array(\n 'title' => 'Zusammenfassung der Grillveranstaltungen',\n 'events' => $events,\n 'meals' => $this->createMealsList($events),\n ));\n }",
"public function eventsList()\n {\n $alumniId = session('alumni_id');\n $alumni = AlumniBasicInfo::find($alumniId);\n $events = Event::where('dept_info_id',$alumni->dept_info_id)->latest()->paginate(3);\n return view('frontend.events.events-list',compact('events'));\n }",
"function render_list($events,$detail_flag){\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\n\t\t$return_val=$return_val.\"<table>\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\n\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"<b>\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"(\".($i+1).\") \";\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"<a href=\\\"#\".($i+1).\"\\\">\";\n\t\t\t}\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"</b>\";\n\t\t\t}\n\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"</a>\";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$date=$next_event->get_start_date_object();\n\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\" \";\n\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\". \";\n\t\t\t$return_val=$return_val.$next_event->get_start_day().\", \";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\" - \";\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\" \";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Topic: '.(htmlspecialchars($next_event->get_event_topic_name()));\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Type: '.(htmlspecialchars($next_event->get_event_type_name()));\n\n\t\t\t$return_val=$return_val.\"</td></tr>\";\n\t\t\t$i=$i+1;\n\t\t}\n\n\t\tif ($detail_flag==\"on\") {\n\n\t\t\tif ($number_of_events >0)\n\t\t\t\t$return_val=$return_val.\"<tr><td>---------------------------------------------------</td></tr>\";\n\t\t\t$i=0;\n\n\t\t\twhile($i<$number_of_events){\n\t\t\t\t$next_event=$events[$i];\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\"><b>';\n\t\t\t\t$return_val=$return_val.'<a name=\"'.($i+1).'\"></a>';\n\t\t\t\t$return_val=$return_val.\"(\".($i+1).\") \";\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t\t$return_val=$return_val.\"</b></td></tr>\";\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$date=$next_event->get_start_date_object();\n\n\t\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\" \";\n\t\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\". \";\n\t\t\t\t$return_val=$return_val.$next_event->get_start_day().\", \";\n\n\t\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.$display_timerange;\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\" \";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_location_details()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.\"Contact:<br />\";\n\n\t\t\t\tif (strlen(trim($next_event->get_contact_name()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_name()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_phone()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_phone()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_email()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_email()).\"<br />\";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'</td><tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td> </td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.(nl2br($next_event->get_description()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.\"<tr><td> </td></tr>\";\n\t\t\t\t$i=$i+1;\n\t\t\t}\n\t\t}\n\n\t\t$return_val=$return_val.'</table>';\n\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \" \";\n\t\t}\n\t\treturn $return_val;\n\t}",
"public function indexAction() {\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t// Get subject and check auth\n\t\t$subject = Engine_Api::_()->core()->getSubject('event');\n\t\tif (!$subject->authorization()->isAllowed($viewer, 'view')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t// Prepare data\n\t\t$this->view->event = $event = $subject;\n\t\t$limit =$this->_getParam('max',5);\n\t\t$currentDay = date('Y') . '-' . date('m') . '-' . date('d');\n\t\t\n\t\t$table = Engine_Api::_()->getItemTable('event');\n\t\t$select = $table->select()\n ->where('category_id = ?', $event->category_id)\n ->where('event_id != ?', $event->getIdentity())\n ->order(\"DATEDIFF('{$currentDay}', starttime) DESC\")\n ->limit($limit);\n\n\t\t$showedEvents = $table->fetchAll($select);\n\t\t$this->view->showedEvents = $showedEvents;\n\t\t// Hide if nothing to show\n\t\tif( count($showedEvents) <= 0 ) {\n\t return $this->setNoRender();\n\t }\n }",
"function loadEvents() {\n $events = Event::orderBy('date', 'desc')->paginate(10);\n \n return view('cms.events', ['events' => $events]);\n }",
"private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}",
"private function _get_event_entries()\n\t{\n\t\t// --------------------------------------\n\t\t// Default status to open\n\t\t// --------------------------------------\n\n\t\tif ( ! $this->EE->TMPL->fetch_param('status'))\n\t\t{\n\t\t\t$this->EE->TMPL->tagparams['status'] = 'open';\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Start composing query\n\t\t// --------------------------------------\n\n\t\t$this->EE->db->select($this->model->entry_attributes('e.'))\n\t\t ->from($this->model->table(). ' e')\n\t\t ->join('channel_titles t', 'e.entry_id = t.entry_id')\n\t\t ->where_in('t.site_id', $this->EE->TMPL->site_ids);\n\n\t\t// --------------------------------------\n\t\t// Apply simple filters\n\t\t// --------------------------------------\n\n\t\t$filters = array(\n\t\t\t'entry_id' => 't.entry_id',\n\t\t\t'url_title' => 't.url_title',\n\t\t\t'channel_id' => 't.channel_id',\n\t\t\t'author_id' => 't.author_id',\n\t\t\t'status' => 't.status'\n\t\t);\n\n\t\tforeach ($filters AS $param => $attr)\n\t\t{\n\t\t\t$this->_simple_filter($param, $attr);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Filter by events field, prefixed\n\t\t// --------------------------------------\n\n\t\t$this->_event_field_filter('e');\n\n\t\t// --------------------------------------\n\t\t// Are we getting all events or just upcoming\n\t\t// --------------------------------------\n\n\t\tif ($this->EE->TMPL->fetch_param('show_passed') == 'no')\n\t\t{\n\t\t\t$this->EE->db->where('e.end_date >=', $this->today);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Filter by channel name\n\t\t// --------------------------------------\n\n\t\tif ($channel = $this->EE->TMPL->fetch_param('channel'))\n\t\t{\n\t\t\t// Determine which channels to filter by\n\t\t\tlist($channel, $in) = low_explode_param($channel);\n\n\t\t\t// Adjust query accordingly\n\t\t\t$this->EE->db->join('channels c', 'c.channel_id = t.channel_id');\n\t\t\t$this->EE->db->{($in ? 'where_in' : 'where_not_in')}('c.channel_name', $channel);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Filter by category\n\t\t// --------------------------------------\n\n\t\tif ($categories_param = $this->EE->TMPL->fetch_param('category'))\n\t\t{\n\t\t\t// Determine which categories to filter by\n\t\t\tlist($categories, $in) = low_explode_param($categories_param);\n\n\t\t\t// Allow for inclusive list: category=\"1&2&3\"\n\t\t\tif (strpos($categories_param, '&'))\n\t\t\t{\n\t\t\t\t// Execute query the old-fashioned way, so we don't interfere with active record\n\t\t\t\t// Get the entry ids that have all given categories assigned\n\t\t\t\t$query = $this->EE->db->query(\n\t\t\t\t\t\"SELECT entry_id, COUNT(*) AS num\n\t\t\t\t\tFROM exp_category_posts\n\t\t\t\t\tWHERE cat_id IN (\".implode(',', $categories).\")\n\t\t\t\t\tGROUP BY entry_id HAVING num = \". count($categories));\n\n\t\t\t\t// If no entries are found, make sure we limit the query accordingly\n\t\t\t\tif ( ! ($entry_ids = low_flatten_results($query->result_array(), 'entry_id')))\n\t\t\t\t{\n\t\t\t\t\t$entry_ids = array(0);\n\t\t\t\t}\n\n\t\t\t\t$this->EE->db->{($in ? 'where_in' : 'where_not_in')}('t.entry_id', $entry_ids);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Join category table\n\t\t\t\t$this->EE->db->join('category_posts cp', 'cp.entry_id = t.entry_id');\n\t\t\t\t$this->EE->db->{($in ? 'where_in' : 'where_not_in')}('cp.cat_id', $categories);\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Hide expired entries\n\t\t// --------------------------------------\n\n\t\tif ($this->EE->TMPL->fetch_param('show_expired', 'no') != 'yes')\n\t\t{\n\t\t\t$this->EE->db->where('(t.expiration_date = 0 OR t.expiration_date >= '.$this->date->now().')');\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Hide future entries\n\t\t// --------------------------------------\n\n\t\tif ($this->EE->TMPL->fetch_param('show_future_entries', 'no') != 'yes')\n\t\t{\n\t\t\t$this->EE->db->where('t.entry_date <=', $this->date->now());\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Handle search fields\n\t\t// --------------------------------------\n\n\t\tif ($search_fields = $this->_search_where($this->EE->TMPL->search_fields, 'd.'))\n\t\t{\n\t\t\t// Join exp_channel_data table\n\t\t\t$this->EE->db->join('channel_data d', 't.entry_id = d.entry_id');\n\t\t\t$this->EE->db->where(implode(' AND ', $search_fields), NULL, FALSE);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Return the results\n\t\t// --------------------------------------\n\n\t\treturn $this->EE->db->get()->result_array();\n\t}",
"function displayLatestEvents()\n\t{\n\t\t$viewname = $this->getTheme();\n\n\t\t$cfg = JEVConfig::getInstance();\n\n\t\t// override global start now setting so that timelimit plugin can use it!\n\t\t$compparams = ComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t$startnow = $compparams->get(\"startnow\", 0);\n\t\t$compparams->set(\"startnow\", $this->modparams->get(\"startnow\", 0));\n\t\t$this->getLatestEventsData();\n\t\t$compparams->set(\"startnow\", $startnow);\n\n\t\t$content = \"\";\n\n\t\t$k = 0;\n\t\tif (isset($this->eventsByRelDay) && count($this->eventsByRelDay))\n\t\t{\n\t\t\t$content .= $this->getModuleHeader('<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">');\n\n\t\t\t// Now to display these events, we just start at the smallest index of the $this->eventsByRelDay array\n\t\t\t// and work our way up.\n\n\t\t\t$firstTime = true;\n\n\t\t\t// initialize name of com_jevents module and task defined to view\n\t\t\t// event detail. Note that these could change in future com_event\n\t\t\t// component revisions!! Note that the '$this->itemId' can be left out in\n\t\t\t// the link parameters for event details below since the event.php\n\t\t\t// component handler will fetch its own id from the db menu table\n\t\t\t// anyways as far as I understand it.\n\n\t\t\t$this->processFormatString();\n\n\t\t\tforeach ($this->eventsByRelDay as $relDay => $daysEvents)\n\t\t\t{\n\n\t\t\t\treset($daysEvents);\n\n\t\t\t\t// get all of the events for this day\n\t\t\t\tforeach ($daysEvents as $dayEvent)\n\t\t\t\t{\n\n\t\t\t\t\tif ($this->processTemplate($content, $dayEvent))\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$eventcontent = \"\";\n\n\t\t\t\t\t// generate output according custom string\n\t\t\t\t\tforeach ($this->splitCustomFormat as $condtoken)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (isset($condtoken['cond']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($condtoken['cond'] == 'a' && !$dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!a' && $dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'e' && !($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!e' && ($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!m' && $dayEvent->getUnixStartDate() != $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'm' && $dayEvent->getUnixStartDate() == $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($condtoken['data'] as $token)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($match);\n\t\t\t\t\t\t\tunset($dateParm);\n\t\t\t\t\t\t\t$dateParm = \"\";\n\t\t\t\t\t\t\t$match = '';\n\t\t\t\t\t\t\tif (is_array($token))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token['keyword'];\n\t\t\t\t\t\t\t\t$dateParm = isset($token['dateParm']) ? trim($token['dateParm']) : \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (strpos($token, '${') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$eventcontent .= $token;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->processMatch($eventcontent, $match, $dayEvent, $dateParm, $relDay);\n\t\t\t\t\t\t} // end of foreach\n\t\t\t\t\t} // end of foreach\n\n\t\t\t\t\tif ($firstTime)\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest_first\">%s' . \"</td></tr>\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest\">%s' . \"</td></tr>\\n\";\n\n\t\t\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : $eventrow;\n\t\t\t\t\t$content .= str_replace(\"%s\", $eventcontent, $templaterow);\n\n\t\t\t\t\t$firstTime = false;\n\t\t\t\t} // end of foreach\n\t\t\t\t$k++;\n\t\t\t\t$k %= 2;\n\t\t\t} // end of foreach\n\t\t\t$content .= $this->getModuleFooter(\"</table>\\n\");\n\t\t}\n\t\telse if ($this->modparams->get(\"modlatest_NoEvents\", 1))\n\t\t{\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatetop\") || $this->modparams->get(\"modlatest_templatetop\") ? $this->modparams->get(\"modlatest_templatetop\") : '<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">';\n\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : '<tr><td class=\"mod_events_latest_noevents\">%s</td></tr>' . \"\\n\";\n\t\t\t$content .= str_replace(\"%s\", Text::_('JEV_NO_EVENTS'), $templaterow);\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatebottom\") ? $this->modparams->get(\"modlatest_templatebottom\") : \"</table>\\n\";\n\t\t}\n\n\t\t$callink_HTML = '<div class=\"mod_events_latest_callink\">'\n\t\t\t. $this->getCalendarLink()\n\t\t\t. '</div>';\n\n\t\tif ($this->linkToCal == 1)\n\t\t\t$content = $callink_HTML . $content;\n\t\tif ($this->linkToCal == 2)\n\t\t\t$content .= $callink_HTML;\n\n\t\tif ($this->displayRSS)\n\t\t{\n\t\t\t$rssimg = Uri::root() . \"media/system/images/livemarks.png\";\n\t\t\t$callink_HTML = '<div class=\"mod_events_latest_rsslink\">'\n\t\t\t\t. '<a href=\"' . $this->rsslink . '\" title=\"' . Text::_(\"RSS_FEED\") . '\" target=\"_blank\">'\n\t\t\t\t. '<img src=\"' . $rssimg . '\" alt=\"' . Text::_(\"RSS_FEED\") . '\" />'\n\t\t\t\t. Text::_(\"SUBSCRIBE_TO_RSS_FEED\")\n\t\t\t\t. '</a>'\n\t\t\t\t. '</div>';\n\t\t\t$content .= $callink_HTML;\n\t\t}\n\n\t\tif ($this->modparams->get(\"contentplugins\", 0))\n\t\t{\n\t\t\t$eventdata = new stdClass();\n\t\t\t$eventdata->text = $content;\n\t\t\tFactory::getApplication()->triggerEvent('onContentPrepare', array('com_jevents', &$eventdata, &$this->modparams, 0));\n\t\t\t$content = $eventdata->text;\n\t\t}\n\n\t\treturn $content;\n\n\t}",
"function EventsTable()\n {\n return \n $this->ItemsTableDataGroup\n (\n \"\",\n 0,\n $this->ApplicationObj()->EventGroup,\n $this->ApplicationObj()->Events\n );\n }",
"function showGetEventSources() {\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t$this->render($this->getTpl('sourceList', '/account'));\n\t}",
"public function index()\n {\n\n $sidebar_items = array(\n \"List Events\" => array('url' => URL::route('event.index'), 'icon' => '<i class=\"fa fa-users\"></i>'),\n );\n $FillableDropdown = new FillableDropdown();\n $active = $FillableDropdown->active($default = 2);\n $accessibility = $FillableDropdown->accessibility($default = 2);\n $operations = $FillableDropdown->eventOperations($default = 2);\n\n $authentication = \\App::make('authenticator');\n $user = $authentication->getLoggedUser();\n\n if (isset($user)) {\n\n $user_id = $user->id;\n }\n\n if (isset($user_id)) {\n\n $users = User::findOrFail($user_id);\n }\n $events = Events::orderBy('name', 'asc')->paginate(20);\n\n return view('events.event_listing_page', compact('events', 'users', 'active', 'accessibility', 'operations', 'sidebar_items'));\n\n }",
"function listEventTitle($e_id) {\n\t\t$e_id = mysql_real_escape_string($e_id);\n\t\t$this->eid = $e_id;\n\t\t$query = \"SELECT e_title, v.name, start_datetime, end_datetime \n\t\tFROM yam14.F_event e, yam14.F_venue v \n\t\tWHERE e.venue_id = v.v_id\n\t\tAND e_id = $this->eid;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\n\t\t\t$this->title = $row['e_title'];\n\t\t\t$this->venue = $row['name'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t\n\t\t\techo \"<div>\";\n\t\t\techo \"<h3>$this->title</h3>\";\n\t\t\techo \"<h4>$this->venue</h4>\";\n\t\t\techo \"<h4>From $this->startdate $this->starttime </h4><h4>To $this->enddate $this->endtime </h4>\";\n\t\t\techo \"<hr />\";\n\t\t\techo \"</div>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t}",
"public static function list_events()\n\t{\n\t\treturn cms_orm('CmsDatabaseEvent')->find_all(array('order' => 'module_name, event_name'));\n\t}",
"public function viewAllEvents();",
"public function index() {\n $this->seo(array(\n \"title\" => \"All Events List\",\n \"keywords\" => \"events, new events, event management, create event, event tickets, book event tickets\",\n \"description\" => \"Display all the latest events. Filter the events by categories, location and much more. Register yourself to turn your passion into your business\",\n \"view\" => $this->getLayoutView()\n ));\n $view = $this->getActionView();\n\n $title = RequestMethods::get(\"title\", \"\");\n $category = RequestMethods::get(\"category\", \"\");\n $type = RequestMethods::get(\"type\", \"\");\n $limit = RequestMethods::get(\"limit\", 10);\n $page = RequestMethods::get(\"page\", 1);\n $where = array(\n \"title LIKE ?\" => \"%{$title}%\",\n \"category LIKE ?\" => \"%{$category}%\",\n \"type LIKE ?\" => \"%{$type}%\",\n \"live = ?\" => true\n );\n $events = Event::all($where, array(\"*\"), \"created\", \"desc\", $limit, $page);\n $count = Event::count($where);\n\n $view->set(\"events\", $events);\n $view->set(\"limit\", $limit);\n $view->set(\"page\", $page);\n $view->set(\"count\", $count);\n $view->set(\"title\", $title);\n $view->set(\"type\", $type);\n $view->set(\"category\", $category);\n }",
"public function index()\n\t{\n\n\t\t$data['events'] = Event_Manager::paginate(15);\n\t\t$data['page_title'] = 'Events';\n\t\treturn View::make('clientside.events.index',$data);\n\t\t\n\t}",
"public function index()\n\t{\n $events = $this->events->paginate(10);\n $no = $events->getFrom();\n return $this->view('events.index', compact('events', 'no'));\n\t}",
"public function show(Events $events)\n {\n //\n }",
"public function indexAction() {\n $this->view->events = $this->_events->getEventsAdmin($this->_getParam('page'));\n }",
"function DisplayEvents()\r\n\t{\t\r\n\t\tglobal $_GET;\r\n\t\tglobal $_POST;\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\tglobal $_SESSION;\t\r\n\t\t\r\n\t\t//\r\n\t\t// PAGE FLAG\r\n\t\t//\r\n\t\t$flag = $_SETTINGS['events_page_clean_url'];\r\n\t\tif($flag == $_REQUEST['page']){\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// DEBUG SECTION\r\n\t\t\t//\r\n\t\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\t\techo \"<br>PAGE: \".$_REQUEST['page'].\"<br>\";\r\n\t\t\t\techo \"<br>FORM1: \".$_REQUEST['FORM1'].\"<br>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// IF FORM1 CALENDAR\r\n\t\t\t//\r\n\t\t\tif($_REQUEST['FORM1'] == 'calendar'){\r\n\t\t\t\t$this->DisplayCalendarOfEvents();\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// ELSE DISPLAY EVENTS BY DEFAULT\r\n\t\t\t//\r\n\t\t\telse {\t\t\r\n\t\t\t\techo \"<div class='events'>\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// CHECK FOR A CATEGORY\r\n\t\t\t\tif($_REQUEST['form1'] != ''){\r\n\t\t\t\t\r\n\t\t\t\t\t$form1Array = explode(\":\",$_REQUEST['FORM1']);\r\n\t\t\t\t\t$categoryName = $form1Array[0];\r\n\t\t\t\t\t$pageNum = $form1Array[1];\r\n\t\t\t\t\t$eventName = $form1Array[2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cagegorySQL = \"AND ec.name='\".$categoryName.\"' \";\r\n\t\t\t\t\t$nameSQL = \"AND ev.name='\".$eventName.\"' \";\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// PAGINATION\r\n\t\t\t\t$page = 1; // start page\t\t\t\r\n\t\t\t\t$size = 4; // records per page\r\n\t\t\t\t$select = \t\"SELECT * FROM events \".\r\n\t\t\t\t\t\t\t\"WHERE events.active='1' \".\r\n\t\t\t\t\t\t\t\"AND events.published='1' \".\r\n\t\t\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\" \".\r\n\t\t\t\t\t\t\t\"ORDER BY events.date DESC \";\t\r\n\t\t\t\t$total_records = mysql_num_rows(doQuery($select)); // total records\r\n\t\t\t\tif($pageNum){ $page = (int) $pageNum; } // current page\r\n\t\t\t\t$pagination = new Pagination();\r\n\t\t\t\t$pagination->setLink(\"\".$_SETTINGS['website'].\"/\".$_REQUEST['page'].\"/\".$categoryName.\":%s\");\r\n\t\t\t\t$pagination->setPage($page);\r\n\t\t\t\t$pagination->setSize($size);\r\n\t\t\t\t$pagination->setTotalRecords($total_records);\r\n\t\t\t\t$select2 = \t$select.$pagination->getLimitSql();\t\t\t\t\r\n\t\t\t\t$result = doQuery($select);\r\n\t\t\t\t\r\n\t\t\t\t$i=0;\r\n\t\t\t\twhile ($row = mysql_fetch_array($result)){\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='event_cont'>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='eventmaps' id='eventmap\".$i.\"'></div>\";\r\n\t\t\t\t\techo \"<div class='event_cont_img_box'><img src='\".$_SETTINGS['website'].\"uploads/\".$row['image'].\"' class='event_cont_img' alt='' /></div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<strong>\".$row['title'].\"</strong>\";\r\n\t\t\t\t\techo \"<label>\".TimestampIntoDate($row['date']).\"</label>\";\r\n\t\t\t\t\techo \"<label>\".$row['location'].\"</label>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"\".truncateString($row['content'], 300, $stopanywhere=false).\"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<ul class='event_list'>\";\r\n\t\t\t\t\techo \"<li><b>Location:</b> \".$row['location'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Address:</b> \".$row['address'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Openings:</b></li>\";\r\n\t\t\t\t\techo \"<li><b>Price:</b> $\".$row['price'].\"</li>\";\t\t\t\t\t\r\n\t\t\t\t\techo \"</ul>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// CHECKOUT FORM\r\n\t\t\t\t\tif($row['price'] != 0){\r\n\t\t\t\t\t\techo\t\"<form class='product-form' method='post'>\".\r\n\t\t\t\t\t\t\t\t\"<input class='hidden' type='hidden' name='pid' value='\".$product_id.\"' >\".\r\n\t\t\t\t\t\t\t\t\"<input type='hidden' class='qtyinput' name='qty' value='1' size='2' >\";\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ADDTOCART' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\techo\t\"<form>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ATTENDEVENT' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\techo \"There are currently no events listed\";\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t<?\r\n\t\t\t\t\r\n\t\t\t\t$navigation = $pagination->create_links();\r\n\t\t\t\techo $navigation; // will draw our page navigation\r\n\t\t\t\r\n\t\t\t\techo \"</div>\";\t\r\n\t\t\t\techo \"<div id='map_canvas'></div>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function index() {\n\t\t$this->load->helper('date');\n\t\t$data['events'] = $this->event_model->get();\n\t\tfor($iii = 0; $iii < sizeof($data['events']); $iii++) {\n\t\t\t$event_info = $this->event_info_model->get_event($data['events'][$iii]['event_id']);\n\t\t\t$data['events'][$iii]['info'] = $event_info;\n\t\t\tif($event_info != NULL) {\n\t\t\t\t$data['events'][$iii]['account'] = $this->account_model->get($event_info->event_accounts_account_id);\n\t\t\t} else {\n\t\t\t\t$data['events'][$iii]['account'] = NULL;\n\t\t\t}\n\t\t}\n\n\t\t$data['content'] = 'events/index';\n\t\t$data['stylesheets'] = 'events/index_stylesheets';\n\t\t$data['scripts'] = 'events/index_scripts';\n\t\t$data['title'] = 'Events';\n\t\t$data['sub_title'] = 'The page for the events';\n\t\t$this->load->view($this->layout, $data);\n\t}",
"public function actionData()\n {\n// \n// $connector->configure(new Grid(), \"event_id\", \"start_date, end_date, event_name\");\n// $connector->render();\n\n return new Grid();\n }",
"public function actionEvents()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('events');\n\t}",
"public function listAction()\r\n\t{\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\t\t$this -> view -> business = $business = Engine_Api::_() -> core() -> getSubject();\r\n\t\t$this -> view -> form = $form = new Ynbusinesspages_Form_Event_Search;\r\n\t\t$val = $this -> _getAllParams();\r\n\t\t// Populate form data\r\n\t\tif (!$form -> isValid($val))\r\n\t\t{\r\n\t\t\t$form -> populate($defaultValues);\r\n\t\t\t$this -> view -> formValues = $values = array();\r\n\t\t\t$this -> view -> message = \"The search value is not valid !\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$values = $form -> getValues();\r\n\t\t$values['business_id'] = $business -> getIdentity();\r\n\t\t// Prepare data\r\n\t\t$this -> view -> formValues = $values = array_merge($values, $_GET);\r\n\t\t\r\n\t\t// Check create event authorization\r\n\t\t$this -> view -> canCreate = $business -> isAllowed('event_create');\r\n\t\t//Get data\r\n\t\t$this -> view -> paginator = $paginator = Engine_Api::_()->getDbTable('mappings', 'ynbusinesspages') -> getEventsPaginator($values);\r\n\t\t$paginator -> setCurrentPageNumber($this -> _getParam('page'));\r\n\t}",
"public function index()\n {\n return view(\"admin.event\")->with([\n \"events\" => Event::query()->orderBy(\"created_at\", \"desc\")->paginate()\n ]);\n }",
"public function index(Event $event)\n {\n if (!Auth::check()) return redirect()->route('login');\n\n $events = [];\n\n foreach ($event->allTournamentsRelatedToAUser(Auth::user()) as $tournament) {\n $events[] = Calendar::event(\n \"{$tournament->name} - {$tournament->teams_name}\",\n false,\n Carbon::parse($tournament->start_date)->toDateTimeLocalString(),\n Carbon::parse($tournament->end_date)->toDateTimeLocalString(),\n $tournament->id,\n ['url' => route('tournaments.show', $tournament->id),]\n );\n }\n\n $calendar = new Calendar();\n $calendar->addEvents($events)\n ->setOptions([\n 'plugins' => ['window.dayGridPlugin', 'window.timeGridPlugin', 'window.listPlugin'],\n 'timeZone' => 'UTC',\n 'locales' => 'window.allLocales',\n 'locale' => 'fr',\n 'initialView' => 'timeGridDay',\n 'displayEventTime' => true,\n 'selectable' => true,\n 'initialView' => 'timeGridWeek',\n 'slotMinTime' => '07:00:00',\n 'slotMaxTime' => '22:00:00',\n 'contentHeight' => 'auto',\n 'editable' => true,\n 'headerToolbar' => [\n 'left' => 'prev,next today',\n 'center' => 'title',\n 'right' => 'dayGridMonth,timeGridWeek,timeGridDay'\n ],\n 'eventBackgroundColor' => '#00a651',\n 'eventBorderColor' => '#009933',\n ]);\n $calendar->setEs6();\n\n return view('events.schedules.index', compact('calendar', 'event'));\n }",
"public function listEventsAction()\n {\n $events = $this->getDoctrine()->getRepository('AppBundle:Event')->findEventsByManager($this->getUser());\n\n return $this->render('AppBundle:frontend/manager:event_list.html.twig', [\n 'events' => $events,\n ]);\n }",
"public function event_details($event_id=\"\")\n {\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'event_details' ;\n\n if($event_id)\n {\n $this->data['event_details'] = $this->db->where('id',$event_id)->get('events')->row_array();\n }\n\n $events = $this->db->where('id!=',$event_id)->get('events')->result_array() ;\n\n $this->data['events'] = array_chunk($events, 3);\n\n\n $body = 'event_details' ;\n\n $this->load_pages($body,$this->data);\n }",
"public function actionIndex()\r\n {\r\n $events = Events::find()->all();\r\n\t\t$tasks = [];\r\n\t\tforeach ($events as $eve) {\r\n\t\t $event = new \\yii2fullcalendar\\models\\Event();\r\n\t\t $event->id = $eve->id;\r\n\t\t $event->title = $eve->title;\r\n\t\t $event->start = $eve->date_created;\r\n\t\t $tasks[] = $event;\t\t\r\n\t\t}\r\n\t\t\r\n return $this->render('index', [\r\n 'events' => $tasks,\r\n ]);\r\n }",
"function getEvents($date = '') {\n include 'config.php';\n $eventListHTML = '';\n $date = $date ? $date : date(\"Y-m-d\");\n //Get events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $date . \"' \");\n if ($result->num_rows > 0) {\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\n $eventListHTML .= '<td>';\n while ($row = $result->fetch_assoc()) {\n $eventListHTML .= '<td>' . $row['emp_name'] . '</td>';\n }\n $eventListHTML .= '</td>';\n }\n echo $eventListHTML;\n}",
"public function viewEvents();",
"function render($events){\n\t\t// in the weekly event view\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\t\t\t$return_val=$return_val.\"<a href=\\\"event_display_detail.php?event_id=\";\n\t\t\t$return_val=$return_val.($next_event->get_id());\n\t\t\t$return_val=$return_val.\"&day=\".$next_event->get_start_day();\n\t\t\t$return_val.=\"&month=\".$next_event->get_start_month();\n\t\t\t$return_val.=\"&year=\".$next_event->get_start_year();\n\t\t\t$return_val.=\"\\\" class=\\\"eventTitle\\\">\";\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t$return_val=$return_val.\"</a><br />\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"<br />\";\n\t\t\tif (strlen(trim($next_event->get_event_type_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_event_type_name()).\"<br />\";\n\t\t\t}\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"<br />\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"<br />\";\n\t\t\t$i=$i+1;\n\t\t}\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \" \";\n\t\t}\n\t\treturn $return_val;\n\t}",
"public function show(events $events)\n {\n //\n }",
"function showEventList($groupId, $title) {\n\t\n\t//read config file for this portlet\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/event_list.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$showSummary = $config->readValue('displaySummary');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//create user groups validation object\n\t$userGroup = new CategoryUserGroupValidator();\n\t$excludeCategories = $userGroup->viewCategoryExclusionList('events');\n\t\n\t$return .= \"\t\t\t\t<div id=\\\"event_list\\\">\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\">$title</div>\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t$return .= \"\t\t\t\t\t\t<div id=\\\"upcoming_events_container\\\">\\n\";\n\t\n\t$todaysDate = getdate();\n\t\n\t$month = $todaysDate['mon'];\n\t$day = $todaysDate['mday'];\n\t$year = $todaysDate['year'];\n\t\n\t$getDate = $todaysDate['year'] . \"-\" . $todaysDate['mon'] . \"-\" . $todaysDate['mday'] . \" 00:00:00\";\n\t\n\t$s = 0;\n\t\n\t$result = mysql_query(\"SELECT events.id FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id\");\n\t$totalRows = mysql_num_rows($result);\n\t\n\t//if there's nothing to display, just exit (remove this test to display \"no events currently scheduled\" message)\n\tif ($totalRows == 0) {\n\t\t\n\t\treturn;\n\t\t\n\t}\n\t\n\t$showTotalPages = ceil($totalRows / $maxDisplay);\n\n\tif ($totalRows > 0) {\n\n\t\t$showCurrentPage = floor($s / $maxDisplay) + 1;\n\n\t} else {\n\n\t\t$showCurrentPage = 0;\n\n\t}\n\t\n\t$result = mysql_query(\"SELECT events.id, events.title, events.summary, events.summaryImage, DATE_FORMAT(startDate, '%M %d, %Y %h:%i %p') AS newStartDate, DATE_FORMAT(expireDate, '%M %d, %Y %h:%i %p') AS newExpireDate FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id ORDER BY startDate ASC, title ASC LIMIT $maxDisplay\");\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count > 0) {\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t$x++;\n\t\t\t\n\t\t\tif ($x < $count) {\n\t\t\t\t\n\t\t\t\t$style = \" event_item_row_separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$style = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$title = htmlentities($row->title);\n\t\t\t\n\t\t\tif (trim($row->summaryImage) != \"\") {\n\t\t\t\t\n\t\t\t\t$image = \"\t\t\t\t\t\t\t<div class=\\\"summary_image\\\">\\n<a href=\\\"/events/id/$row->id\\\"><img src=\\\"/file.php?load=$row->summaryImage&w=$w&h=$h\\\"></a></div>\\n\";\n\t\t\t\t$imageOffsetClass = \" image_offset\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$image = \"\";\n\t\t\t\t$imageOffsetClass = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t<div class=\\\"event_item$style\\\">\\n\";\n\t\t\t$return .= \"$image\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"details_container$imageOffsetClass\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<div class=\\\"title\\\"><a href=\\\"/events/id/$row->id\\\">$title</a></div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t\t<tr><td class=\\\"start_date\\\">$row->newStartDate</td></tr><tr><td class=\\\"end_date\\\">$row->newExpireDate</td></tr>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t</table>\\n\";\n\t\t\t\n\t\t\tif ($showSummary == \"true\") {\n\t\t\t\t\n\t\t\t\t$summary = preg_replace(\"/\\\\n/\", \"<br>\", htmlentities($row->summary));\n\t\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"summary\\\">\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t\t$summary\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"<div id=\\\"event_list_navigation\\\">\";\n\t\t$return .= \"\t<div class=\\\"totals\\\">$totalRows Events</div><div class=\\\"navigation\\\"><div class=\\\"pages\\\">Page: $showCurrentPage of $showTotalPages</div><div class=\\\"previous\\\"><a href=\\\"javascript:regenerateEventList('$s', 'b');\\\">Previous</a></div><div class=\\\"next\\\"><a href=\\\"javascript:regenerateEventList('$s', 'n');\\\">Next</a></div></div>\";\n\t\t$return .= \"</div>\";\n\t\t\n\t} else {\n\t\t\n\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"event_item\\\">No events are currently scheduled.</div>\\n\";\n\t\t\n\t}\n\t\n\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t</div>\\n\";\n\t\n\treturn($return);\n\t\n}",
"private function display_custom_events_table()\n\t{\n\t\t// Show the custom PHP events\n\t\t// Firstly, convert our custom event list to a proper map\n\t\t$map = [];\n\n\t\t// Sort alphabetically\n\t\tksort($this->custom_php_events);\n\n\t\tforeach ($this->custom_php_events as $extension => $events)\n\t\t{\n\t\t\tksort($events);\n\n\t\t\t// Grab each event\n\t\t\tforeach ($events as $event)\n\t\t\t{\n\t\t\t\t$map[] = [$extension, $event];\n\t\t\t}\n\t\t}\n\n\t\t// Show the table\n\t\t$table_header = [$this->language->lang('CLI_EXTENSION_EVENTS_EXTENSION_NAME'), $this->language->lang('CLI_EXTENSION_EVENTS_NAME')];\n\t\t$this->render_table($table_header, $map);\n\t}",
"public function showEvents($args)\n {\n $view = Zikula_View::getInstance($this->name);\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Event');\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n $firstLoad = FormUtil::getPassedValue(\"firstLoad\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n\n // $start = $startlimit + $eventlimit;\n $start = $startlimit;\n if ($firstLoad) {\n // $start = 0;\n }\n // $limit = $start;\n $limit = $start + 10;\n $end = $eventlimit;\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND b.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND b.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND b.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND b.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND b.shop_id=$shop_id\";\n }\n $join = \"\";\n if (!empty($category_id)) {\n $append .= \" AND c.category_id=$category_id \";\n $join = \" INNER JOIN zselex_shop_to_category c ON c.shop_id=b.shop_id \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND b.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (b.shop_name LIKE :search OR MATCH (b.shop_name) AGAINST (:search2) OR b.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n $event_args = array(\n 'append' => $append,\n 'join' => $join,\n 'setParams' => $setParams,\n 'start' => $start,\n 'end' => $end\n );\n\n // echo \"<pre>\"; print_r($event_args); echo \"</pre>\";\n $result = $repo->getAllEvents($event_args);\n\n $count = $repo->getAllEventsCount(array(\n 'append' => $append,\n 'join' => $join,\n 'setParams' => $setParams\n ));\n\n /*\n * $countNext = $repo->getAllEventsCount(\n * array('append' => $append,\n * 'join' => $join,\n * 'setParams' => $setParams,\n * 'start' => $start + 10,\n * 'end' => $end\n * ));\n */\n } else {\n\n $count = 0;\n }\n\n $counts = $countNext;\n\n $data = '';\n $view->assign('limit', $limit);\n $view->assign('events', $result);\n $view->assign('count', $count);\n $view->assign('counts', $counts);\n $output_tpl = $view->fetch('ajax/show_all_events.tpl');\n $data .= new Zikula_Response_Ajax_Plain($output_tpl);\n // $data[\"data\"] = $output;\n AjaxUtil::output($data);\n }",
"public function index()\n {\n $listing=Event::all();\n return view('events.list', compact('listing'));\n }",
"public function listEvents()\n\t{\n\n\t\t$table=CaseItemModel::getInstance()->getTable();\n $pTable=ProcessModel::getInstance()->getTable();\n $piTable=ProcessItemModel::getInstance()->getTable();\n \n\t\t$status =\"status not in ('Complete','Terminated') \";\n \n\t\t$sql=\"select 'Case Item' as source,id,null as processName, processNodeId,caseId,type,subType,label,timer,timerDue,message,signalName \"\n . \" from $table \"\n . \" where $status\"\n .\" and subType in('timer','message','signal')\";\n\t\t$arr1= $this->db->select($sql);\n\n\t\t$sql=\"select 'Process Item' as source ,p.processName as processName, pi.id as id,pi.processNodeId,null as caseId,pi.type,subType,label,timer,timerDue,message,signalName \"\n . \" from $piTable pi\n join $pTable p on p.processId=pi.processId\n where subType in('timer','message','signal')\";\n \n \n\t\t$arr2= $this->db->select($sql);\n\t\t$results= array_merge($arr1,$arr2);\n\n\t\treturn $results;\n\t}",
"public function events()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC'),\n 'condition' => array('type' => 'Event')\n ));\n \n $this->set('events', $eventdata);\n \n $this->assignUserToView($this->Auth->user('id'));\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Info');\n }",
"public function showEventsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM event\");\r\n\t\techo \"<h3>Event Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"score\" . \"</td><td>\" . \"time\" . \"</td><td>\" . \"tie_break\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['score'] . \"</td><td>\" . $row['time'] . \"</td><td>\" . $row['tie_break'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}",
"private function add_events()\r\n {\r\n $events = $this->events;\r\n foreach ($events as $time => $items)\r\n {\r\n $column = date('H', $time) / $this->hour_step + 1;\r\n foreach ($items as $item)\r\n {\r\n $content = $item['content'];\r\n $row = $item['index'] + 1;\r\n \r\n $cell_content = $this->getCellContents($row, $column);\r\n $cell_content .= $content;\r\n $this->setCellContents($row, $column, $cell_content);\r\n }\r\n }\r\n \r\n }",
"function showGrid($date) {\n\tglobal $title, $niceday, $start_time, $end_time, $venue, $city, $state, $cat, $color, $background, $ed, $usr, $o, $c, $m, $a, $y, $w, $lang;\n\tif ($start_time[$date]) {\n\t\tksort($start_time[$date]);\n\t\twhile (list($t) = each($start_time[$date])) {\n\t\t\twhile (list($id,$value) = each($start_time[$date][$t])) {\n\t\t\t\techo \"<div class=\\\"button\\\" style=\\\"\";\n\t\t\t\tif ($color[$id]) echo \" color: \".$color[$id].\"; background: \".$background[$id].\";\";\n\t\t\t\techo \"\\\">\";\n\t\t\t\techo \"<a href=\\\"show_event.php?id=\".$id.\"&o=\".$o.\"&c=\".$c.\"&m=\".$m.\"&a=\".$a.\"&y=\".$y.\"&w=\".$w.\"\\\" onClick=\\\"openPic('show_event.php?id=\".$id.\"&size=small','pop','600','400'); window.newWindow.focus(); return false\\\">\";\n\t\t\t\techo \"<div style=\\\"background: \".$color[$id].\";\\\" title=\\\"\";\n\t\t\t\techo $value;\n\t\t\t\tif ($end_time[$date][$t][$id]) echo \" - \".$end_time[$date][$t][$id];\n\t\t\t\techo \" - \";\n\t\t\t\techo $title[$id];\n\t\t\t\tif ($venue[$id]) {\n\t\t\t\t\techo \" - \".$venue[$id];\n\t\t\t\t\tif ($city[$id]) {\n\t\t\t\t\t\techo \" - \".$city[$id];\n\t\t\t\t\t\tif ($state[$id]) echo \", \".$state[$id];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\\\"> </div></a></div>\";\n\t\t\t}\n\t\t}\n\t}\n}",
"function ajax_event_table_basic($db, $eventID)\r\n{\r\n?>\r\n<table class='pizzaOrder'>\r\n<tr>\r\n\t<td class='MANheader' width='600px' colspan='2'>\r\n\t Current Events: \r\n\t<font size=\"2\" class=\"subtitle\">Click on an event to see more information below</font></td>\r\n</tr>\r\n\r\n<?php\r\n$query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND event_started != 2 ORDER BY startDate ASC\";\r\n$result = $db->query($query);\r\nif ($result->num_rows == 0)\r\n{\r\n\techo '<tr><td><i>There are no current events in the system</i></td></tr>';\r\n\tdie();\r\n}\r\n\r\n\r\n// Now we can output the option fields to populate the list box.\r\nfor ($i=0; $i<$result->num_rows; $i++) \r\n{\r\n\t$row = $result->fetch_assoc(); \r\n\r\n\techo '<tr class=\"pointer\" id=\"eventRow_'.$i.'\" onclick=\"getEvent('.$row[\"eventID\"].')\">';\r\n\t\techo '<td width=\"70px\">';\r\n\t\t\techo '<div style=\"position: relative; top: 5px;\">';\r\n\t\t?>\r\n\t\t\t<!-- // DELETE EVENT BUTTON -->\r\n\t\t\t<img class=\"pointer\"\r\n\t\t\t\tsrc=\"../images/buttons/delete_60.png\"';\r\n\t\t\t\talt=\"Delete this event\" \r\n\t\t\t\tonclick=\"deleteEvent(<?php echo $row[\"eventID\"]; ?>, '<?php echo $row[\"event_name\"]; ?>')\" />\r\n\t\t<?php\r\n\t\t\techo '</div>';\r\n\t\techo '</td>';\r\n\t\techo '<td>';\r\n\t\t\techo $row['event_name'];\r\n\t\t\techo ' - <font size=\"1\">['.dateToScreen($row['startDate']).']</font>';\r\n\t\techo '</td>';\r\n\techo '</tr>';\r\n}\r\necho '</table>';\r\n?>\r\n\r\n\r\n\r\n\r\n\r\n<?php\r\n\t//Create the general select query.\r\n $query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND eventID=\".$eventID.\";\"; \t\r\n $result = $db->query($query); \t\t\t\r\n\r\n\r\n\t//use it first for the title\t\r\n $row1 = $result->fetch_array(MYSQLI_BOTH);\t\t\r\n\t\r\n\t//then close it ready for the next execution\r\n $result->close();\t\t\t\t\t\t\t\t\r\n $result = $db->query($query); \t\r\n\r\n\r\n\techo '<br />';\r\n\r\n\r\necho '<table class=\"pizzaOrder\">';\r\n $on = 'this.src=\"../images/buttons/edit_dwn.png\"';\r\n $off = 'this.src=\"../images/buttons/edit_up.png\"';\r\n\r\n echo '<tr>';\r\n\t\techo '<td colspan=\"2\" id=\"headCell_left\"> ';\r\n\t\techo '<font class=\"subtitle\" style=\"font-size: 14pt;\">'.$row1['event_name'].'</font></td>';\r\n\t\techo '<td id=\"headCell_right\">';\r\n\t\techo '<img class=\"button\" src=\"../images/buttons/edit_dwn.png\"';\r\n\t\t\techo 'alt=\"Edit The Selected Event\" onclick=\"editEvent('.$row1['eventID'].')\"';\r\n\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\techo '</tr>';\r\n\r\n\t\t\t\t\t\r\n\t//While Loop starts here - \r\n\t// Retrieve the data for the table. There should only be one row.\r\n\twhile($row = $result->fetch_assoc())\r\n\t{\r\n\t\techo '<tr>';\r\n\t\t\techo '<td width=\"150px\"><b>Event Location: </b></td>';\r\n\t\t\techo '<td>'.$row['event_location'].'</td>';\r\n\t\t\techo '<td> </td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Date: </b></td>';\r\n\t\t\techo '<td>'.dateToScreen($row['startDate']).'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Day Count: </b></td>';\r\n\t\t\techo '<td>'.$row['days'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Time: </b></td>';\r\n\t\t\techo '<td>'.$row['startTime'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Server IP Address: </b></td>';\r\n\t\t\techo '<td>'.$row['server_IP_address'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Number of Seats: </b></td>';\r\n\t\t\techo '<td>'.$row['seatQuantity'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\t$on = 'this.src=\"../images/buttons/stop_dwn.png\"';\r\n\t\t$off = 'this.src=\"../images/buttons/stop.png\"';\r\n\t\t\r\n\t\t$on1 = 'this.src=\"../images/buttons/start_dwn.png\"';\r\n\t\t$off1 = 'this.src=\"../images/buttons/start.png\"';\r\n\r\n\t\t// If the event has started place the stop event button in the table.\r\n\t\tif($row['event_started'] == 1) \r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\techo '<td>Yes</td>';\r\n\t\t\techo '<td><img src=\"../images/buttons/stop_dwn.png\" class=\"button\"'; \r\n\t\t\t\techo 'alt=\"Stop the current event.\" onclick=\"stopEvent(' . $row['eventID'] . ')\" ';\r\n\t\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has not started place the start event button in the table. \r\n\t\t\r\n\r\n\t\t\r\n\t\telseif ($row['event_started'] == 0)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>No</td>';\r\n\t\t\t\techo '<td><img src=\"../images/buttons/start_dwn.png\" class=\"button\"';\r\n\t\t\t\t\techo 'alt=\"Start the selected event. Stops all others.\" onclick=\"startEvent(' . $row['eventID'] . ')\"'; \r\n\t\t\t\t\techo 'onmouseover='.$off1.' onmouseout='.$on1.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has completed or been stopped. \r\n\t\telseif ($row['event_started'] == 2)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>Finished</td>';\r\n\t\t\t\techo '<td> </td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t}\r\necho '</table>';\r\n}",
"public function listAction()\n {\n if ( false === $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN') )\n throw new AccessDeniedException();\n \n // Set Datagrid source\n $source = new Entity($this->get('asf_scheduler.calendar_event_category.manager')->getClassName());\n $tableAlias = $source->getTableAlias();\n $source->manipulateQuery(function($query) use ($tableAlias){\n $query instanceof QueryBuilder;\n \t\n if ( count($query->getDQLPart('orderBy')) == 0) {\n $query->orderBy($tableAlias . '.title', 'ASC');\n }\n });\n \n // Get Grid instance\n $grid = $this->get('grid');\n $grid instanceof Grid;\n\n // Attach the source to the grid\n $grid->setSource($source);\n $grid->setId('asf_calendar_event_category_list');\n\n // Columns configuration\n $grid->hideColumns(array('id'));\n\n $grid->getColumn('title')->setTitle($this->get('translator')->trans('Category name', array(), 'asf_scheduler'))\n ->setDefaultOperator('like')\n ->setOperatorsVisible(false);\n\n $grid->getColumn('state')->setTitle($this->get('translator')->trans('State', array(), 'asf_scheduler'))\n ->setFilterType('select')->setSelectFrom('values')->setOperatorsVisible(false)\n ->setDefaultOperator('eq')->setValues(array(\n CalendarEventCategoryModel::STATE_ENABLED => $this->get('translator')->trans('Enabled', array(), 'asf_scheduler'),\n CalendarEventCategoryModel::STATE_DISABLED => $this->get('translator')->trans('Disabled', array(), 'asf_scheduler')\n ));\n \n $grid->getColumn('bgColor')->setSize(100)->setTitle($this->get('translator')->trans('Background color', array(), 'asf_scheduler'));\n $grid->getColumn('fgColor')->setSize(100)->setTitle($this->get('translator')->trans('Foreground color', array(), 'asf_scheduler'));\n $grid->getColumn('cssClassName')->setSize(100)->setTitle($this->get('translator')->trans('CSS class name', array(), 'asf_scheduler'));\n\n $editAction = new RowAction('btn_edit', 'asf_scheduler_calendar_event_category_edit');\n $editAction->setRouteParameters(array('id'));\n $grid->addRowAction($editAction);\n\n $deleteAction = new RowAction('btn_delete', 'asf_scheduler_calendar_event_category_delete', true);\n $deleteAction->setRouteParameters(array('id'))\n ->setConfirmMessage($this->get('translator')->trans('Do you want to delete this category?', array(), 'asf_scheduler'));\n $grid->addRowAction($deleteAction);\n\n $grid->setNoDataMessage($this->get('translator')->trans('No category was found.', array(), 'asf_scheduler'));\n\n return $grid->getGridResponse('ASFSchedulerBundle:CalendarEventCategory:list.html.twig');\n }",
"public function actionIndex()\r\n\t{\r\n\t\t$account_id = Yii::app()->user->id;\r\n\r\n\t\tif($account_id != null)\r\n\t\t{\r\n\t\t\t$events = Event::model()->findAll(\"status_id = 1\");\r\n\t\t\t\t\r\n\t\t\t$eventsDP = new CArrayDataProvider($events, array(\r\n\t\t\t\t\t'pagination' => array(\r\n\t\t\t\t\t\t'pageSize' => 10,\r\n\t\t\t\t\t)\r\n\t\t\t));\r\n\r\n\t\t\t$this->render('index',array(\r\n\t\t\t\t'eventsDP'=>$eventsDP,\r\n\t\t\t\t'events'=>$events,\r\n\t\t\t));\r\n\t\t}\r\n\t\telse\r\n\t\t\t$this->redirect(array('site/login'));\r\n\r\n\t}",
"public function showEvents(){\n return view('event.usereventlist', ['user' => auth()->user()]);\n }",
"function getEvents($date = '') {\r\n //Include db configuration file\r\n include 'dbConfig.php';\r\n $eventListHTML = '';\r\n $date = $date ? $date : date(\"Y-m-d\");\r\n //Get events based on the current date\r\n $result = $db->query(\"SELECT title FROM floralbookings WHERE date = '\" . $date . \"' AND status = 1\");\r\n if ($result->num_rows > 0) {\r\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\r\n $eventListHTML .= '<ul>';\r\n while ($row = $result->fetch_assoc()) {\r\n $eventListHTML .= '<li>' . $row['title'] . '</li>';\r\n }\r\n $eventListHTML .= '</ul>';\r\n }\r\n echo $eventListHTML;\r\n}",
"public function events()\n {\n //search query\n $query = Input::get('query');\n\n if ($query == 'latest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n elseif ($query == 'oldest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'asc')->paginate(5);\n }\n else\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n return View::make('/events', ['exhibitions' => $exhibitions]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n $events = Event::all();\n return view('events::list_events',compact('events'));\n\n }",
"public function fetchEvents()\n {\n // TODO: Implement fetchEvents() method.\n }",
"public function getAllEvents(){\n\t\t//$events = EventPage::get()->sort('Date', 'DESC')->limit(5);\n\t\t$limit = 10;\n\n\t\t$items = DataObject::get(\"EventPage\", \"Date > NOW()\", \"Date\", null, $limit);\n\t\treturn $items;\n\n\t}",
"public function index()\n {\n $events = Event::latest()->paginate(10);\n return view('event.events', compact('events'));\n }",
"function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}",
"public function index()\n {\n\n $events = DB::table('events')\n ->where('event_date', '>', date('Y-m-d').' 00:00:00')\n ->orderBy('event_date', 'asc')\n ->take(8)\n ->get();\n\n return view('events.index')->withEvents($events);\n\n }",
"public function _display($params)\n {\n ?>\n <!-------------------------------------------ATTENDEES-LIST---------------------------------------------->\n\n <br/><br/><br/><br/><br/><br/>\n <div id=\"atnd-list\">\n <img src=\"<?php printf('%s/%s', get_bloginfo('template_url'), 'img/list_header.png')?>\" class=\"list_header\">\n\n <br/><br/>\n <p class=\"tally\">\n\n\n <form class=\"form-search fright\" id=\"search_attendee_admin\">\n <label>Search</label> \n <div class=\"input-append\">\n <input type=\"text\" class=\"span2 search-query\" name=\"search\" id=\"search\">\n <input type=\"hidden\" id=\"sort\" name=\"sort\">\n <input type=\"hidden\" id=\"pid\" name=\"pid\" value=\"<?php printf('%s', $params['event_id'])?>\">\n <button type=\"submit\" class=\"btn\"><i class=\"icon-search\"></i></button>\n </div>\n </form>\n <div>\n <span class=\"count-list\">Attendees Count: </span><span class=\"count-total\"><?php printf('%d', $params['all'])?></span> \n <span class=\"count-list\">Clark: </span><span class=\"count-total\"><?php printf('%d', $params['clark'])?></span> \n <span class=\"count-list\">Makati: </span><span class=\"count-total\"><?php printf('%d', $params['makati'])?></span> \n </div>\n </p>\n\n <a href=\"<?php printf('%sedit.php?post_type=event', admin_url())?>\"><u>BACK TO EVENT'S LIST</u></a> |\n <a href=\"<?php printf('%s/%s?event_id=%d&create=word', plugins_url(), 'gngn/helper/word.php', $params['event_id'])?>\"><u>EXPORT TO WORD</u></a> |\n <a href=\"<?php printf('%s/%s?event_id=%d&create=excel', plugins_url(), 'gngn/helper/word.php', $params['event_id'])?>\"><u>EXPORT TO EXCEL</u></a>\n <form class=\"form-search\">\n\n <div class=\"atnd-list-table\" id=\"attendace\">\n <table class=\"table table-striped table-hover\">\n <thead class=\"btn-info\">\n <tr>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"floor_name\">Floor name ▲</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"firstname\">Full name</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"office_branch\">Office Branch</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"email_address\">Email Address</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"contact_no\">Contact Number</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"office_branch\">Action</a></th><!----->\n </tr>\n </thead>\n <tbody id=\"slist\">\n <?php if(!empty($params['attendees']) && is_array($params['attendees'])):\n $branch = array(1 =>'Clark', 'Makati', 'Guest');\n foreach ($params['attendees'] as $key => $value) { ?>\n <tr>\n <td><?php printf('%s', $value['floor_name'])?></td> \n <td><?php printf('%s %s %s', $value['firstname'], $value['middlename'], $value['lastname'])?></td> \n <td><?php printf('%s', $branch[$value['office_branch']])?></td>\n <td><?php printf('%s', $value['email_address'])?></td>\n <td><?php printf('%s', $value['contact_no'])?></td>\n <td><?php printf('<a href=\"#\" class=\"btn btn-danger btn-mini remove\" att=\"%d\"><i class=\"icon-white icon-trash\"></i>Remove</a>', $value['attendee_id'])?></td>\n </tr>\n <?php } else: ?>\n <tr>\n <td colspan=\"6\">No one registered yet.</td>\n </tr>\n <?php endif; ?>\n </tbody>\n </table>\n </form>\n </div>\n <span class=\"clear\"></span>\n <a href=\"<?php printf('%sedit.php?post_type=event', admin_url())?>\"><u>BACK TO EVENT'S LIST</u></a>\n </div>\n <?php\n }",
"public function index()\n {\n $events = \\App\\Event::orderBy('id','DESC')->paginate(10);\n return view('admin.events.index', ['events' => $events]);\n }",
"public function dispalyEventsTable(){\n $sql=\"SELECT * FROM `events` ORDER BY `event_date` asc\";\n $result=$this->conn->query($sql);\n $rows=array();\n\n if($result->num_rows>0){\n while($displayEvent=$result->fetch_assoc()){\n $rows[]=$displayEvent;\n }\n return $rows;\n }else{\n return false;\n }\n\n }",
"function getEvents(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_closed'=>false));\r\n\t\t$recordSet = $this->db->get(TBL_EVENTS);\r\n\t\t$events=$recordSet->result() ;\t\t\r\n\t\t//return json_encode($events);\r\n\t\tif (stristr($_SERVER[\"HTTP_ACCEPT\"],\"application/xhtml+xml\") ) {\r\n\t\t\t\theader(\"Content-type: application/xhtml+xml\"); } \r\n\t\telse{\r\n\t\t\t\theader(\"Content-type: text/xml\");\r\n\t\t}\r\n\t\t$xml=\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\";\r\n\t\t$xmlinner=\"\";\r\n\t\t$xmlinner=\"<newslist title=\\\"Event Calendar:\\\">\";\r\n\t\tforeach($events as $row){\r\n\t\t\t$xmlinner=$xmlinner.\"<news url=\\\"javascript:void(0)\\\" date='\".dateformat($row->event_date).\"' time='\".$row->event_time.\"'>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<headline><![CDATA[\".$row->title.\"]]></headline>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<detail><![CDATA[\".$row->venue.\"]]></detail>\";\r\n\t\t\t$xmlinner=$xmlinner.\"</news>\";\t\t\t\r\n\t\t}\r\n\t\t$xmlinner=$xmlinner.\"</newslist>\";\r\n\t\treturn $xml.$xmlinner;\r\n\t}",
"public function getEvents();",
"public function getEvents();",
"function getEvents($date = ''){\r\n\t//Include db configuration file\r\n\tinclude 'dbConfig.php';\r\n\t$eventListHTML = '';\r\n\t$date = $date?$date:date(\"Y-m-d\");\r\n\t//Get events based on the current date\r\n\t$result = $db->query(\"SELECT title FROM cakemaker WHERE date = '\".$date.\"' AND status = 1\");\r\n\tif($result->num_rows > 0){\r\n\t\t$eventListHTML = '<h2>Events on '.date(\"l, d M Y\",strtotime($date)).'</h2>';\r\n\t\t$eventListHTML .= '<ul>';\r\n\t\twhile($row = $result->fetch_assoc()){ \r\n $eventListHTML .= '<li>'.$row['title'].'</li>';\r\n }\r\n\t\t$eventListHTML .= '</ul>';\r\n\t}\r\n\techo $eventListHTML;\r\n}",
"public function index()\n {\n $events = $this->eventRepository->all();\n return view('admin.event.index',compact('events'));\n }",
"public function viewNewEvents()\n {\n $this->load->model('M_Event_table');\n $this->load->model('M_Customer_table');\n $events = $this->M_Event_table->getNewEvents();\n $customers = $this->M_Customer_table->getAllCustomers();\n\n $returnData['newEventsMore']= $events;\n $returnData['customers'] = $customers;\n\n $this->load->view('admin/viewNewEvents',$returnData);\n }",
"public function index()\n {\n $results = Event::with('participants')->orderBy('start_date')->paginate(10);\n return view('adm.events.index')->with(compact('results'));\n }",
"public function index()\n {\n $eventList = Event::all();\n return view('backEnd.events.events',compact('eventList'));\n }",
"public function index()\n {\n $eventTypeList = $this->EventType->getAll();\n $eventCategoryList = $this->EventCategory->getAll();\n $eventGroupList = $this->EventGroup->getAll();\n $eventPriorityList = $this->EventPriority->getAll();\n $statusList = $this->Status->getAll();\n $groupEmployee = $this->EmployeeGroup->getAll();\n $data = [\n 'eventTypeList' => $eventTypeList,\n 'eventCategoryList' => $eventCategoryList,\n 'eventGroupList' => $eventGroupList,\n 'eventPriorityList' => $eventPriorityList,\n 'statusList' => $statusList,\n 'groupEmployee' => $groupEmployee\n ];\n return view('event::index', $data);\n }",
"function ReadEvents()\n {\n $this->ApplicationObj()->Events=\n $this->Sql_Select_Hashes\n (\n $this->ApplicationObj()->HtmlEventsWhere(),\n array(),\n array(\"StartDate\",\"ID\")\n );\n \n $this->ApplicationObj()->Events=array_reverse($this->ApplicationObj()->Events);\n }",
"public function show()\r\n {\r\n $events = DB::table('app_event')\r\n ->orderBy('id', 'desc')\r\n ->paginate(10)->toJson();\r\n\r\n return $events;\r\n }",
"public function actionEventManagement(){\n $accessUser = [role::ADMIN, role::MEMBER]; // which user(role_id) has permission to join the page\n User::checkUserPermissionForPage($accessUser);\n\n\n $this->_params['title'] = 'Eventverwaltung';\n\n if(isset($_GET['eventId'])) {\n $dataDir = 'assets/images/upload/events/';\n unlink($dataDir . $_GET['pictureName']);\n Booking::deleteWhere('EVENT_ID = '.$_GET['eventId']);\n Event::deleteWhere('ID = ' . $_GET['eventId']);\n sendHeaderByControllerAndAction('event', 'EventManagement');\n }\n\n\n $sortEvent = 'ORDER BY DATE';\n $sortEventOld = 'ORDER BY DATE';\n\n if(isset($_GET['sortEvent'])) {\n $sortEvent = Event::generateSortClauseForEvent($_GET['sortEvent']);\n }\n\n if(isset($_GET['sortEventOld'])) {\n $sortEventOld = Event::generateSortClauseForEvent($_GET['sortEventOld']);\n }\n\n\n $this->_params['eventList'] = Event::find('DATE >= CURDATE()', null, $sortEvent);\n $this->_params['eventListOld'] = Event::find('DATE < CURDATE()', null, $sortEventOld);\n\n }",
"public function get_events()\n {\n $table_name = $this->input->get_post(\"table_name\");\n\n log_message(\"debug\", \"Posted table name {$table_name}\");\n\n $config = [\n 'base_url' => $this->config->base_url(\"welcome/get_events/\"),\n 'total_rows' => $this->Xform_model->count_all_records($table_name),\n 'uri_segment' => 4,\n 'per_page' => 100,\n ];\n\n $this->pagination->initialize($config);\n $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n\n $events = $this->Xform_model->get_geospatial_data($table_name, $this->pagination->per_page, $page);\n $links = $this->pagination->create_links();\n\n if ($this->input->is_ajax_request()) {\n $result = [\n 'status' => \"success\",\n \"events_count\" => $config['total_rows'],\n \"events\" => $events,\n \"links\" => $links\n ];\n $result = array_utf8_encode($result);\n echo json_encode($result);\n } else {\n show_error(\"Not Implement\", 501, \"Page not implemented\"); //page not implemented\n }\n }",
"function events(){\n if(!$this->session->userdata('logged_in') || $this->session->userdata('role') != 'student'):\n redirect('/');\n endif;\n\n $data = array(\n 'events' => $this->admin_model->browse(array('module' => 'events'))\n );\n //load content\n $this->template->content->view('/students/content/events', $data);\n\n //add js file\n $this->template->publish('layouts/app');\n }",
"public function index()\n {\n $list = Event::paginate(3);\n return view('events.index', compact('list'));\n\n }",
"public function actionIndex()\n {\n if(\\Yii::$app->user->can('verMarcacaoConsulta')) {\n $tempVariable = Medicos::dataByUser(Yii::$app->user->id);\n $times = MarcacaoConsulta::dataByUserBack($tempVariable['id']);\n\n $events = [];\n foreach ($times as $time) {\n\n $temp = Especialidade::dataByEspecialidade($time['id_especialidade']);\n\n\n $Event = new Event();\n $Event->id = $time['id'];\n $Event->backgroundColor = $this->chooseColor($time['status']);\n $Event->title = $temp['tipo'];\n $Event->start = date(($time['date']));\n $Event->url = 'index.php?r=marcacao-consulta/view&id=' . $time['id'];\n $events[] = $Event;\n\n }\n\n return $this->render('index', [\n 'events' => $events,\n ]);\n }\n }",
"function get_event_list($userId, $location, $details, $filters, $limit, $offset)\n {\n\t\tlog_message('debug', '_event/get_event_list');\n\t\tlog_message('debug', '_event/get_event_list:: [1] userId='.$userId.' location='.json_encode($location).' details='.json_encode($details).' filters='.json_encode($filters).' limit='.$limit.' offset=',$offset);\n\n $status = (!empty($filters['status'])? $filters['status']: 'active');\n\n $searchString = '';\n $searchPhrase = (!empty($filters['searchString'])? ' MATCH(store_name) AGAINST (\"'.$filters['searchString'].'\") AND': '');\n $searchCatogory = (!empty($filters['categoryId'])? ' (SELECT _category_id FROM clout_v1_3.store_sub_categories WHERE _store_id =P.store_id AND _category_id='.$filters['categoryId'].' LIMIT 1) IS NOT NULL AND': '');\n $searchDate = (!empty($filters['eventDate'])? ' UNIX_TIMESTAMP(\"'.date('Y-m-d H:i:s',strtotime($filters['eventDate'])).'\") BETWEEN UNIX_TIMESTAMP(start_date) AND UNIX_TIMESTAMP(end_date) AND': '');\n\t $searchString .= ($searchPhrase.$searchDate.$searchDate);\n\n log_message('debug', '_event/get_event_list:: [2] searchstring='.$searchString);\n\n $result = $this->_query_reader->get_list('get_list_of_events',array(\n\t\t\t'user_id'=>$userId,\n\t\t\t'user_latitude'=>$location['latitude'],\n\t\t\t'user_longitude'=>$location['longitude'],\n 'owner_type'=>$details['ownerType'],\n 'promotion_types'=>$details['promotionTypes'],\n 'status'=>$status,\n 'list_type'=>$filters['listType'],\n 'max_search_distance'=>$details['maxSearchDistance'],\n\t\t\t'search_string'=>$searchString,\n 'limit_text'=>'limit '.$offset.', '.$limit\n\t\t\t));\n\n log_message('debug', '_event/get_event_list:: [3] result='.json_encode($result));\n return $result;\n }",
"public function index()\n {\n $e = Event::all();\n return view('admin.events.index' , compact('e'));\n }",
"public function index()\n {\n // $adminevent = Event::all();\n // return view('admin.adminevent.list')->with('adminevent', $adminevent);\n return view('admin/adminevent/list', ['adminevent' => Event::orderBy('start')->get()]);\n }",
"function showEvent() \n {\n if (isset($_SESSION['eventid']) AND isset($_SESSION['eventguest'])) {\n // event und gast informationen\n echo \"<div class=''>\";\n echo \"<div class='rightBody'>\";\n $this->askUserForZusage($_SESSION['eventid']);\n $this->askUserForCount($_SESSION['eventid']);\n $this->showSmallGuestList();\n echo \"</div>\";\n echo \"<div class='innerBody'>\";\n echo \"<ul class='finanzNAV'>\";\n $this->eventAdministration();\n echo \"</ul>\";\n $eventname = $this->getEventname($_SESSION['eventid']);\n echo \"<h1><a href='event.php'>\" .$eventname . \"</a></h1>\";\n echo \"<h2>Willkommen \" . $this->getGuestName($_SESSION['eventguest']) . \"</h2>\";\n $this->showWelcomeMessage($_SESSION['eventid']);\n $this->showCountdowns($_SESSION['eventid']);\n $this->showBlogMessages($_SESSION['eventid']);\n echo \"</div>\";\n echo \"</div>\";\n \n }\n }",
"function display_postasevent_demo() {\n\techo '<table><tbody>';\n\techo '<tr><th>Event Start Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_start_date', true ) ) . '</td></tr>';\n\techo '<tr><th>Event Start Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_start_time', true ) . '</td></tr>';\n\n\techo '<tr style=\"background-color:rgba(81, 136, 230, 0.66);\"><th>Event End Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_end_date', true ) ) . '</td></tr>';\n\techo '<tr style=\"background-color:rgba(81, 136, 230, 0.66);\"><th>Event End Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_end_time', true ) . '</td></tr>';\n\n\techo '<tr><th>Registration Deadline Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_reg_date', true ) ) . '</td></tr>';\n\techo '<tr><th>Registration Deadline Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_reg_time', true ) . '</td></tr>';\n\techo '</tbody></table>';\n}",
"function EventReg_listblock_info()\n{\n // Values\n return array('text_type' => 'EventRegList',\n 'module' => 'EventReg',\n 'text_type_long' => 'EventReg list N events',\n 'allow_multiple' => true,\n 'form_content' => false,\n 'form_refresh' => false,\n 'show_preview' => true);\n}",
"public function index($event_id = NULL)\r\n\t{\r\n\t\tif ($this->model('User_model')->isLoggedIn() == false) {\r\n\t\t\theader('Location:'.ROOTURL.'/signin');\r\n\t\t}\r\n\t\t//===================================================\r\n\r\n\t\tif (!isset($event_id)) {\r\n\t\t\theader('Location:'.ROOTURL);\r\n\t\t}\r\n\r\n\r\n\t\t// Get event detail from db\r\n\t\t$data['event'] = $this->model('Events_model')->getEventDetailById($event_id);\r\n\t\t// var_dump($data['event']);\r\n\r\n\t\t//====================================================\r\n\t\t$data['eventid'] = $event_id;\r\n\r\n\t\tif ($data['event']==NULL) {\r\n\t\t\t$data['title'] = 'Karcisku - Unknown Event Id';\r\n\t\t\t$this->view('template/header',$data);\r\n\t\t\t$this->view('template/navigation');\r\n\t\t\t$this->view('event/notfound',$data);\r\n\t\t\t$this->view('template/footer');\r\n\t\t}else{\r\n\t\t\t$data['title'] = 'Karcisku - Event Detail';\r\n\t\t\t$this->view('template/header',$data);\r\n\t\t\t$this->view('template/navigation');\r\n\t\t\t$this->view('event/index',$data);\r\n\t\t\t$this->view('template/footer');\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public function getRender(){\n /*\n * adiciona os listeners de comportamento padrão do componente\n */\n \n //ação que executa ao clicar sobre algum evento, abre a tela com as informações carregadas\n $sFuncao = \"eventWindow.show(record, el);\";\n $this->addListener(self::EVENTO_CLICK,$sFuncao,\"view, record, el\");\n \n //ação que ocorre ao clicar sobre os grids (dia, semana, mês)\n $sFuncao = \"eventWindow.show({\"\n .\"StartDate: date,\"\n .\"IsAllDay: allDay\"\n .\"}, el);\";\n $this->addListener(self::EVENTO_DAY_CLICK,$sFuncao,\"view, date, allDay, el\");\n \n //ação que ocorre ao redimensionar (aumentar ou reduzir) o tempo de um evento\n $sFuncaoUpdate = \"var calendarEventStore = Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].eventStore;\"\n .\"calendarEventStore.sync({\"\n .\"callback: function(batch, operation){\"\n .\"var result = batch.operations[0].request.scope.reader.jsonData['success'];\"\n .\"if(!result){\"\n .\"calendarEventStore.rejectChanges();\"\n .\"}\"\n .\"}\"\n .\"});\";\n $this->addListener(self::EVENTO_RESIZE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao mover um evento na tela\n $this->addListener(self::EVENTO_MOVE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao iniciar a movimentação dos elementos na tela\n $sFuncao = \"if(eventWindow && eventWindow.isVisible()){\"\n .\"eventWindow.hide();\"\n .\"}\";\n $this->addListener(self::EVENTO_DRAG,$sFuncao,\"view\");\n \n //ação que ocorre após selecionar várias linhas no grid (permite criar novo eventos por intervalos)\n $sFuncao = \"eventWindow.show(dates);\"\n .\"eventWindow.on('hide', onComplete, this, {single:true});\";\n $this->addListener(self::EVENTO_RANGE,$sFuncao,\"window, dates, onComplete\");\n \n /*\n * eventos que podem ser implementados no componente\n */\n //$this->addListener(self::EVENTO_OVER,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_OUT,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_ADD,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_UPDATE,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_DELETE,$sFuncao,\"window, record\");\n //$this->addListener(self::EVENTO_CANCEL,\"\",\"form, record\");\n //$this->addListener(self::EVENTO_VIEW_CHANGE,$sFuncao,\"panel, view, info\");\n \n $aRender = array(\n \"xtype\" => 'calendarpanel',\n \"itemId\" => $this->getId().\"-calendar\",\n \"calendarStore\" => $this->getRenderStoreTipoEvento(),\n \"eventStore\" => $this->getRenderStoreEvento(),\n \"activeItem\" => $this->getPerspectiva(),\n \"showNavBar\" => $this->getMostraBarraPerspectivas(),\n \"showDayView\" => $this->getMostraPerspectivaDia(),\n \"showWeekView\" => $this->getMostraPerspectivaSemana(),\n \"showMonthView\" => $this->getMostraPerspectivaMes(),\n \"showTime\" => $this->getMostraHora(),\n \"monthViewCfg\" => $this->getConfiguracaoMes(),\n \"eventIncrement\" => $this->getDuracaoEvento(),\n \"viewStartHour\" => $this->getHoraInicial(),\n \"viewStartMinute\" => $this->getMinutoInicial(),\n \"viewEndHour\" => $this->getHoraFinal(),\n \"viewEndMinute\" => $this->getMinutoFinal(),\n \"viewConfig\" => $this->getConfiguracao(),\n \"listeners\" => $this->getListeners()\n );\n \n $sRender = \"Ext.create('Ext.panel.Panel', {\"\n .\"layout: 'border',\"\n .\"border: true,\"\n .\"items: [{\"\n .\"xtype: 'panel',\"\n .\"itemId: '\".$this->getId().\"-region-west',\"\n .\"region: 'west',\"\n .\"title: 'Calendário',\"\n .\"collapsible: true,\"\n .\"split: true,\"\n .\"width: 220,\"\n .\"maxWidth: 220,\"\n .\"layoutConfig: {\"\n .\"fill: false,\"\n .\"animate: true\"\n .\"},\"\n .\"padding: '3',\"\n .\"bodyStyle:{\"\n .\"backgroundColor: '#157fcc'\"\n .\"},\"\n .\"items: [{\"\n .\"xtype: 'datepicker',\"\n .\"itemId: '\".$this->getId().\"-picker',\"\n .\"cls: 'ext-cal-nav-picker',\"\n .\"listeners: {\"\n .\"'select': {\"\n .\"fn: function(dp, dt){\"\n .\"Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].setStartDate(dt);\"\n .\"},\"\n .\"scope: this\"\n .\"}\"\n .\"}\"\n .\"},{\"\n .$this->getListaAgenda()\n .\"}]\"\n .\"},{\"\n .\"region: 'center',\"\n .\"itemId: '\".$this->getId().\"-region-center',\"\n .\"style:{\"\n .\"border: '3px solid #5A91D2',\"\n .\"borderLeft: 'none'\"\n .\"},\"\n .Base::getRender($aRender)\n .\"}]\"\n .\"})\";\n \n return Base::addObj($sRender,$this->getRenderTo()).$this->getTelaManutencao();\n }",
"public function index()\n {\n $events = Evenement::orderBy('created_at', 'desc')->paginate(10);\n return view('user.events.index')->with(compact('events' ) );\n }",
"function RenderListRow() {\n\t\tglobal $conn, $Security;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// C_EVENT_ID\n\n\t\t$this->C_EVENT_ID->CellCssStyle = \"\"; $this->C_EVENT_ID->CellCssClass = \"\";\n\t\t$this->C_EVENT_ID->CellAttrs = array(); $this->C_EVENT_ID->ViewAttrs = array(); $this->C_EVENT_ID->EditAttrs = array();\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID->CellCssStyle = \"\"; $this->FK_CONGTY_ID->CellCssClass = \"\";\n\t\t$this->FK_CONGTY_ID->CellAttrs = array(); $this->FK_CONGTY_ID->ViewAttrs = array(); $this->FK_CONGTY_ID->EditAttrs = array();\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT->CellCssStyle = \"\"; $this->C_TYPE_EVENT->CellCssClass = \"\";\n\t\t$this->C_TYPE_EVENT->CellAttrs = array(); $this->C_TYPE_EVENT->ViewAttrs = array(); $this->C_TYPE_EVENT->EditAttrs = array();\n\n\t\t// C_POST\n\t\t$this->C_POST->CellCssStyle = \"\"; $this->C_POST->CellCssClass = \"\";\n\t\t$this->C_POST->CellAttrs = array(); $this->C_POST->ViewAttrs = array(); $this->C_POST->EditAttrs = array();\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->CellCssStyle = \"\"; $this->C_DATETIME_BEGIN->CellCssClass = \"\";\n\t\t$this->C_DATETIME_BEGIN->CellAttrs = array(); $this->C_DATETIME_BEGIN->ViewAttrs = array(); $this->C_DATETIME_BEGIN->EditAttrs = array();\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->CellCssStyle = \"\"; $this->C_DATETIME_END->CellCssClass = \"\";\n\t\t$this->C_DATETIME_END->CellAttrs = array(); $this->C_DATETIME_END->ViewAttrs = array(); $this->C_DATETIME_END->EditAttrs = array();\n\n\t\t// C_ODER\n\t\t$this->C_ODER->CellCssStyle = \"\"; $this->C_ODER->CellCssClass = \"\";\n\t\t$this->C_ODER->CellAttrs = array(); $this->C_ODER->ViewAttrs = array(); $this->C_ODER->EditAttrs = array();\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->CellCssStyle = \"\"; $this->C_USER_ADD->CellCssClass = \"\";\n\t\t$this->C_USER_ADD->CellAttrs = array(); $this->C_USER_ADD->ViewAttrs = array(); $this->C_USER_ADD->EditAttrs = array();\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->CellCssStyle = \"\"; $this->C_ADD_TIME->CellCssClass = \"\";\n\t\t$this->C_ADD_TIME->CellAttrs = array(); $this->C_ADD_TIME->ViewAttrs = array(); $this->C_ADD_TIME->EditAttrs = array();\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->CellCssStyle = \"\"; $this->C_USER_EDIT->CellCssClass = \"\";\n\t\t$this->C_USER_EDIT->CellAttrs = array(); $this->C_USER_EDIT->ViewAttrs = array(); $this->C_USER_EDIT->EditAttrs = array();\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->CellCssStyle = \"\"; $this->C_EDIT_TIME->CellCssClass = \"\";\n\t\t$this->C_EDIT_TIME->CellAttrs = array(); $this->C_EDIT_TIME->ViewAttrs = array(); $this->C_EDIT_TIME->EditAttrs = array();\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE->CellCssStyle = \"\"; $this->C_ACTIVE_LEVELSITE->CellCssClass = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->CellAttrs = array(); $this->C_ACTIVE_LEVELSITE->ViewAttrs = array(); $this->C_ACTIVE_LEVELSITE->EditAttrs = array();\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->CellCssStyle = \"\"; $this->C_TIME_ACTIVE->CellCssClass = \"\";\n\t\t$this->C_TIME_ACTIVE->CellAttrs = array(); $this->C_TIME_ACTIVE->ViewAttrs = array(); $this->C_TIME_ACTIVE->EditAttrs = array();\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL->CellCssStyle = \"\"; $this->C_SEND_MAIL->CellCssClass = \"\";\n\t\t$this->C_SEND_MAIL->CellAttrs = array(); $this->C_SEND_MAIL->ViewAttrs = array(); $this->C_SEND_MAIL->EditAttrs = array();\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE->CellCssStyle = \"\"; $this->C_FK_BROWSE->CellCssClass = \"\";\n\t\t$this->C_FK_BROWSE->CellAttrs = array(); $this->C_FK_BROWSE->ViewAttrs = array(); $this->C_FK_BROWSE->EditAttrs = array();\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI->CellCssStyle = \"\"; $this->FK_ARRAY_TINBAI->CellCssClass = \"\";\n\t\t$this->FK_ARRAY_TINBAI->CellAttrs = array(); $this->FK_ARRAY_TINBAI->ViewAttrs = array(); $this->FK_ARRAY_TINBAI->EditAttrs = array();\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY->CellCssStyle = \"\"; $this->FK_ARRAY_CONGTY->CellCssClass = \"\";\n\t\t$this->FK_ARRAY_CONGTY->CellAttrs = array(); $this->FK_ARRAY_CONGTY->ViewAttrs = array(); $this->FK_ARRAY_CONGTY->EditAttrs = array();\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID->ViewValue = $this->C_EVENT_ID->CurrentValue;\n\t\t$this->C_EVENT_ID->CssStyle = \"\";\n\t\t$this->C_EVENT_ID->CssClass = \"\";\n\t\t$this->C_EVENT_ID->ViewCustomAttributes = \"\";\n\n\t\t// FK_CONGTY_ID\n\t\tif (strval($this->FK_CONGTY_ID->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`PK_MACONGTY` = \" . ew_AdjustSql($this->FK_CONGTY_ID->CurrentValue) . \"\";\n\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_CONGTY_ID->ViewValue = $rswrk->fields('C_TENCONGTY');\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_CONGTY_ID->ViewValue = $this->FK_CONGTY_ID->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_CONGTY_ID->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_CONGTY_ID->CssStyle = \"\";\n\t\t$this->FK_CONGTY_ID->CssClass = \"\";\n\t\t$this->FK_CONGTY_ID->ViewCustomAttributes = \"\";\n\n\t\t// C_TYPE_EVENT\n\t\tif (strval($this->C_TYPE_EVENT->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_TYPE_EVENT->CurrentValue) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai Popup\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai su kien theo bai viet\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"3\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai su kien lien ket\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = $this->C_TYPE_EVENT->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_TYPE_EVENT->ViewValue = NULL;\n\t\t}\n\t\t$this->C_TYPE_EVENT->CssStyle = \"\";\n\t\t$this->C_TYPE_EVENT->CssClass = \"\";\n\t\t$this->C_TYPE_EVENT->ViewCustomAttributes = \"\";\n\n\t\t// C_POST\n\t\tif (strval($this->C_POST->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_POST->CurrentValue) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"trang chu\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"trang tuyen sinh\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_POST->ViewValue = $this->C_POST->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_POST->ViewValue = NULL;\n\t\t}\n\t\t$this->C_POST->CssStyle = \"\";\n\t\t$this->C_POST->CssClass = \"\";\n\t\t$this->C_POST->ViewCustomAttributes = \"\";\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->ViewValue = $this->C_DATETIME_BEGIN->CurrentValue;\n\t\t$this->C_DATETIME_BEGIN->ViewValue = ew_FormatDateTime($this->C_DATETIME_BEGIN->ViewValue, 7);\n\t\t$this->C_DATETIME_BEGIN->CssStyle = \"\";\n\t\t$this->C_DATETIME_BEGIN->CssClass = \"\";\n\t\t$this->C_DATETIME_BEGIN->ViewCustomAttributes = \"\";\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->ViewValue = $this->C_DATETIME_END->CurrentValue;\n\t\t$this->C_DATETIME_END->ViewValue = ew_FormatDateTime($this->C_DATETIME_END->ViewValue, 7);\n\t\t$this->C_DATETIME_END->CssStyle = \"\";\n\t\t$this->C_DATETIME_END->CssClass = \"\";\n\t\t$this->C_DATETIME_END->ViewCustomAttributes = \"\";\n\n\t\t// C_ODER\n\t\t$this->C_ODER->ViewValue = $this->C_ODER->CurrentValue;\n\t\t$this->C_ODER->ViewValue = ew_FormatDateTime($this->C_ODER->ViewValue, 7);\n\t\t$this->C_ODER->CssStyle = \"\";\n\t\t$this->C_ODER->CssClass = \"\";\n\t\t$this->C_ODER->ViewCustomAttributes = \"\";\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->ViewValue = $this->C_USER_ADD->CurrentValue;\n\t\t$this->C_USER_ADD->CssStyle = \"\";\n\t\t$this->C_USER_ADD->CssClass = \"\";\n\t\t$this->C_USER_ADD->ViewCustomAttributes = \"\";\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->ViewValue = $this->C_ADD_TIME->CurrentValue;\n\t\t$this->C_ADD_TIME->ViewValue = ew_FormatDateTime($this->C_ADD_TIME->ViewValue, 7);\n\t\t$this->C_ADD_TIME->CssStyle = \"\";\n\t\t$this->C_ADD_TIME->CssClass = \"\";\n\t\t$this->C_ADD_TIME->ViewCustomAttributes = \"\";\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->ViewValue = $this->C_USER_EDIT->CurrentValue;\n\t\t$this->C_USER_EDIT->CssStyle = \"\";\n\t\t$this->C_USER_EDIT->CssClass = \"\";\n\t\t$this->C_USER_EDIT->ViewCustomAttributes = \"\";\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->ViewValue = $this->C_EDIT_TIME->CurrentValue;\n\t\t$this->C_EDIT_TIME->ViewValue = ew_FormatDateTime($this->C_EDIT_TIME->ViewValue, 7);\n\t\t$this->C_EDIT_TIME->CssStyle = \"\";\n\t\t$this->C_EDIT_TIME->CssClass = \"\";\n\t\t$this->C_EDIT_TIME->ViewCustomAttributes = \"\";\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\tif (strval($this->C_ACTIVE_LEVELSITE->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_ACTIVE_LEVELSITE->CurrentValue) {\n\t\t\t\tcase \"0\":\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = \"khong kich hoat\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = \"Kich hoat\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = $this->C_ACTIVE_LEVELSITE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = NULL;\n\t\t}\n\t\t$this->C_ACTIVE_LEVELSITE->CssStyle = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->CssClass = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->ViewCustomAttributes = \"\";\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->ViewValue = $this->C_TIME_ACTIVE->CurrentValue;\n\t\t$this->C_TIME_ACTIVE->ViewValue = ew_FormatDateTime($this->C_TIME_ACTIVE->ViewValue, 7);\n\t\t$this->C_TIME_ACTIVE->CssStyle = \"\";\n\t\t$this->C_TIME_ACTIVE->CssClass = \"\";\n\t\t$this->C_TIME_ACTIVE->ViewCustomAttributes = \"\";\n\n\t\t// C_SEND_MAIL\n\t\tif (strval($this->C_SEND_MAIL->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_SEND_MAIL->CurrentValue) {\n\t\t\t\tcase \"0\":\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = \"khong gui mail\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = \"gui mail\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = $this->C_SEND_MAIL->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_SEND_MAIL->ViewValue = NULL;\n\t\t}\n\t\t$this->C_SEND_MAIL->CssStyle = \"\";\n\t\t$this->C_SEND_MAIL->CssClass = \"\";\n\t\t$this->C_SEND_MAIL->ViewCustomAttributes = \"\";\n\n\t\t// C_FK_BROWSE\n\t\tif (strval($this->C_FK_BROWSE->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->C_FK_BROWSE->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`C_HOTEN` = '\" . ew_AdjustSql(trim($wrk)) . \"'\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_EMAIL` FROM `t_nguoidung`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->C_FK_BROWSE->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->C_FK_BROWSE->ViewValue .= $rswrk->fields('C_EMAIL');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->C_FK_BROWSE->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->C_FK_BROWSE->ViewValue = $this->C_FK_BROWSE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_FK_BROWSE->ViewValue = NULL;\n\t\t}\n\t\t$this->C_FK_BROWSE->CssStyle = \"\";\n\t\t$this->C_FK_BROWSE->CssClass = \"\";\n\t\t$this->C_FK_BROWSE->ViewCustomAttributes = \"\";\n\n\t\t// FK_ARRAY_TINBAI\n\t\tif (strval($this->FK_ARRAY_TINBAI->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->FK_ARRAY_TINBAI->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`PK_TINBAI_ID` = \" . ew_AdjustSql(trim($wrk)) . \"\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_TITLE` FROM `t_tinbai_levelsite`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue .= $rswrk->fields('C_TITLE');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->FK_ARRAY_TINBAI->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = $this->FK_ARRAY_TINBAI->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_ARRAY_TINBAI->CssStyle = \"\";\n\t\t$this->FK_ARRAY_TINBAI->CssClass = \"\";\n\t\t$this->FK_ARRAY_TINBAI->ViewCustomAttributes = \"\";\n\n\t\t// FK_ARRAY_CONGTY\n\t\tif (strval($this->FK_ARRAY_CONGTY->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->FK_ARRAY_CONGTY->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`PK_MACONGTY` = \" . ew_AdjustSql(trim($wrk)) . \"\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue .= $rswrk->fields('C_TENCONGTY');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->FK_ARRAY_CONGTY->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = $this->FK_ARRAY_CONGTY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_ARRAY_CONGTY->CssStyle = \"\";\n\t\t$this->FK_ARRAY_CONGTY->CssClass = \"\";\n\t\t$this->FK_ARRAY_CONGTY->ViewCustomAttributes = \"\";\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID->HrefValue = \"\";\n\t\t$this->C_EVENT_ID->TooltipValue = \"\";\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID->HrefValue = \"\";\n\t\t$this->FK_CONGTY_ID->TooltipValue = \"\";\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT->HrefValue = \"\";\n\t\t$this->C_TYPE_EVENT->TooltipValue = \"\";\n\n\t\t// C_POST\n\t\t$this->C_POST->HrefValue = \"\";\n\t\t$this->C_POST->TooltipValue = \"\";\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->HrefValue = \"\";\n\t\t$this->C_DATETIME_BEGIN->TooltipValue = \"\";\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->HrefValue = \"\";\n\t\t$this->C_DATETIME_END->TooltipValue = \"\";\n\n\t\t// C_ODER\n\t\t$this->C_ODER->HrefValue = \"\";\n\t\t$this->C_ODER->TooltipValue = \"\";\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->HrefValue = \"\";\n\t\t$this->C_USER_ADD->TooltipValue = \"\";\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->HrefValue = \"\";\n\t\t$this->C_ADD_TIME->TooltipValue = \"\";\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->HrefValue = \"\";\n\t\t$this->C_USER_EDIT->TooltipValue = \"\";\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->HrefValue = \"\";\n\t\t$this->C_EDIT_TIME->TooltipValue = \"\";\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE->HrefValue = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->TooltipValue = \"\";\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->HrefValue = \"\";\n\t\t$this->C_TIME_ACTIVE->TooltipValue = \"\";\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL->HrefValue = \"\";\n\t\t$this->C_SEND_MAIL->TooltipValue = \"\";\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE->HrefValue = \"\";\n\t\t$this->C_FK_BROWSE->TooltipValue = \"\";\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI->HrefValue = \"\";\n\t\t$this->FK_ARRAY_TINBAI->TooltipValue = \"\";\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY->HrefValue = \"\";\n\t\t$this->FK_ARRAY_CONGTY->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"function overview($tpl = null)\n\t{\n\t\tif (JVersion::isCompatible(\"1.6.0\"))\n\t\t\tJHTML::stylesheet('administrator/components/' . JEV_COM_COMPONENT . '/assets/css/eventsadmin.css');\n\t\telse\n\t\t\tJHTML::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');\n\n\t\t$document = & JFactory::getDocument();\n\t\t$document->setTitle(JText::_( 'ICAL_EVENTS' ));\n\n\t\t// Set toolbar items for the page\n\t\tJToolBarHelper::title(JText::_( 'ICAL_EVENTS' ), 'jevents');\n\n\t\t//JToolBarHelper::custom('icalevent.csvimport','upload.png','upload.png','JEV_ADMIN_CSVIMPORT',false);\n\t\tJToolBarHelper::publishList('icalevent.publish');\n\t\tJToolBarHelper::unpublishList('icalevent.unpublish');\n\t\tJToolBarHelper::addNew('icalevent.edit');\n\t\tJToolBarHelper::editList('icalevent.edit');\n\t\tJToolBarHelper::custom('icalevent.editcopy', 'copy.png', 'copy.png', 'JEV_ADMIN_COPYEDIT');\n\t\tJToolBarHelper::deleteList('Delete Event and all repeats?', 'icalevent.delete');\n\t\tJToolBarHelper::spacer();\n\t\tJToolBarHelper::custom('cpanel.cpanel', 'default.png', 'default.png', 'JEV_ADMIN_CPANEL', false);\n\t\t//JToolBarHelper::help( 'screen.ical', true);\n\n\t\tJSubMenuHelper::addEntry(JText::_( 'CONTROL_PANEL' ), 'index.php?option=' . JEV_COM_COMPONENT, true);\n\n\t\t$params = JComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t//$section = $params->getValue(\"section\",0);\n\n\t\tJHTML::_('behavior.tooltip');\n\n\t}",
"public function index()\n {\n $events = Event::latest()->paginate(5);\n return view('events',compact('events'));\n }",
"function admin_index() {\n\t\t$this->Event->recursive = 0;\n\t\t$this->set('events',$this->paginate());\n\t}",
"public function index()\n {\n $events = Event::oldest('displayOrder')->get();\n\n return view('events.index', compact('events'));\n }",
"public function index()\n {\n $events = Event::all();\n return view('event.list',['events'=>$events]);\n }",
"function latest_events($user_id = '', $from_date_field = 'start_date', $order = 'DESC', $number_of_latest_events = 1) {\n\t$latest_events = get_latest_events('', $from_date_field, $from_date_field, $order, $number_of_latest_events);\n\n\tif (empty($latest_events)) {\n\t\treturn;\n\t}\n?>\n\t\t<!-- Latest Events -->\n\t\t<section id=\"latest-events\" class=\"section-invert featurette\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t<h2>Latest sponsored event<?php echo (count($latest_events) > 1 ? 's' : ''); ?></h2>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"latest-events row\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ($latest_events as $latest_event) :\n\t\t\t\t\t\t$latest_event_featured_image = get_asset($latest_event['event_featured_image_id']);\n\t\t\t\t\t\t$latest_event_featured_image_properties = json_decode($latest_event_featured_image['asset_properties'], TRUE);\n\t\t\t\t\t\t$latest_event_featured_image_thumbnail_url = get_image_thumbnail_url($latest_event_featured_image_properties, 'desktop_featured_image');\n\t\t\t\t\t?>\n\t\t\t\t\t<div id=\"latest-event-<?php echo $latest_event['id']; ?>\" class=\"latest-events-event-wrapper\">\n\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t<a href=\"event.php?event_id=<?php echo $latest_event['id']; ?>\"><img class=\"img-responsive\" src=\"<?php echo $latest_event_featured_image_thumbnail_url; ?>\" alt=\"<?php echo 'event featured image'; // $latest_event_featured_image['asset_caption']; ?>\"></a>\n\t\t\t\t\t\t</div><!-- .col-md-7 -->\n\n\t\t\t\t\t\t<div class=\"col-md-6 hero\">\n\t\t\t\t\t\t\t<h3 class=\"lead\"><a href=\"event.php?event_id=<?php echo $latest_event['id']; ?>\"><?php echo $latest_event['event_name']; ?></a></h3>\n\n\t\t\t\t\t\t\t<?php echo ($latest_event['event_start_date'] ? '<p class=\"lead\">' . ($latest_event['event_end_date'] && $latest_event['event_start_date'] == $latest_event['event_end_date'] ? 'On ' : 'From ') . date('F j, Y', strtotime($latest_event['event_start_date'])) . ($latest_event['event_end_date'] && $latest_event['event_start_date'] != $latest_event['event_end_date'] ? ' to ' . date('F j, Y', strtotime($latest_event['event_end_date'])) : '') . '</p>' : ''); ?>\n\n\t\t\t\t\t\t\t<?php echo ($latest_event['event_description'] ? '<p class=\"lead\">' . $latest_event['event_description'] . '</p>' : ''); ?>\n\n\t\t\t\t\t\t\t<a href=\"upload-photos-to-event.php?event_id=<?php echo $latest_event['id']; ?>\" class=\"btn btn-primary\">Let's make a movie now</a>\n\t\t\t\t\t\t</div><!-- .col-md-5 -->\n\n\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t</div><!-- .latest-events-event-wrapper -->\n\t\t\t\t\t<?php endforeach; // foreach ($latest_events as $latest_event) ?>\n\t\t\t\t</div><!-- .latest-events -->\n\t\t\t</div><!-- .container -->\n\t\t</section><!-- #latest-events -->\n<?php\n}",
"public function showEvents()\n {\n $seller = Seller::where('user_id', Auth::user()->id)\n ->first();\n\n $sellerID = Seller::where('user_id', Auth::user()->id)\n ->pluck('id');\n // note: to be refactored\n\n //table column where id\n $schedule = DB::table('final_schedules')\n ->join('event_params', 'final_schedules.event_param_id', '=', 'event_params.id')\n ->where('final_schedules.seller_id', '=', $sellerID)\n ->get();\n\n // gets the buyer_id and event_param_id\n $info = DB::table('final_schedules')\n ->join('sellers', 'final_schedules.seller_id', '=', 'sellers.id')\n ->select('buyer_id', 'event_param_id')\n ->where('sellers.id', '=', $sellerID)\n ->get();\n\n // gets Name (first and last) of buyer in the final schedule\n $buyer = DB::table('users')\n ->join('buyers', 'users.id', '=', 'buyers.user_id')\n ->get();\n\n return view('seller.event')\n ->with('events', $seller->events)\n ->with('schedule', $schedule)\n ->with('info', $info)\n ->with('buyer', $buyer);\n }",
"public function index()\n {\n //DB::table('events')->orderBy('created_at','desc')->get()\n return view('event.index2');//->with('evenements' , Event::paginate(10));\n }"
] | [
"0.78498334",
"0.7236979",
"0.7017266",
"0.7009315",
"0.699223",
"0.6922443",
"0.6915301",
"0.6868072",
"0.6734911",
"0.66499925",
"0.6647157",
"0.66308135",
"0.6611031",
"0.6596573",
"0.6560581",
"0.65400994",
"0.6506537",
"0.6479158",
"0.64785296",
"0.6461053",
"0.6459901",
"0.6459363",
"0.6451719",
"0.6450238",
"0.6443892",
"0.64362043",
"0.64153695",
"0.6408182",
"0.6404237",
"0.63840586",
"0.63777965",
"0.6372594",
"0.6367655",
"0.63637984",
"0.6357773",
"0.6357266",
"0.634518",
"0.63447756",
"0.63374245",
"0.63315547",
"0.63312346",
"0.63286966",
"0.6327164",
"0.630742",
"0.62886214",
"0.6287707",
"0.6281016",
"0.6262446",
"0.6250321",
"0.62415576",
"0.6230658",
"0.6221651",
"0.62168026",
"0.6213783",
"0.61999536",
"0.6190274",
"0.6188251",
"0.6187683",
"0.61755043",
"0.616754",
"0.61624473",
"0.61463976",
"0.6142669",
"0.61414343",
"0.61386675",
"0.6123881",
"0.6121723",
"0.6115802",
"0.6115802",
"0.6110079",
"0.61092955",
"0.609733",
"0.6095862",
"0.609446",
"0.6094265",
"0.6091345",
"0.60888916",
"0.60841024",
"0.60815793",
"0.60810286",
"0.607889",
"0.606551",
"0.60636824",
"0.6056328",
"0.60552394",
"0.6052535",
"0.6050039",
"0.60278",
"0.60272735",
"0.60269934",
"0.6026361",
"0.6021424",
"0.60209584",
"0.6000321",
"0.6000109",
"0.59992826",
"0.5997753",
"0.59941494",
"0.59938544",
"0.5987826"
] | 0.68128026 | 8 |
Generate the inner content of the event list wrapper | function obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets = null ) {
echo '<h3 class="section-title green">Upcoming events</h3>';
obj_do_cx_events_list_filter( $events );
obj_do_cx_events_list( $events );
obj_do_cx_event_bottom_banner_output( $bottom_banner );
obj_do_cx_events_list_pagination( $pagination );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}",
"private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}",
"public function events_markup_collect(){\n\n // Return the events markup array\n return $this->events;\n\n }",
"function render_list($events,$detail_flag){\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\n\t\t$return_val=$return_val.\"<table>\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\n\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"<b>\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"(\".($i+1).\") \";\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"<a href=\\\"#\".($i+1).\"\\\">\";\n\t\t\t}\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"</b>\";\n\t\t\t}\n\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"</a>\";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$date=$next_event->get_start_date_object();\n\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\" \";\n\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\". \";\n\t\t\t$return_val=$return_val.$next_event->get_start_day().\", \";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\" - \";\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\" \";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Topic: '.(htmlspecialchars($next_event->get_event_topic_name()));\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Type: '.(htmlspecialchars($next_event->get_event_type_name()));\n\n\t\t\t$return_val=$return_val.\"</td></tr>\";\n\t\t\t$i=$i+1;\n\t\t}\n\n\t\tif ($detail_flag==\"on\") {\n\n\t\t\tif ($number_of_events >0)\n\t\t\t\t$return_val=$return_val.\"<tr><td>---------------------------------------------------</td></tr>\";\n\t\t\t$i=0;\n\n\t\t\twhile($i<$number_of_events){\n\t\t\t\t$next_event=$events[$i];\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\"><b>';\n\t\t\t\t$return_val=$return_val.'<a name=\"'.($i+1).'\"></a>';\n\t\t\t\t$return_val=$return_val.\"(\".($i+1).\") \";\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t\t$return_val=$return_val.\"</b></td></tr>\";\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$date=$next_event->get_start_date_object();\n\n\t\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\" \";\n\t\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\". \";\n\t\t\t\t$return_val=$return_val.$next_event->get_start_day().\", \";\n\n\t\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.$display_timerange;\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\" \";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_location_details()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.\"Contact:<br />\";\n\n\t\t\t\tif (strlen(trim($next_event->get_contact_name()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_name()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_phone()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_phone()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_email()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_email()).\"<br />\";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'</td><tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td> </td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.(nl2br($next_event->get_description()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.\"<tr><td> </td></tr>\";\n\t\t\t\t$i=$i+1;\n\t\t\t}\n\t\t}\n\n\t\t$return_val=$return_val.'</table>';\n\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \" \";\n\t\t}\n\t\treturn $return_val;\n\t}",
"public function renderListContent() {}",
"function EventReg_listblock_info()\n{\n // Values\n return array('text_type' => 'EventRegList',\n 'module' => 'EventReg',\n 'text_type_long' => 'EventReg list N events',\n 'allow_multiple' => true,\n 'form_content' => false,\n 'form_refresh' => false,\n 'show_preview' => true);\n}",
"function eventContent($event,$i)\r\n\t{\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\t\r\n\t\techo \"<div class='event-content'>\";\r\n\t\t\r\n\t\tif($i != 0){\r\n\t\t\techo \t\"\".$this->truncate($event['content'], 250, false).\"\".\r\n\t\t\t\t\t\"<a class='event-more' href='\".$_SETTINGS['website'].\"/\".$_REQUEST['page'].\"/\".$event['name'].\"' >\".\r\n\t\t\t\t\t\"<span>More</span>\".\r\n\t\t\t\t\t\"</a>\";\r\n\t\t} else {\r\n\t\t\techo $event['content'];\r\n\t\t}\r\n\t\t\r\n\t\techo \"</div>\";\r\n\t}",
"public function render()\n {\n $result = array();\n\n if ($this->hasSources())\n {\n $visibleSources = 0;\n\n $result[] = '<div class=\"panel panel-default table-calendar-legend\">';\n $result[] = '<div class=\"panel-heading\">';\n $result[] = '<h4 class=\"panel-title\">' . Translation::get('Legend') . '</h4>';\n $result[] = '</div>';\n $result[] = '<ul class=\"list-group\">';\n\n $sources = $this->getSources();\n\n sort($sources);\n\n foreach ($sources as $source)\n {\n $sourceClasses = $this->getSourceClasses($source);\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $isSourceVisible = $this->getDataProvider()->isSourceVisible($source);\n $eventClasses = ! $isSourceVisible ? ' event-container-source-faded' : '';\n }\n else\n {\n\n $eventClasses = '';\n }\n\n $result[] = '<li class=\"list-group-item\">';\n $result[] = '<div class=\"event-source' . $eventClasses . '\" data-source-key=\"' .\n $this->addSource($source) . '\" data-source=\"' . $source . '\">';\n $result[] = '<span class=\"event-container ' . $sourceClasses . '\"></span>';\n $result[] = $source;\n $result[] = '</div>';\n $result[] = '</li>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n if ($isSourceVisible)\n {\n $visibleSources ++;\n }\n }\n }\n\n $result[] = '</ul>';\n $result[] = '</div>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $result[] = '<script type=\"text/javascript\">';\n $result[] = 'var calendarVisibilityContext = ' .\n json_encode($this->getDataProvider()->getVisibilityContext()) . ';';\n $result[] = '</script>';\n\n $result[] = ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath(__NAMESPACE__, true) . 'Highlight.js');\n\n if ($visibleSources == 0)\n {\n $notificationMessageManager = new NotificationMessageManager();\n $notificationMessageManager->addMessage(\n new NotificationMessage(\n Translation::get('AllEventSourcesHidden'),\n NotificationMessage::TYPE_WARNING));\n }\n }\n }\n\n return implode(PHP_EOL, $result);\n }",
"function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}",
"public function events_markup_generate($eventinfo){\n\n // Create the frames counter if not exists\n if (!isset($this->counters['event_frames'])){ $this->counters['event_frames'] = 0; }\n\n // Define defaults for event options\n $options = array();\n $options['event_flag_autoplay'] = isset($eventinfo['event_options']['event_flag_autoplay']) ? $eventinfo['event_options']['event_flag_autoplay'] : true;\n $options['event_flag_victory'] = isset($eventinfo['event_options']['event_flag_victory']) ? $eventinfo['event_options']['event_flag_victory'] : false;\n $options['event_flag_defeat'] = isset($eventinfo['event_options']['event_flag_defeat']) ? $eventinfo['event_options']['event_flag_defeat'] : false;\n $options['console_container_height'] = isset($eventinfo['event_options']['console_container_height']) ? $eventinfo['event_options']['console_container_height'] : 1;\n $options['console_container_classes'] = isset($eventinfo['event_options']['console_container_classes']) ? $eventinfo['event_options']['console_container_classes'] : '';\n $options['console_container_styles'] = isset($eventinfo['event_options']['console_container_styles']) ? $eventinfo['event_options']['console_container_styles'] : '';\n $options['console_header_float'] = isset($eventinfo['event_options']['this_header_float']) ? $eventinfo['event_options']['this_header_float'] : '';\n $options['console_body_float'] = isset($eventinfo['event_options']['this_body_float']) ? $eventinfo['event_options']['this_body_float'] : '';\n $options['console_show_this'] = isset($eventinfo['event_options']['console_show_this']) ? $eventinfo['event_options']['console_show_this'] : true;\n $options['console_show_this_player'] = isset($eventinfo['event_options']['console_show_this_player']) ? $eventinfo['event_options']['console_show_this_player'] : false;\n $options['console_show_this_robot'] = isset($eventinfo['event_options']['console_show_this_robot']) ? $eventinfo['event_options']['console_show_this_robot'] : true;\n $options['console_show_this_ability'] = isset($eventinfo['event_options']['console_show_this_ability']) ? $eventinfo['event_options']['console_show_this_ability'] : false;\n $options['console_show_this_item'] = isset($eventinfo['event_options']['console_show_this_item']) ? $eventinfo['event_options']['console_show_this_item'] : false;\n $options['console_show_this_skill'] = isset($eventinfo['event_options']['console_show_this_skill']) ? $eventinfo['event_options']['console_show_this_skill'] : false;\n $options['console_show_this_star'] = isset($eventinfo['event_options']['console_show_this_star']) ? $eventinfo['event_options']['console_show_this_star'] : false;\n $options['console_show_target'] = isset($eventinfo['event_options']['console_show_target']) ? $eventinfo['event_options']['console_show_target'] : true;\n $options['console_show_target_player'] = isset($eventinfo['event_options']['console_show_target_player']) ? $eventinfo['event_options']['console_show_target_player'] : true;\n $options['console_show_target_robot'] = isset($eventinfo['event_options']['console_show_target_robot']) ? $eventinfo['event_options']['console_show_target_robot'] : true;\n $options['console_show_target_ability'] = isset($eventinfo['event_options']['console_show_target_ability']) ? $eventinfo['event_options']['console_show_target_ability'] : true;\n $options['canvas_show_this'] = isset($eventinfo['event_options']['canvas_show_this']) ? $eventinfo['event_options']['canvas_show_this'] : true;\n $options['canvas_show_this_robots'] = isset($eventinfo['event_options']['canvas_show_this_robots']) ? $eventinfo['event_options']['canvas_show_this_robots'] : true;\n $options['canvas_show_this_ability'] = isset($eventinfo['event_options']['canvas_show_this_ability']) ? $eventinfo['event_options']['canvas_show_this_ability'] : true;\n $options['canvas_show_this_ability_overlay'] = isset($eventinfo['event_options']['canvas_show_this_ability_overlay']) ? $eventinfo['event_options']['canvas_show_this_ability_overlay'] : false;\n $options['canvas_show_this_item'] = isset($eventinfo['event_options']['canvas_show_this_item']) ? $eventinfo['event_options']['canvas_show_this_item'] : true;\n $options['canvas_show_this_item_overlay'] = isset($eventinfo['event_options']['canvas_show_this_item_overlay']) ? $eventinfo['event_options']['canvas_show_this_item_overlay'] : false;\n $options['canvas_show_this_item_underlay'] = isset($eventinfo['event_options']['canvas_show_this_item_underlay']) ? $eventinfo['event_options']['canvas_show_this_item_underlay'] : true;\n $options['canvas_show_this_skill'] = isset($eventinfo['event_options']['canvas_show_this_skill']) ? $eventinfo['event_options']['canvas_show_this_skill'] : true;\n $options['canvas_show_this_skill_overlay'] = isset($eventinfo['event_options']['canvas_show_this_skill_overlay']) ? $eventinfo['event_options']['canvas_show_this_skill_overlay'] : false;\n $options['canvas_show_this_skill_underlay'] = isset($eventinfo['event_options']['canvas_show_this_skill_underlay']) ? $eventinfo['event_options']['canvas_show_this_skill_underlay'] : true;\n $options['canvas_show_target'] = isset($eventinfo['event_options']['canvas_show_target']) ? $eventinfo['event_options']['canvas_show_target'] : true;\n $options['canvas_show_target_robots'] = isset($eventinfo['event_options']['canvas_show_target_robots']) ? $eventinfo['event_options']['canvas_show_target_robots'] : true;\n $options['canvas_show_target_ability'] = isset($eventinfo['event_options']['canvas_show_target_ability']) ? $eventinfo['event_options']['canvas_show_target_ability'] : true;\n $options['canvas_show_target_item'] = isset($eventinfo['event_options']['canvas_show_target_item']) ? $eventinfo['event_options']['canvas_show_target_item'] : true;\n $options['canvas_show_target_skill'] = isset($eventinfo['event_options']['canvas_show_target_skill']) ? $eventinfo['event_options']['canvas_show_target_skill'] : true;\n $options['this_ability'] = isset($eventinfo['event_options']['this_ability']) ? $eventinfo['event_options']['this_ability'] : false;\n $options['this_ability_target'] = isset($eventinfo['event_options']['this_ability_target']) ? $eventinfo['event_options']['this_ability_target'] : false;\n $options['this_ability_target_key'] = isset($eventinfo['event_options']['this_ability_target_key']) ? $eventinfo['event_options']['this_ability_target_key'] : 0;\n $options['this_ability_target_position'] = isset($eventinfo['event_options']['this_ability_target_position']) ? $eventinfo['event_options']['this_ability_target_position'] : 'active';\n $options['this_ability_results'] = isset($eventinfo['event_options']['this_ability_results']) ? $eventinfo['event_options']['this_ability_results'] : false;\n $options['this_item'] = isset($eventinfo['event_options']['this_item']) ? $eventinfo['event_options']['this_item'] : false;\n $options['this_item_quantity'] = isset($eventinfo['event_options']['this_item_quantity']) ? $eventinfo['event_options']['this_item_quantity'] : 0;\n $options['this_item_target'] = isset($eventinfo['event_options']['this_item_target']) ? $eventinfo['event_options']['this_item_target'] : false;\n $options['this_item_target_key'] = isset($eventinfo['event_options']['this_item_target_key']) ? $eventinfo['event_options']['this_item_target_key'] : 0;\n $options['this_item_target_position'] = isset($eventinfo['event_options']['this_item_target_position']) ? $eventinfo['event_options']['this_item_target_position'] : 'active';\n $options['this_item_results'] = isset($eventinfo['event_options']['this_item_results']) ? $eventinfo['event_options']['this_item_results'] : false;\n $options['this_skill'] = isset($eventinfo['event_options']['this_skill']) ? $eventinfo['event_options']['this_skill'] : false;\n $options['this_skill_quantity'] = isset($eventinfo['event_options']['this_skill_quantity']) ? $eventinfo['event_options']['this_skill_quantity'] : 0;\n $options['this_skill_target'] = isset($eventinfo['event_options']['this_skill_target']) ? $eventinfo['event_options']['this_skill_target'] : false;\n $options['this_skill_target_key'] = isset($eventinfo['event_options']['this_skill_target_key']) ? $eventinfo['event_options']['this_skill_target_key'] : 0;\n $options['this_skill_target_position'] = isset($eventinfo['event_options']['this_skill_target_position']) ? $eventinfo['event_options']['this_skill_target_position'] : 'active';\n $options['this_skill_results'] = isset($eventinfo['event_options']['this_skill_results']) ? $eventinfo['event_options']['this_skill_results'] : false;\n $options['this_star'] = isset($eventinfo['event_options']['this_star']) ? $eventinfo['event_options']['this_star'] : false;\n $options['this_player_image'] = isset($eventinfo['event_options']['this_player_image']) ? $eventinfo['event_options']['this_player_image'] : 'sprite';\n $options['this_robot_image'] = isset($eventinfo['event_options']['this_robot_image']) ? $eventinfo['event_options']['this_robot_image'] : 'sprite';\n $options['this_ability_image'] = isset($eventinfo['event_options']['this_ability_image']) ? $eventinfo['event_options']['this_ability_image'] : 'sprite';\n $options['this_item_image'] = isset($eventinfo['event_options']['this_item_image']) ? $eventinfo['event_options']['this_item_image'] : 'sprite';\n $options['this_skill_image'] = isset($eventinfo['event_options']['this_skill_image']) ? $eventinfo['event_options']['this_skill_image'] : 'sprite';\n $options['event_flag_is_special'] = isset($eventinfo['event_options']['event_flag_is_special']) ? $eventinfo['event_options']['event_flag_is_special'] : false;\n $options['event_flag_camera_action'] = isset($eventinfo['event_options']['event_flag_camera_action']) ? $eventinfo['event_options']['event_flag_camera_action'] : false;\n $options['event_flag_camera_reaction'] = isset($eventinfo['event_options']['event_flag_camera_reaction']) ? $eventinfo['event_options']['event_flag_camera_reaction'] : false;\n $options['event_flag_camera_side'] = isset($eventinfo['event_options']['event_flag_camera_side']) ? $eventinfo['event_options']['event_flag_camera_side'] : 'left';\n $options['event_flag_camera_focus'] = isset($eventinfo['event_options']['event_flag_camera_focus']) ? $eventinfo['event_options']['event_flag_camera_focus'] : 'active';\n $options['event_flag_camera_depth'] = isset($eventinfo['event_options']['event_flag_camera_depth']) ? $eventinfo['event_options']['event_flag_camera_depth'] : 0;\n $options['event_flag_camera_offset'] = isset($eventinfo['event_options']['event_flag_camera_offset']) ? $eventinfo['event_options']['event_flag_camera_offset'] : 0;\n $options['event_flag_sound_effects'] = isset($eventinfo['event_options']['event_flag_sound_effects']) ? $eventinfo['event_options']['event_flag_sound_effects'] : false;\n\n // If it doesn't exist or a camera reset was provided, we should reset the array to empty\n if (!isset($this->values['last_camera_action'])\n || !empty($eventinfo['event_options']['event_flag_camera_reset'])){\n //error_log('creating last_camera_action ('.(!isset($this->values['last_camera_action']) ? 'not exists' : 'reset requested').')');\n $this->values['last_camera_action'] = array();\n }\n\n // Check to see if any camera action settings were provided in the event info\n $camera_action_provided = false;\n if (isset($eventinfo['event_options']['event_flag_camera_action'])\n || isset($eventinfo['event_options']['event_flag_camera_reaction'])\n || isset($eventinfo['event_options']['event_flag_camera_side'])\n || isset($eventinfo['event_options']['event_flag_camera_focus'])\n || isset($eventinfo['event_options']['event_flag_camera_depth'])\n || isset($eventinfo['event_options']['event_flag_camera_offset'])\n || isset($eventinfo['event_options']['event_flag_camera_reset'])\n ){\n $camera_action_provided = true;\n }\n\n // Define the variable to collect markup\n $this_markup = array();\n\n // Generate the event flags markup\n $event_flags = array();\n\n $event_flags['autoplay'] = $options['event_flag_autoplay'];\n\n // Collect the victory and defeat event flags\n $event_flags['victory'] = $options['event_flag_victory'];\n $event_flags['defeat'] = $options['event_flag_defeat'];\n\n // Collect the camera action flags if provided in the event options\n $event_flags['camera'] = array();\n $event_flags['camera']['action'] = $options['event_flag_camera_action'];\n $event_flags['camera']['reaction'] = $options['event_flag_camera_reaction'];\n $event_flags['camera']['side'] = $options['event_flag_camera_side'];\n $event_flags['camera']['focus'] = $options['event_flag_camera_focus'];\n $event_flags['camera']['depth'] = $options['event_flag_camera_depth'];\n $event_flags['camera']['offset'] = $options['event_flag_camera_offset'];\n if (!$event_flags['camera']['action'] && !$event_flags['camera']['reaction']){ $event_flags['camera'] = false; }\n\n // Otherwise, save this camera action for next time, if necessary\n if (!empty($event_flags['camera'])){\n $this->values['last_camera_action'] = $event_flags['camera'];\n }\n\n // If no camera action was provided, and we have backup settings, let's use those\n if (!$camera_action_provided\n && !empty($this->values['last_camera_action'])){\n //error_log('applying saved camera action');\n $event_flags['camera'] = $this->values['last_camera_action'];\n $event_flags['camera']['offset'] = 0;\n $this->values['last_camera_action'] = array();\n }\n\n // Collect the camera action flags if they've been queued up in the sound queue\n $event_flags['sounds'] = array();\n if (!empty($this->queue['sound_effects'])){\n do {\n $effect = array_shift($this->queue['sound_effects']);\n if (empty($effect['name'])){ continue; }\n $event_flags['sounds'][] = $effect;\n } while (count($this->queue['sound_effects']) > 0);\n }\n if (!empty($options['event_flag_sound_effects'])){\n foreach ($options['event_flag_sound_effects'] AS $key => $effect){\n if (empty($effect['name'])){ continue; }\n $event_flags['sounds'][] = $effect;\n }\n }\n if (empty($event_flags['sounds'])\n && !empty($eventinfo['event_header'])\n && !empty($eventinfo['event_body'])\n ){\n $event_flags['sounds'][] = array('name' => 'text-sound', 'volume' => 1.0);\n }\n if (empty($event_flags['sounds'])){ $event_flags['sounds'] = false; }\n\n // Compress all these flags into JSON so we can send them to the client\n $this_markup['flags'] = json_encode($event_flags);\n\n // Generate the console message markup\n $this_markup['console'] = $this->console_markup($eventinfo, $options);\n\n // Generate the canvas scene markup\n $this_markup['canvas'] = $this->canvas_markup($eventinfo, $options);\n\n // Generate the jSON encoded event data markup\n $this_markup['data'] = array();\n $this_markup['data']['this_battle'] = '';\n $this_markup['data']['this_field'] = '';\n $this_markup['data']['this_player'] = '';\n $this_markup['data']['this_robot'] = '';\n $this_markup['data']['target_player'] = '';\n $this_markup['data']['target_robot'] = '';\n $this_markup['data'] = json_encode($this_markup['data']);\n\n // Increment this battle's frames counter\n $this->counters['event_frames'] += 1;\n $this->update_session();\n\n // Return the generated event markup\n return $this_markup;\n\n }",
"function display() {\n\t\t$events = $this->events;\n\t\tif (!$events) return '';\n\t\t$olddate = '';\n\t\t$displaystring .= '<div class=\"gw-post\">';\n\n\t\tforeach($events as $event) {\n\t\t\t$start = $event['starttime'];\n\t\t\t// check for new dates\n\t\t\t$newdate = date('l, n/j/y', $start);\n\t\t\tif (strcmp($newdate, $olddate)) {\n\t\t\t\t// $newdate != $olddate\n\t\t\t\t$displaystring .= '<div class=\"gw-date-wrap\"><div class=\"gw-date\">' . $newdate . '</div></div>';\n\t\t\t\t$olddate = $newdate;\n\t\t\t}\n\t\t\tif ($event['isfeatured']) {\n\t\t\t $displaystring .= '<div class=\"gw-featured\">';\n\t\t\t}\n\t\t\tif ($event['post_link']) {\n\t\t\t $displaystring .= '<a href=\"'.$event['post_link'].'\">';\n\t\t\t}\n\t\t\t$displaystring .= '<div class=\"gw-event ' . $event['tag'] . '\">';\n\t\t\t$displaystring .= '<span class=\"gw-bullet\"> </span><div class=\"gw-time\">' . date('g:i a', $start) . '</div>';\n\t\t\t$displaystring .= '<div class=\"gw-title\">' . $event['title'];\n\t\t\tif ($event['location']) {\n\t\t\t\t$displaystring .= ' @ ' . $event['location'] . $this->displayMap($event['address']);\n\t\t\t}\n\t\t\t$displaystring .= '</div>'; //close .gw-title\n\t\t\t$displaystring .= '</div>'; // close .gw-event \n\t\t\tif ($event['post_link']) {\n\t\t\t $displaystring .= '</a>';\n\t\t\t}\n\t\t\tif ($event['isfeatured']) {\n\t\t\t $displaystring .= '</div>';\n\t\t\t}\n\t\t\t\n\n\t\t} // end foreach\n\t\t\n\t\t$displaystring .= '</div>'; // close .textwidget\n\t\treturn $displaystring;\n\t}",
"public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }",
"function theme_uom_event_presenters_in_event($variables) {\n\t$return_html = '';\n\t$presenters = $variables['presenters'];\n\n\t$items = array();\n\t$title = t('Presenters');\n\t$attributes = array('class' => array('uom-event-presenter'));\n $type = 'ul';\n\n\tif(is_array($presenters) && count($presenters) > 0) {\n\t\tforeach($presenters as $presenter) {\n\t\t\t$full_name = t('@title @first @last @post', array('@title' => $presenter->title, '@first' => $presenter->first_name, '@last' => $presenter->last_name, '@post' => $presenter->post_nominal));\n\t\t\t$link = $presenter->link;\n\t\t\t$data = l($full_name, $link);\n\n\t\t\t$items[] = array(\n\t\t\t\t'data' => $data,\n\t\t\t\t'class' => array('presenter'),\n\t\t\t);\n\t\t}\n\t\t\n\t\t$return_html = theme_item_list(array('items' => $items, 'title' => $title, 'type' => $type, 'attributes' => $attributes));\n\t}\n\telse {\n\t\t$return_html = '';\t\t\n\t}\n\n\treturn $return_html;\n}",
"function wp_print_community_events_markup()\n {\n }",
"function components_list(){\n\n\t\t?><li data-type=\"test\" title=\"Sample Title\"></li><?php\n\t}",
"function buildExcEvents($excevents) {\n\t\t$rendered\t= '';\n\t\tif(is_array($excevents) AND !$this->conf['hideExcEvents']) {\n\t\t\t$tempExc = $this->cObj->getSubpart($this->templateCode, '###EXCEVENT_VIEW###');\n\t\t\tforeach( $excevents as $event){\n\t\t\t\t$markerArray['###COLOR###'] = $event['color'] ? 'background: '.$event['color'].';': '';\n\t\t\t\t$markerArray['###EXC_TITLE###'] = $event['title'];\n\t\t\t\t$rendered .= $this->cObj->substituteMarkerArrayCached($tempExc, $markerArray);\n\t\t\t}\n\t\t}\n\t\treturn $rendered;\n\t}",
"function alpha_meta_box_add_to_events()\n{\n add_meta_box('alpha-beer-list', 'Beer List Properties', 'alpha_beer_list', 'ptf_events', 'side', 'low');\n}",
"function moduleContent()\t{\n\t\t$this->content .= $this->makeList();\n\t}",
"function display_list(){\n\t\t\t$this->load->model('admin_career_event_model');\n\t\t\t$this->gen_contents['modal_path'] \t= '/career_event/class_details';\n\t\t\t$this->gen_contents['current_date']\t= $_POST['datecurrent'];\n \n $chp_list = $this->config->item('chapter_list');\n\t\t\t$this->gen_contents['arr_list'] \t= $this->admin_career_event_model->dbGetEventListWithSearchUser($_POST,$chp_list);\n\t\t\t$this->load->view('user/career_event/display_list_event',$this->gen_contents);\n\t\t}",
"public function decorateContents()\n {\n $decoratedItems = array();\n\n foreach ($this->app['publishing.items'] as $item) {\n $this->app['publishing.active_item'] = $item;\n\n // filter the original item content before decorating it\n $event = new BaseEvent($this->app);\n $this->app->dispatch(Events::PRE_DECORATE, $event);\n\n // Do nothing to decorate the item\n\n $event = new BaseEvent($this->app);\n $this->app->dispatch(Events::POST_DECORATE, $event);\n\n // get again 'item' object because POST_DECORATE event can modify it\n $decoratedItems[] = $this->app['publishing.active_item'];\n }\n\n $this->app['publishing.items'] = $decoratedItems;\n }",
"public function get_timeline() {\r\n\t\t$events = $this->get_timeline_events();\r\n\t\t$class = null;\r\n\t\t$html = '<div class=\"timeline\">';\r\n\t\t\t$html .= '<a href=\"#\" class=\"timeline_spine\"></a>';\r\n\t\t\t\r\n\t\t\tforeach( $events as $date_group=>$timeline_events ) {\r\n\t\t\t\t$group_id = str_replace(' ', '_', $date_group);\r\n\t\t\t\t$html .= '<div class=\"section\" id=\"' . $group_id . '\">';\r\n\t\t\t\t\t$html .= '<div class=\"title\">';\r\n\t\t\t\t\t\t$html .= '<a href=\"#\">' . $date_group . '</a>';\r\n\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$html .= '<ol class=\"events\">';\r\n\t\t\t\t\t\tforeach( $timeline_events as $event ) {\r\n\t\t\t\t\t\t\tswitch( $event['source'] ) {\r\n\t\t\t\t\t\t\t\tcase 'wp' :\r\n\t\t\t\t\t\t\t\t\tif( get_post_meta( $event['id'], 'mf_timeline_featured', true ) ) {\r\n\t\t\t\t\t\t\t\t\t\t$excerpt_length = 700;\r\n\t\t\t\t\t\t\t\t\t\t$class = ' featured';\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t$excerpt_length = 300;\r\n\t\t\t\t\t\t\t\t\t\t$class = null;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$html .= '<li class=\"event ' . $event['source'] . $class . '\">';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_pointer\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_container\">';\r\n\t\t\t\t\t\t\t\t\t\t $html .= '<div class=\"event_title\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<h3><a href=\"' . get_permalink( $event['id'] ) . '\">' . $event['title'] . '</a></h3>';\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<span class=\"subtitle\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= $this->format_date( $event['date'] ); \r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '</span>';\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_content\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= apply_filters( 'the_content', $this->format_excerpt( $event['content'], 42, $event['excerpt'] ) );\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '<a class=\"moretag\" href=\"' . get_permalink( $event['id'] ) . '\">Read post</a></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t$html .= '</li>';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'twitter' :\r\n\t\t\t\t\t\t\t\t\t$html .= '<li class=\"event ' . $event['source'] . '\">';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_pointer\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_container\">';\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_title\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<img src=\"' . $event['author_image'] . '\" alt=\"' . $event['author'] . '\" width=\"50\" height=\"50\" class=\"profile_image\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<h3><a href=\"http://www.twitter.com/' . $event['author'] . '/\">@' . $event['author'] . '</a></h3>';\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<span class=\"subtitle\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= $this->format_date( $event['date'] );\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '</span>';\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_content\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= apply_filters( 'the_content', $this->format_text( $event['content'] ) );\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t$html .= '</li>';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'timeline_stories' :\r\n\t\t\t\t\t\t\t\t\t$class = ( $event['featured'] == 1 ) ? ' featured' : null;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$html .= '<li class=\"event ' . $event['source'] . $class . '\">';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_pointer\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_container\">';\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_title\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<h3>' . stripslashes( $event['title'] ) . '</h3>';\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '<span class=\"subtitle\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= $this->format_date( $event['date'] );\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= '</span>';\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '<div class=\"event_content\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= apply_filters( 'the_content', $this->format_text( stripslashes( $event['content'] ) ) );\r\n\t\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\t\t\t\t$html .= '</li>';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$html .= '</ol>';\r\n\t\t\t\t\t\r\n\t\t\t\t$html .= '</div>';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= $this->get_timeline_nav( array_keys( $events ) );\r\n\t\t$html .= '</div>';\r\n\t\t\t\r\n\t\treturn $html;\r\n\t}",
"function render($events){\n\t\t// in the weekly event view\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\t\t\t$return_val=$return_val.\"<a href=\\\"event_display_detail.php?event_id=\";\n\t\t\t$return_val=$return_val.($next_event->get_id());\n\t\t\t$return_val=$return_val.\"&day=\".$next_event->get_start_day();\n\t\t\t$return_val.=\"&month=\".$next_event->get_start_month();\n\t\t\t$return_val.=\"&year=\".$next_event->get_start_year();\n\t\t\t$return_val.=\"\\\" class=\\\"eventTitle\\\">\";\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t$return_val=$return_val.\"</a><br />\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"<br />\";\n\t\t\tif (strlen(trim($next_event->get_event_type_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_event_type_name()).\"<br />\";\n\t\t\t}\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"<br />\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"<br />\";\n\t\t\t$i=$i+1;\n\t\t}\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \" \";\n\t\t}\n\t\treturn $return_val;\n\t}",
"function mkEventContent($var){\n$hasContent=$this->hasEventContent($var);\n$out=\"\";\n\tif ($hasContent){\n\t\tfor ($x=0;$x<count($hasContent);$x++){\n\t\t\tforeach($hasContent[$x] as $eventContentid => $eventContentData){\n\t\t\t\tforeach($eventContentData as $eventContentUrl => $eventContent){\n\t\t\t\t\t$out.=\"<table class=\\\"\".$eventContentid.\"\\\">\";\n\t\t\t\t\tif (is_string($eventContent)){\n\t\t\t\t\t\tif (is_int($eventContentUrl)) $out.=\"<tr><td>\".$eventContent.\"</td></tr></table>\";\n\t\t\t\t\t\telse $out.=\"<tr><td><a href=\\\"\".$eventContentUrl.\"\\\">\".$eventContent.\"</a></td></tr></table>\";\n\t\t\t\t\t}\n\t\t\t\t\telseif (is_array($eventContent)){\n\t\t\t\t\t\tforeach($eventContent as $arrayContent){\n\t\t\t\t\t\t\tif (is_int($eventContentUrl)) $out.=\"<tr><td>\".$arrayContent.\"</td></tr>\";\n\t\t\t\t\t\t\telse $out.=\"<tr><td><a href=\\\"\".$eventContentUrl.\"\\\">\".$arrayContent.\"</a></td></tr>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t$out.=\"</table>\";\n\t\t\t\t\t}\n\t\t\t\t\telse $out=\"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\nreturn $out;\n}",
"function jes_theme_template_standart() {\r\nglobal $bp;\r\n/**************************************/\r\n/* Standart Template for Event Loop */\r\n/* */\r\n/* Base Template\t\t\t\t\t */\r\n/**************************************/\r\n?>\r\n<?php\r\n\t$jes_adata = get_site_option('jes_events' );\r\n\t$_eventstatus = eventstatus(jes_bp_get_event_edtsd(),jes_bp_get_event_edtsth(),jes_bp_get_event_edtstm(),jes_bp_get_event_edted(),jes_bp_get_event_edteth(),jes_bp_get_event_edtetm());\r\n?>\r\n<li>\r\n\t<div class=\"item-avatar\" id=\"jes-avatar\">\r\n\t\t<?php if ($jes_adata['jes_events_show_avatar_directory_size'] > 50 ) { ?>\r\n\t\t<a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_avatar( 'type=full&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?></a>\r\n\t\t<?php } else { ?>\r\n\t\t<a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_avatar( 'type=thumb&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?></a>\r\n\t\t<?php } ?>\r\n\t</div>\r\n\r\n\t<div class=\"item\" style=\"width:80%;\" id=\"jes-templ-item-<?php jes_bp_event_id() ?>\">\r\n\t\t<div class=\"item-title\" id=\"jes-title\"><a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_name() ?></a></div>\t\t\t\r\n\t\t\t<div class=\"item-meta\" id=\"jes-template-meta-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t<em><?php echo $_eventstatus; ?></em> , <em><?php jes_bp_event_type() ?></em>\r\n\t\t\t\t<div class=\"item-desc\" id=\"jes-timedate-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t\t<strong>Starts:</strong> <span class=\"meta\"><?php jes_bp_event_edtsd() ?>, \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t// JLL_MOD - conert military time to 12 hour\r\n\t\t\t\t$shour = jes_bp_get_event_edtsth();\r\n\t\t\t\tif ( $shour == '00' ) { \r\n\t\t\t\t\t$shour = '12';\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t} elseif ( $shour > 12 ) { \r\n\t\t\t\t\t$shour = $shour - 12;\r\n\t\t\t\t\t$stime = ' pm';\r\n\t\t\t\t} elseif ( $shour < 10 ) { \r\n\t\t\t\t\t$shour = substr( $shour, -1 );\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t}\r\n\t\t\t\t$ehour = jes_bp_get_event_edteth();\r\n\t\t\t\tif ( $ehour == '00' ) { \r\n\t\t\t\t\t$ehour = '12';\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t} elseif ( $ehour > 12 ) { \r\n\t\t\t\t\t$ehour = $ehour - 12;\r\n\t\t\t\t\t$etime = ' pm';\r\n\t\t\t\t} elseif ( $ehour < 10 ) { \r\n\t\t\t\t\t$ehour = substr( $ehour, -1 );\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t}\r\n\t\t\t\t?>\t\t\t\r\n\r\n\t\t\t\t\t<?php echo $shour; ?>:<?php jes_bp_event_edtstm() ?><?php echo $stime; ?></span>\r\n <?php if ( jes_bp_get_event_edtsd() == jes_bp_get_event_edted() && jes_bp_get_event_edtsth() == jes_bp_get_event_edteth() && jes_bp_get_event_edtstm() == jes_bp_get_event_edtetm() ) {} else { ?>\r\n <strong>Ends:</strong> <span><?php jes_bp_event_edted() ?>, <?php echo $ehour; ?>:<?php jes_bp_event_edtetm() ?><?php echo $etime; ?></span><?php }; ?>\r\n\t\t\t\t</div>\r\n\t\t\t<div class=\"item-desc\" id=\"jes-desc-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t<span><strong>Where: </strong> <?php // JLL_MOD - removed ?><?php if ( jes_bp_event_is_visible() ) { ?><?php jes_bp_event_placedaddress() ?> <?php } ?></span><br />\r\n\t\t\t</div>\r\n\t\t<?php if ($jes_adata['jes_events_style'] == 'Standart') { ?>\r\n\t\t\t<?php // JLL_MOD - Removed text ?><?php jes_bp_event_description_excerpt() ?>\r\n\t\t<?php } else { ?>\r\n\t\t\t<?php jes_bp_event_description() ?>\r\n\t\t<?php } ?>\r\n\t\t\t</div>\t\t\t\t\r\n<?php do_action( 'bp_directory_events_item' ) ?>\r\n\t\t</div>\r\n\t\t<div class=\"action\" id=\"jes-button\">\r\n\t\t\t<?php \r\n\t\t\t\tif (!strpos($_eventstatus,__('Past event','jet-event-system')))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbp_event_join_button();\r\n\t\t\t\t\t}\r\n\t\t\t?>\r\n\t\t\t\t<div class=\"meta\" id=\"jes-approval-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t\t<?php if ( $shiftcan ) \r\n\t\t\t\t\t\t\t{ ?>\r\n\t\t\t\t\t\t\t\t<span class=\"meta\"><em><?php _e('Event requires approval!','jet-event-system'); ?></em></span>\r\n\t\t\t\t\t<?php }\t?>\r\n\t\t\t\t\t<?php // JLL_MOD - removed event classification ?>\r\n\t\t\t\t\t<p><?php jes_bp_event_member_count() ?></p>\r\n\t\t\t\t\t<span class=\"activity\"><?php printf( __( 'Last activity:<br /> %s ago', 'jet-event-system' ), jes_bp_get_event_last_active() ) ?></span>\r\n\t\t\t\t</div>\r\n<?php do_action( 'bp_directory_events_actions' ) ?>\r\n\t\t\t</div>\r\n\t\t<div class=\"clear\"></div>\r\n</li>\r\n<?php\r\n// End Standart Template\r\n}",
"function main_content()\n{\n?>\n <h2>Events</h2>\n\n <div class=\"box\"><b>Where and When</b><br />\n Events take place in Room 86-01 of Portland State's \n <a href=\"http://www.fap.pdx.edu/floorplans/detail2.php?buildingID=12\">Fourth Avenue Building (FAB)</a>\n from 4:30pm to 5:30pm, unless circumstances dictate otherwise.</div>\n<?php\n\n// Are you looking for the events?\n/* To add the functionality the events section now enjoys, unfortunatly I\n * had to break the normal design style and add all the event handling to\n * the body.php script, with the actual events information stored in the \n * events_list.php script. \n * \n * events are stored in events_list.php for two reasons; so that the\n * sidebar can access them without accessing this page every time, and\n * so there is one file that is purely events information. In the future,\n * if we ever use a database to store events information, the \n * events_list.php script is the only script that would need to change.\n * \n * I would have gone with just using SQL, but it's easier to show new\n * people how to edit a text file than it is to create, maintain, and use\n * a secure form or other interface for SQL. Anyone can edit a text file,\n * but not everyone can use SQL.\n *\n * So why not call events_list.php from here and use this page to display\n * it? honestly I couldn't figure out how to. I tried and tried, but \n * aparently my understanding of php is not good enough to get it to work.\n * It seems to have something to do with how the main_content function is\n * actually run in body.php causing some scope issues. Anyways I suffered\n * enough trying to make it work that way. Give it a try if you feel like\n * it, I'm done struggling with it for now.\n *\n*/\n\n\n// Google calendar, which is now redundant.\n/*\n <!--<iframe src=\"https://www.google.com/calendar/embed?height=400&wkst=1&bgcolor=%23FFFFFF&src=psuacm%40cs.pdx.edu&color=%23B1440E&ctz=America%2FLos_Angeles\" style=\" border-width:0 \" width=\"600\" height=\"400\" frameborder=\"0\" scrolling=\"no\"></iframe>\n\n <p>\n Sign up for the\n <a href=\"https://mailhost.cecs.pdx.edu/cgi-bin/mailman/listinfo/acm-members\">ACM Mailing List</a>\n to get messages about upcoming events.\n </p>-->\n*/\n}",
"function tbt_ws_event(){\r\n\r\n\t$html_code_s_template='\r\n\t\t\t<div class=\"ws_ev\">\r\n\t\t\t\t<div class=\"ws_ev_cl\">\r\n\t\t\t\t\t[calendar]\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"ws_ev_tl1\">\r\n\t\t\t\t\t[ev_tl_1]\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"ws_ev_tl2\">\r\n\t\t\t\t\t[ev_tl_2]\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"ws_ev_soc\">\r\n\t\t\t\t\t[social]\r\n\t\t\t\t</div>\r\n\t\t\t</div>';\r\n\t$total_events=4;\r\n\t$event_number=1;\r\n\t// query db\r\n\t$s_event = [];\r\n\t$s_event['calendar']=\"dddd\";\r\n\t$s_event['ev_tl_1']=\"GO LIVE EVENT!!\";\r\n\t$s_event['ev_tl_2']=\"platform presentation\";\r\n\t$s_event['social']='\r\n\t\t\t\t\t\t<a href=\"#\"><img src=\"../_web_st/templates/000/imgs/face.png\" /></a>\r\n\t\t\t\t\t\t<a href=\"#\"><img src=\"../_web_st/templates/000/imgs/google.png\" /></a>\r\n\t\t\t\t\t\t<a href=\"#\"><img src=\"../_web_st/templates/000/imgs/inst.png\" /></a>\r\n\t\t\t\t\t\t<a href=\"#\"><img src=\"../_web_st/templates/000/imgs/pin.png\" /></a>\r\n\t\t\t\t\t\t<a href=\"#\"><img src=\"../_web_st/templates/000/imgs/twitter.png\" /></a>\r\n\t\t\t\t\t';\r\n\r\n\r\n\twhile($event_number<=$total_events){\r\n\t\t// insert data\r\n\t\t$html_code_s=$html_code_s_template;\r\n\t \tforeach ($s_event as $key => $value) {\r\n\t\t\t# code...\r\n\t\t\t$html_code_s=str_replace( \"[\".$key.\"]\",$value, $html_code_s);\r\n\t\t\t\r\n\t\t} \r\n\t\t$html_code=$html_code_s.$html_code;\r\n\t\t$event_number++;\r\n\t\t}\r\n\treturn '<div id=\"event\">'.$html_code.'</div>';\r\n\r\n}",
"protected function _getRenderedContent()\n {\n $result = '';\n $objectName = $this->getName();\n\n /**\n * Adding auto submit Code\n */\n if ($this->autoSubmit)\n {\n $this->onChange = 'javascript: document.getElementById(\\''.$objectName.'_event\\').value=\\'on\\'; this.form.submit();';\n $result .= '<input type=\"hidden\" name=\"'.$objectName.'_event\" id=\"'.$objectName.'_event\" />'.\"\\n\";\n }\n\n $result .= '<select name=\"'.$objectName.'\" '.$this->_getAttributesString().'>';\n foreach ($this->_options as $itemUID => $itemLabel)\n {\n if ((strval($itemUID) != strval($this->_selectedIndex)))\n {\n $result .= '<option value=\"'.$itemUID.'\">'.$itemLabel.'</option>';\n }\n else\n {\n $result .= '<option value=\"'.$itemUID.'\" selected>'.$itemLabel.'</option>';\n }\n }\n $result .= '</select>';\n\n return $result;\n }",
"function ding_event_similar_events_content_type_render($subtype, $conf, $panel_args, $context) {\n $block = new stdClass();\n $node = isset($context->data) ? drupal_clone($context->data) : NULL;\n $block->content = theme('ding_event_similar_events', ding_event_get_similar($node));\n return $block;\n}",
"private function add_events()\r\n {\r\n $events = $this->events;\r\n foreach ($events as $time => $items)\r\n {\r\n $column = date('H', $time) / $this->hour_step + 1;\r\n foreach ($items as $item)\r\n {\r\n $content = $item['content'];\r\n $row = $item['index'] + 1;\r\n \r\n $cell_content = $this->getCellContents($row, $column);\r\n $cell_content .= $content;\r\n $this->setCellContents($row, $column, $cell_content);\r\n }\r\n }\r\n \r\n }",
"private static function StructureList ()\n {\n return array (\n \"a\" => \"<a ###>$$$</a>\",\n \"button\" => \"<button ###>$$$</button>\"\n );\n }",
"function displayLatestEvents()\n\t{\n\t\t$viewname = $this->getTheme();\n\n\t\t$cfg = JEVConfig::getInstance();\n\n\t\t// override global start now setting so that timelimit plugin can use it!\n\t\t$compparams = ComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t$startnow = $compparams->get(\"startnow\", 0);\n\t\t$compparams->set(\"startnow\", $this->modparams->get(\"startnow\", 0));\n\t\t$this->getLatestEventsData();\n\t\t$compparams->set(\"startnow\", $startnow);\n\n\t\t$content = \"\";\n\n\t\t$k = 0;\n\t\tif (isset($this->eventsByRelDay) && count($this->eventsByRelDay))\n\t\t{\n\t\t\t$content .= $this->getModuleHeader('<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">');\n\n\t\t\t// Now to display these events, we just start at the smallest index of the $this->eventsByRelDay array\n\t\t\t// and work our way up.\n\n\t\t\t$firstTime = true;\n\n\t\t\t// initialize name of com_jevents module and task defined to view\n\t\t\t// event detail. Note that these could change in future com_event\n\t\t\t// component revisions!! Note that the '$this->itemId' can be left out in\n\t\t\t// the link parameters for event details below since the event.php\n\t\t\t// component handler will fetch its own id from the db menu table\n\t\t\t// anyways as far as I understand it.\n\n\t\t\t$this->processFormatString();\n\n\t\t\tforeach ($this->eventsByRelDay as $relDay => $daysEvents)\n\t\t\t{\n\n\t\t\t\treset($daysEvents);\n\n\t\t\t\t// get all of the events for this day\n\t\t\t\tforeach ($daysEvents as $dayEvent)\n\t\t\t\t{\n\n\t\t\t\t\tif ($this->processTemplate($content, $dayEvent))\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$eventcontent = \"\";\n\n\t\t\t\t\t// generate output according custom string\n\t\t\t\t\tforeach ($this->splitCustomFormat as $condtoken)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (isset($condtoken['cond']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($condtoken['cond'] == 'a' && !$dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!a' && $dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'e' && !($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!e' && ($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!m' && $dayEvent->getUnixStartDate() != $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'm' && $dayEvent->getUnixStartDate() == $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($condtoken['data'] as $token)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($match);\n\t\t\t\t\t\t\tunset($dateParm);\n\t\t\t\t\t\t\t$dateParm = \"\";\n\t\t\t\t\t\t\t$match = '';\n\t\t\t\t\t\t\tif (is_array($token))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token['keyword'];\n\t\t\t\t\t\t\t\t$dateParm = isset($token['dateParm']) ? trim($token['dateParm']) : \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (strpos($token, '${') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$eventcontent .= $token;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->processMatch($eventcontent, $match, $dayEvent, $dateParm, $relDay);\n\t\t\t\t\t\t} // end of foreach\n\t\t\t\t\t} // end of foreach\n\n\t\t\t\t\tif ($firstTime)\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest_first\">%s' . \"</td></tr>\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest\">%s' . \"</td></tr>\\n\";\n\n\t\t\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : $eventrow;\n\t\t\t\t\t$content .= str_replace(\"%s\", $eventcontent, $templaterow);\n\n\t\t\t\t\t$firstTime = false;\n\t\t\t\t} // end of foreach\n\t\t\t\t$k++;\n\t\t\t\t$k %= 2;\n\t\t\t} // end of foreach\n\t\t\t$content .= $this->getModuleFooter(\"</table>\\n\");\n\t\t}\n\t\telse if ($this->modparams->get(\"modlatest_NoEvents\", 1))\n\t\t{\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatetop\") || $this->modparams->get(\"modlatest_templatetop\") ? $this->modparams->get(\"modlatest_templatetop\") : '<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">';\n\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : '<tr><td class=\"mod_events_latest_noevents\">%s</td></tr>' . \"\\n\";\n\t\t\t$content .= str_replace(\"%s\", Text::_('JEV_NO_EVENTS'), $templaterow);\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatebottom\") ? $this->modparams->get(\"modlatest_templatebottom\") : \"</table>\\n\";\n\t\t}\n\n\t\t$callink_HTML = '<div class=\"mod_events_latest_callink\">'\n\t\t\t. $this->getCalendarLink()\n\t\t\t. '</div>';\n\n\t\tif ($this->linkToCal == 1)\n\t\t\t$content = $callink_HTML . $content;\n\t\tif ($this->linkToCal == 2)\n\t\t\t$content .= $callink_HTML;\n\n\t\tif ($this->displayRSS)\n\t\t{\n\t\t\t$rssimg = Uri::root() . \"media/system/images/livemarks.png\";\n\t\t\t$callink_HTML = '<div class=\"mod_events_latest_rsslink\">'\n\t\t\t\t. '<a href=\"' . $this->rsslink . '\" title=\"' . Text::_(\"RSS_FEED\") . '\" target=\"_blank\">'\n\t\t\t\t. '<img src=\"' . $rssimg . '\" alt=\"' . Text::_(\"RSS_FEED\") . '\" />'\n\t\t\t\t. Text::_(\"SUBSCRIBE_TO_RSS_FEED\")\n\t\t\t\t. '</a>'\n\t\t\t\t. '</div>';\n\t\t\t$content .= $callink_HTML;\n\t\t}\n\n\t\tif ($this->modparams->get(\"contentplugins\", 0))\n\t\t{\n\t\t\t$eventdata = new stdClass();\n\t\t\t$eventdata->text = $content;\n\t\t\tFactory::getApplication()->triggerEvent('onContentPrepare', array('com_jevents', &$eventdata, &$this->modparams, 0));\n\t\t\t$content = $eventdata->text;\n\t\t}\n\n\t\treturn $content;\n\n\t}",
"function listEventInfo() {\n\t\t$query = \"SELECT e_description, c_name, tag_name, start_datetime, end_datetime, capacity, v.name AS vname, address,o.name AS oname, v.address, v.city, v.state, v.postal_code \n\t\tFROM yam14.F_event e, yam14.F_venue v, yam14.F_category c, yam14.F_topic t, yam14.F_organizer o\n\t\tWHERE e.venue_id = v.v_id \n\t\tAND c.c_id = e.c_id \n\t\tAND t.tag_id = e.tag_id \n\t\tAND o.o_id = e.organizer_id\n\t\tAND e.e_id = $this->eid ;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->category = $row['c_name'];\n\t\t\t$this->tag = $row['tag_name'];\n\t\t\t$this->description = $row['e_description'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t$this->capacity = $row['capacity'];\n\t\t\t$this->venue = $row['vname'];\n\t\t\t$this->address = $row['address'] . \", \" . $row['city'] . \", \" . $row['state'] . \" \" . $row['postal_code'];\n\t\t\t$this->organizer = $row['oname'];\n\t\t\techo \"<hr />\";\n\t\t\techo \"<div class=\\\"panel panel-default\\\">\";\n\t\t\techo \t\"<div class=\\\"panel-heading\\\">\";\n\t\t\techo \t\"<h3 class=\\\"panel-title\\\">Event Information</h3>\";\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"<div class=\\\"panel-body\\\">\";\n\t\t\techo \"<p><b>Description: </b>$this->description</p>\";\n\t\t\techo \t\"<p><b>Category: </b>$this->category</p>\";\n\t\t\techo \t\"<p><b>Topic: </b>$this->tag</p>\";\n\t\t\techo \t\"<p><b>Start Date: </b>$this->startdate</p>\";\n\t\t\techo \t\"<p><b>Start Time: </b>$this->starttime</p>\";\n\t\t\techo \t\"<p><b>End Date: </b>$this->enddate</p>\";\n\t\t\techo \t\"<p><b>End Time: </b>$this->endtime</p>\";\n\t\t\techo \t\"<p><b>Capacity: </b>$this->capacity</p>\";\n\t\t\techo \t\"<p><b>Organizer: </b>$this->organizer</p>\";\n\t\t\techo \t\"<p><b>Location: </b>$this->venue</p>\";\n\t\t\techo \t\"<p><b>Address: </b>$this->address</p>\";\n\t\t\t\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"</div>\";\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t}",
"function theme_uom_event_booking($variables) {\n $booking = $variables['booking'];\n $items = array();\n\n $title = t('Booking');\n $attributes = array('class' => array('uom-event-booking'));\n $type = 'ul';\n\n if (!empty($booking->email)) {\n $items[] = array(\n 'data' => l($booking->email, 'mailto:' . $booking->email),\n 'class' => array('email'),\n );\n }\n if (!empty($booking->phone)) {\n $items[] = array(\n 'data' => (module_exists('unimelb_formatters')) ? unimelb_formatters_field_formatter_unimelb_html5_phone_link(array('safe_value' => $booking->phone)) : $booking->phone,\n 'class' => array('phone'),\n );\n }\n if (!empty($booking->url)) {\n $items[] = array(\n 'data' => l($booking->url, $booking->url),\n 'class' => array('url'),\n );\n }\n\n return (empty($items)) ? '' : theme_item_list(array('items' => $items, 'title' => $title, 'type' => $type, 'attributes' => $attributes));\n}",
"function listcontent_open() {\n $this->doc .= '<div class=\"li\">';\n }",
"function cs_event_description() {\n\n\t$date = '<div class=\"one-third first\"><div class=\"date\">\n\t<span class=\"icon\">' . genesis_get_option( 'event_date_icon', 'social-coup' ) . '</span>\n\t<span class=\"title\">' . genesis_get_option( 'event_date_title', 'social-coup' ) . '</span>\n\t<span class=\"subtitle\">' . genesis_get_option( 'event_date_subtitle', 'social-coup' ) . '</span>\n\t</div></div>';\n\t\n\t$location = '<div class=\"one-third\"><div class=\"location\">\n\t<span class=\"icon\"></span>';\n\t$location_url = esc_url( genesis_get_option( 'event_location_url', 'social-coup' ) );\n\tif( !empty( $location_url ) )\n\t\t$location .= '<a class=\"title\" href=\"' . $location_url . '\">' . genesis_get_option( 'event_location_title', 'social-coup' ) . '</a>';\n\telse\n\t\t$location .= '<span class=\"title\">' . genesis_get_option( 'event_location_title', 'social-coup' ) . '</span>';\n\t$location .= '\n\t<span class=\"subtitle\">' . genesis_get_option( 'event_location_subtitle', 'social-coup' ) . '</span>\n\t</div></div>';\n\t\n\t$register = '<div class=\"one-third\"><a class=\"register\" href=\"' . esc_url( genesis_get_option( 'event_register_link', 'social-coup' ) ) . '\">\n\t<span class=\"subtitle\">' . genesis_get_option( 'event_register_subtitle', 'social-coup' ) . '</span>\n\t<span class=\"title\">' . genesis_get_option( 'event_register_title', 'social-coup' ) . '</span>\n\t</a></div><div class=\"clearfix\"></div>';\n\t\n\n\t$output = sprintf( '<div id=\"event-information\">%2$s%1$s%3$s</div>', $date . $location . $register, genesis_structural_wrap( 'event-information', 'open', 0 ), genesis_structural_wrap( 'event-information', 'close', 0 ) );\n\t\n\techo $output;\n\n}",
"public function output() {\n\t\treturn array_merge(\n\t\t\tarray(\"<ul data-divider-theme='b' id='list_{$this->options['id']}' \".($this->options['inset']?'data-inset=\"true\" ':'').($this->options['actions']?\"data-split-icon='{$this->options['icon']}' data-split-theme='a'\":\"\").\" data-role='listview'>\"),\n\t\t\t$this->items,\n\t\t\tarray(\"</ul>\"));\n\t}",
"function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}",
"function insert_events( $events ){\n\t// Informationen zu den Events holen\n\t$results = eventoni_fetch('',false,$events);\n\n\t// Falls keine Informationen zu Events gefunden, aus Methode rausspringen\n\tif( $results['total'] <= 0 )\n\t{\n\t\treturn;\n\t}\n\n\t// HTML Code erstellen\n\t$result = '';\n\t$result.= '<div class=\"events-container\">';\n\t$result.= '<img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/logo.png\" />';\n\n\t// Jedes Event durchlaufen\n\tforeach($results['xml'] as $event)\n\t{\n\t\t// Berechnung der Zeitangabe und Tageszeit als Wort\n\t\t$datetime = strtotime($event->start_date.' '.$event->start_time);\n\t\t$hours = getdate($datetime);\n\t\t$hour = $hours['hours'];\n\t\t$tageszeit = '';\n\t\tif( $hour < 6 ){\n\t\t\t$tageszeit = 'nachts';\n\t\t} else if( $hour < 12 ){\n\t\t\t$tageszeit = 'morgens';\n\t\t} else if( $hour < 14 ){\n\t\t\t$tageszeit = 'mittags';\n\t\t} else if( $hour < 18 ){\n\t\t\t$tageszeit = 'nachmittags';\n\t\t} else if( $hour < 22 ){\n\t\t\t$tageszeit = 'abends';\n\t\t} else {\n\t\t\t$tageszeit = 'nachts';\n\t\t}\n\t\t$result.= ' <div class=\"event-item\">';\n\t\t$result.= '<a class=\"event-item-link\" href=\"'.$event->permalink.'\">';\n\n\t\t// Falls kein Vorschaubild vorhanden, nehme Standardbild\n\t\tif(isset($event->media_list->media->thumbnail_url)) {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"'.$event->media_list->media->thumbnail_url.'\"/>';\n\t\t} else {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"http://static.eventoni.com/images/image-blank.png\"/>';\n\t\t}\n\t\t$result.= '</a>';\n\t\t$result.= '\t <div class=\"event-item-content\">';\n\t\t$result.= '\t\t<div class=\"event-item-content-date\">'.date( \"d.m.Y\", $datetime ).', '.date( \"H:i \\U\\h\\\\r\", $datetime ).'</div>';\n\t\t$result.= '\t\t<div class=\"event-item-content-city\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/my_location.png\"/> '.$event->location->city.'</div>';\n\t\t$result.= '\t </div>';\n\t\t$result.= '\t <div class=\"event-item-content-name\"><b><a class=\"event-item-link\" href=\"'.$event->permalink.'\">'.$event->title.'</a></b></div>';\n\t\t$result.= '<div style=\"float:right\"><a class=\"facebook_link\" href=\"http://www.facebook.com/sharer.php?u='.$event->permalink.'&t=Dieses Event musst Du gesehen haben: \" target=\"_blank\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/facebook.png\" /></a></div>';\n\t\t$result.= '<div style=\"float:right\"><a class=\"twitter_link\" href=\"http://twitter.com/home?status=Dieses Event musst Du gesehen haben: '.$event->permalink.'\" target=\"_blank\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/twitter.png\" /></a></div>';\n\t\t$result.= ' </div>';\n\n\t}\n\t$result.= '</div>';\n\n\t// HTML code zurückgeben\n\treturn $result;\n}",
"public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}",
"function obj_cx_events_list_section( $events, $bottom_banner, $pagination, $event_list_deets = null, $section_classes = null, $bg_shapes = null ) {\n\n\t$sec_meta = decide_section_meta( 'event-list-section', $section_classes, $event_list_deets, $bg_shapes );\n\n\tif ( ! empty( $event_list_deets ) ) {\n\t\tdo_section_top( $sec_meta );\n\t\tobj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets );\n\t\tdo_section_bottom( $sec_meta );\n\t}\n}",
"function studeon_tribe_events_list_sidebars($list=array()) {\n\t\t$list['tribe_events_widgets'] = array(\n\t\t\t\t\t\t\t\t\t\t\t'name' => esc_html__('Tribe Events Widgets', 'studeon'),\n\t\t\t\t\t\t\t\t\t\t\t'description' => esc_html__('Widgets to be shown on the Tribe Events pages', 'studeon')\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\treturn $list;\n\t}",
"function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }",
"public function buildListTemplate()\n {\n $this->addListColumn(\n SharpListTemplateColumnConfig::create(\"titre\")\n ->setSize(3)\n ->setHeading(\"Titre\")\n );\n\n $this->addListColumn(\n SharpListTemplateColumnConfig::create(\"soustitre\")\n ->setSize(3)\n ->setHeading(\"Sous-titre\")\n );\n }",
"protected function _content_template() { ?>\r\n <# if ( settings.list.length ) { #>\r\n <div class=\"DSMCA__slide swiper-container\">\r\n <div class=\"swiper-wrapper\">\r\n <# _.each( settings.list, function( item ) { #>\t\r\n <div class=\"DSMCA__item_slide swiper-slide\">\r\n <img class=\"DSMCA__item-image\" src=\" {{ item.imagen.url }} \">\r\n <h5 class=\"DSMCA__item-title\"> {{{ item.titulo }}} </h5> \r\n </div>\r\n <# }); #>\t\r\n </div>\r\n <div class=\"swiper-button-prev\"></div>\r\n <div class=\"swiper-button-next\"></div>\r\n </div>\r\n <# } #>\r\n <?php\r\n }",
"public function buildDayList($date){\n\t\t$events = $this->getDayEvents($date);\n\t\t$count = 0;\n\t\t\n\t\tob_start();\n\t\tif(count($events) > 0){\n\t\t\tforeach($events as $key => $event){\t\t\t\n\t\t\t\t$recurringDays = $event->getRecurringDays();\n\t\t\t\t\t\t\n\t\t\t\t$dayOfWeek = date_create($date);\n\t\t\t\t$dayOfWeek = strtolower(date_format($dayOfWeek, \"l\"));\n\t\t\t\t//echo $dayOfWeek;\n\n\t\t\t\tif(count($recurringDays)){\n\t\t\t\t\tif(in_array($dayOfWeek, $recurringDays)){\n\t\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\t\techo '<hr />';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\techo '<hr />';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}",
"function submitted_events_create_about_page() {\n\techo '\n\t<div class=\"wrap\">\n\t\t<h2>How to use the Submitted Events plugin</h2>\n\t\t<p>Plugin created by Graham S. Horn ([email protected]) in November 2016.</p>\n\t\t<p>(Optional: If you click on <strong>Submitted Events</strong> you can see how many pending submissions there are.)</p>\n\t\t<p>Click on <strong>Auto Generate</strong> and Events will be automatically added for all pending submissions. These will have <code>draft</code> status. When you have finished editing the event you should click on the <strong>publish</strong> button to make the event visible (Previewing your changes is a good idea). You may want to switch to the visual editor if the generated HTML is hard to read.</p>\n\t\t<p>This plugin was written specifically for the Brunel <strong>Walk Submit Form</strong> in the Form Maker plugin (form version as of 5 November 2016); if this form is changed in any way then this plugin is likely to break. Contact the author for support.</p>\n\t</div>\t\n\t';\n}",
"function showEventList($groupId, $title) {\n\t\n\t//read config file for this portlet\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/event_list.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$showSummary = $config->readValue('displaySummary');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//create user groups validation object\n\t$userGroup = new CategoryUserGroupValidator();\n\t$excludeCategories = $userGroup->viewCategoryExclusionList('events');\n\t\n\t$return .= \"\t\t\t\t<div id=\\\"event_list\\\">\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\">$title</div>\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t$return .= \"\t\t\t\t\t\t<div id=\\\"upcoming_events_container\\\">\\n\";\n\t\n\t$todaysDate = getdate();\n\t\n\t$month = $todaysDate['mon'];\n\t$day = $todaysDate['mday'];\n\t$year = $todaysDate['year'];\n\t\n\t$getDate = $todaysDate['year'] . \"-\" . $todaysDate['mon'] . \"-\" . $todaysDate['mday'] . \" 00:00:00\";\n\t\n\t$s = 0;\n\t\n\t$result = mysql_query(\"SELECT events.id FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id\");\n\t$totalRows = mysql_num_rows($result);\n\t\n\t//if there's nothing to display, just exit (remove this test to display \"no events currently scheduled\" message)\n\tif ($totalRows == 0) {\n\t\t\n\t\treturn;\n\t\t\n\t}\n\t\n\t$showTotalPages = ceil($totalRows / $maxDisplay);\n\n\tif ($totalRows > 0) {\n\n\t\t$showCurrentPage = floor($s / $maxDisplay) + 1;\n\n\t} else {\n\n\t\t$showCurrentPage = 0;\n\n\t}\n\t\n\t$result = mysql_query(\"SELECT events.id, events.title, events.summary, events.summaryImage, DATE_FORMAT(startDate, '%M %d, %Y %h:%i %p') AS newStartDate, DATE_FORMAT(expireDate, '%M %d, %Y %h:%i %p') AS newExpireDate FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id ORDER BY startDate ASC, title ASC LIMIT $maxDisplay\");\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count > 0) {\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t$x++;\n\t\t\t\n\t\t\tif ($x < $count) {\n\t\t\t\t\n\t\t\t\t$style = \" event_item_row_separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$style = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$title = htmlentities($row->title);\n\t\t\t\n\t\t\tif (trim($row->summaryImage) != \"\") {\n\t\t\t\t\n\t\t\t\t$image = \"\t\t\t\t\t\t\t<div class=\\\"summary_image\\\">\\n<a href=\\\"/events/id/$row->id\\\"><img src=\\\"/file.php?load=$row->summaryImage&w=$w&h=$h\\\"></a></div>\\n\";\n\t\t\t\t$imageOffsetClass = \" image_offset\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$image = \"\";\n\t\t\t\t$imageOffsetClass = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t<div class=\\\"event_item$style\\\">\\n\";\n\t\t\t$return .= \"$image\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"details_container$imageOffsetClass\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<div class=\\\"title\\\"><a href=\\\"/events/id/$row->id\\\">$title</a></div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t\t<tr><td class=\\\"start_date\\\">$row->newStartDate</td></tr><tr><td class=\\\"end_date\\\">$row->newExpireDate</td></tr>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t</table>\\n\";\n\t\t\t\n\t\t\tif ($showSummary == \"true\") {\n\t\t\t\t\n\t\t\t\t$summary = preg_replace(\"/\\\\n/\", \"<br>\", htmlentities($row->summary));\n\t\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"summary\\\">\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t\t$summary\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"<div id=\\\"event_list_navigation\\\">\";\n\t\t$return .= \"\t<div class=\\\"totals\\\">$totalRows Events</div><div class=\\\"navigation\\\"><div class=\\\"pages\\\">Page: $showCurrentPage of $showTotalPages</div><div class=\\\"previous\\\"><a href=\\\"javascript:regenerateEventList('$s', 'b');\\\">Previous</a></div><div class=\\\"next\\\"><a href=\\\"javascript:regenerateEventList('$s', 'n');\\\">Next</a></div></div>\";\n\t\t$return .= \"</div>\";\n\t\t\n\t} else {\n\t\t\n\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"event_item\\\">No events are currently scheduled.</div>\\n\";\n\t\t\n\t}\n\t\n\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t</div>\\n\";\n\t\n\treturn($return);\n\t\n}",
"private function display_custom_events_table()\n\t{\n\t\t// Show the custom PHP events\n\t\t// Firstly, convert our custom event list to a proper map\n\t\t$map = [];\n\n\t\t// Sort alphabetically\n\t\tksort($this->custom_php_events);\n\n\t\tforeach ($this->custom_php_events as $extension => $events)\n\t\t{\n\t\t\tksort($events);\n\n\t\t\t// Grab each event\n\t\t\tforeach ($events as $event)\n\t\t\t{\n\t\t\t\t$map[] = [$extension, $event];\n\t\t\t}\n\t\t}\n\n\t\t// Show the table\n\t\t$table_header = [$this->language->lang('CLI_EXTENSION_EVENTS_EXTENSION_NAME'), $this->language->lang('CLI_EXTENSION_EVENTS_NAME')];\n\t\t$this->render_table($table_header, $map);\n\t}",
"function getEvents(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_closed'=>false));\r\n\t\t$recordSet = $this->db->get(TBL_EVENTS);\r\n\t\t$events=$recordSet->result() ;\t\t\r\n\t\t//return json_encode($events);\r\n\t\tif (stristr($_SERVER[\"HTTP_ACCEPT\"],\"application/xhtml+xml\") ) {\r\n\t\t\t\theader(\"Content-type: application/xhtml+xml\"); } \r\n\t\telse{\r\n\t\t\t\theader(\"Content-type: text/xml\");\r\n\t\t}\r\n\t\t$xml=\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\";\r\n\t\t$xmlinner=\"\";\r\n\t\t$xmlinner=\"<newslist title=\\\"Event Calendar:\\\">\";\r\n\t\tforeach($events as $row){\r\n\t\t\t$xmlinner=$xmlinner.\"<news url=\\\"javascript:void(0)\\\" date='\".dateformat($row->event_date).\"' time='\".$row->event_time.\"'>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<headline><![CDATA[\".$row->title.\"]]></headline>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<detail><![CDATA[\".$row->venue.\"]]></detail>\";\r\n\t\t\t$xmlinner=$xmlinner.\"</news>\";\t\t\t\r\n\t\t}\r\n\t\t$xmlinner=$xmlinner.\"</newslist>\";\r\n\t\treturn $xml.$xmlinner;\r\n\t}",
"protected function content_template() {\n\t\t?>\n\t\t<li class=\"panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>\">\n\t\t\t<button type=\"button\" class=\"customize-panel-back\" tabindex=\"-1\">\n\t\t\t\t<span class=\"screen-reader-text\"><?php _e( 'Back' ); ?></span>\n\t\t\t</button>\n\t\t\t<div class=\"accordion-section-title\">\n\t\t\t\t<span class=\"preview-notice\">\n\t\t\t\t\t<?php\n\t\t\t\t\t/* translators: %s: the site/panel title in the Customizer */\n\t\t\t\t\tprintf( __( 'You are customizing %s' ), '<strong class=\"panel-title\">{{ data.title }}</strong>' );\n\t\t\t\t\t?>\n\t\t\t\t</span>\n\t\t\t\t<button type=\"button\" class=\"customize-help-toggle dashicons dashicons-editor-help\" aria-expanded=\"false\">\n\t\t\t\t\t<span class=\"screen-reader-text\"><?php _e( 'Help' ); ?></span>\n\t\t\t\t</button>\n\t\t\t\t<button type=\"button\" class=\"customize-screen-options-toggle\" aria-expanded=\"false\">\n\t\t\t\t\t<span class=\"screen-reader-text\"><?php _e( 'Menu Options' ); ?></span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<# if ( data.description ) { #>\n\t\t\t<div class=\"description customize-panel-description\">{{{ data.description }}}</div>\n\t\t\t<# } #>\n\t\t\t<div id=\"screen-options-wrap\">\n\t\t\t\t<?php $this->render_screen_options(); ?>\n\t\t\t</div>\n\t\t</li>\n\t\t<?php\n\t\t// NOTE: The following is a workaround for an inability to treat (and thus label) a list of sections as a whole.\n\t\t?>\n\t\t<li class=\"customize-control-title customize-section-title-nav_menus-heading\"><?php _e( 'Menus' ); ?></li>\n\t<?php\n\t}",
"function theme_uom_event_information($variables) {\n $information = $variables['information'];\n $items = array();\n\n $title = t('Contact');\n $attributes = array('class' => array('uom-event-information'));\n $type = 'ul';\n\n if (!empty($information->email)) {\n\t\t$data = '<strong>'. t('Email: '). '</strong>'. l($information->email, 'mailto:' . $information->email);\n $items[] = array(\n 'data' => $data,\n 'class' => array('email'),\n );\n }\n if (!empty($information->phone)) {\n\t\t$data = '<strong>'. t('Phone: '). '</strong>'. ( (module_exists('unimelb_formatters')) ? unimelb_formatters_field_formatter_unimelb_html5_phone_link(array('safe_value' => $information->phone)) : $information->phone );\n $items[] = array(\n 'data' => $data, \n 'class' => array('phone'),\n );\n }\n if (!empty($information->url)) {\n\t\t$data = '<strong>'. t('URL: '). '</strong>'. l($information->url, $information->url); \n $items[] = array(\n 'data' => $data,\n 'class' => array('url'),\n );\n }\n\n return (empty($items)) ? '' : theme_item_list(array('items' => $items, 'title' => $title, 'type' => $type, 'attributes' => $attributes));\n}",
"function showEvents() {\r\n\r\n\t// Lets import some globals, shall we?\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\tglobal $TIMEMARK;\r\n\t$delta = $TIMEMARK -259200;\r\n\t\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\r\n\t// Load all events.\r\n\t$EVENTS_DS = $DB->query(\"SELECT * FROM events WHERE starttime >= '\" . $delta . \"' ORDER BY starttime ASC\");\r\n\r\n\t// .. right?\r\n\tif ($EVENTS_DS->numRows() >= 1) {\r\n\r\n\t\t// Lets keep in mind: We have events.\r\n\t\t$haveEvents = true;\r\n\r\n\t\twhile ($event = $EVENTS_DS->fetchRow()) {\r\n\r\n\t\t\t// get the date.\r\n\t\t\t$date = date(\"d.m.y\", $event[starttime]);\r\n\r\n\t\t\t// open up a new table for each day.\r\n\t\t\tif ($date != $previousdate) {\r\n\r\n\t\t\t\t$workday = date(\"l\", $event[starttime]);\r\n\r\n\t\t\t\tif ($beenhere) {\r\n\t\t\t\t\t$html .= $temp->flush();\r\n\t\t\t\t\t$html .= \"<br>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$beenhere = true;\r\n\r\n\t\t\t\t// We need an additional row if we are allowed to delete events.\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp = new table(8, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$temp = new table(7, true);\r\n\t\t\t\t}\r\n\t\t\t\t$temp->addHeader(\">> Events for \" . $workday . \", the \" . $date);\r\n\t\t\t\t$previousdate = $date;\r\n\r\n\t\t\t\t$temp->addRow(\"#060622\");\r\n\t\t\t\t$temp->addCol(\"ID\");\r\n\t\t\t\t$temp->addCol(\"Starttime\");\r\n\t\t\t\t$temp->addCol(\"Starts in / Runs for\");\r\n\t\t\t\t$temp->addCol(\"Mission Type\");\r\n\t\t\t\t$temp->addCol(\"Short Description\");\r\n\t\t\t\t$temp->addCol(\"System\");\r\n\t\t\t\t$temp->addCol(\"Security\");\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp->addCol(\"Delete\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add Event to the current database.\r\n\t\t\t$temp->addRow();\r\n\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=showevent&id=\" . $event[id] . \"\\\">\" . str_pad($event[id], 4, \"0\", STR_PAD_LEFT) . \"</a>\");\r\n\t\t\t$temp->addCol(date(\"d.m.y H:i\", $event[starttime]));\r\n\r\n\t\t\t$delta = $TIMEMARK - $event[starttime];\r\n\t\t\tif ($TIMEMARK > $event[starttime]) {\r\n\t\t\t\t// Event underway.\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#00ff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t} else {\r\n\t\t\t\t// Event not started yet.\r\n\t\t\t\t$delta = $delta * -1;\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#ffff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t}\r\n\r\n\t\t\t$temp->addCol($event[type]);\r\n\t\t\t$temp->addCol($event[sdesc]);\r\n\t\t\t$temp->addCol($event[system]);\r\n\t\t\t$temp->addCol($event[security]);\r\n\t\t\t\r\n\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=deleteevent&id=$event[id]\\\">delete event</a>\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Lets recall, did we have events scheduled?\r\n\tif ($haveEvents) {\r\n\t\t// We do!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2>\" . $html . $temp->flush();\r\n\t} else {\r\n\t\t// We dont!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>\";\r\n\t}\r\n\t// Return what we got.\r\n\treturn ($html);\r\n\r\n}",
"public function create_element_structure() {\n\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\n\t\t\t$this->config['php_class'] = get_class( $this );\n\t\t\t// element id\n\t\t\t$this->config['id'] = 'events';\n\t\t\t// element shortcode base\n\t\t\t$this->config['base'] = 'oxo_events';\n\t\t\t// element name\n\t\t\t$this->config['name'] = __( 'Events', 'oxo-core' );\n\t\t\t// element icon\n\t\t\t$this->config['icon_url'] = \"icons/sc-text_block.png\";\n\t\t\t// css class related to this element\n\t\t\t$this->config['css_class'] = \"oxo_element_box\";\n\t\t\t// element icon class\n\t\t\t$this->config['icon_class'] = 'oxo-icon builder-options-icon oxoa-calendar-plus-o';\n\t\t\t// tooltip that will be displyed upon mouse over the element\n\t\t\t//$this->config['tool_tip'] \t\t= 'Creates a Woo Slider';\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\n\t\t\t$this->config['data'] = array( \"drop_level\" => \"4\" );\n\t\t}",
"function formatEvent($time, $date, $firstInList=false)\n{\n\t$str = \"\";\n\t$event = $time->get(\"-event:time\");\n\t$organisers = array();\n\tgetOrganisers($organisers, $event);\n\t$places = array();\n\tgetPlaces($places, $event);\n\n\t$sid = sid($time);\n\n\tglobal $eventcounter;\n\tglobal $eventdate;\n\t$eventcounter++;\n\tif($eventcounter <= 10 || $eventdate == $date) { $featured = \"featured \"; } else { $featured = \"\"; }\n\tif($eventcounter <= 10) { $eventdate = $date; }\n\t$starts = \"\";\n\tif( $time->has( \"tl:start\" ) && substr($time->getString(\"tl:start\"), 0, 10) == $date )\n\t{\n\t\t$starts = \" <span class='date'>(\".formatTime($time->getString( \"tl:start\" ), $date).\")</span>\";\n\t}\n\t$str .= \"<div class='event $featured\".($firstInList?\"first-event \":\"\").implode(\" \", array_keys($organisers)).\" \".implode(\" \", array_keys($places)).\"' itemscope itemtype='http://data-vocabulary.org/Event'>\\n\";\n\t$str .= \"\\t<h3 itemprop='summary'><img class='small-chevron' src='img/chevron_small_right.png' alt='' />\".htmlspecialchars($event->label()).\"$starts</h3><div class='event-links'><a href='#' class='expand-link'>Read more</a>\";\n\tif( $event->has( \"foaf:homepage\" ) )\n\t{\n\t\t$str .= \" | <a href='\".htmlspecialchars($event->get( \"foaf:homepage\" )).\"' itemprop='url' target='_blank'>View event</a>\";\n\t}\n\t$str .= \"</div>\\n\";\n\t$str .= \"\\t<div class='event-more' id='\".$sid.\"'>\\n\";\n\t$str .= \"\\t\\t<div class='event-info'>\\n\";\n\tif( $time->has( \"tl:start\" ) && substr($time->getString(\"tl:start\"), 0, 10) == $date )\n\t{\n\t\t$str .= \"\\t\\t\\t<div>\";\n\t\t$str .= formatTime($time->getString( \"tl:start\" ), $date);\n\t\tif( $time->has( \"tl:end\" ) )\n\t\t{\n\t\t\t$str .= \" - \".formatTime($time->getString( \"tl:end\" ), $date);\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t\t$str .= \"<span style='display:none' itemprop='startDate'>\".$time->getString( \"tl:start\" ).\"</span>\";\n\t\tif( $time->has( \"tl:end\" ) )\n\t\t{\n\t\t\t$str .= \"<span style='display:none' itemprop='endDate'>\".$time->getString( \"tl:end\" ).\"</span>\";\n\t\t}\n\t}\n\t$str .= getEventPlaces($event, \"Place\");\n\t$str .= getEventPlaces($event, \"Additional Place Info\");\n\t$organisers = getEventAgents($event, \"Organiser\");\n\tif(count($organisers) > 0)\n\t{\n\t\tsort($organisers);\n\t\t$str .= \"\\t\\t\\t<div class='organisers'>Organised by: \";\n\t\tforeach($organisers as $organiser)\n\t\t{\n\t\t\t$str .= $organiser.\" \";\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t}\n\t$str .= \"\\t\\t</div>\\n\";\n\t//$str .= \"\\t<div style='clear:left'></div>\\n\";\n\t$speakers = getEventAgents($event, \"Speaker\");\n\tif(count($speakers) > 0)\n\t{\n\t\t$str .= \"\\t\\t<div class='speakers'>Speaker\".((count($speakers) > 1) ? \"s\" : \"\").\": \";\n\t\tforeach($speakers as $speaker)\n\t\t{\n\t\t\t$str .= $speaker.\" \";\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t}\n\tif( $event->has( \"dct:description\" ) )\n\t{\n\t\t$str .= \"\\t\\t<div class='description' itemprop='description'>\".$event->getString( \"dct:description\" ).\"</div>\\n\";\n\t}\n\t$str .= \"\\t\\t<div style='clear:both'></div>\\n\";\n\t$str .= \"\\t</div>\\n\";\n\t$str .= \"</div>\\n\";\n\treturn $str;\n}",
"static function get_element_list(){\n\t\t\t\t\n\t\t\t\t// search\n\t\t\t\techo '<input type=\"text\" placeholder=\"' . esc_attr('Search Templates', 'goodlayers-core') . '\" class=\"gdlr-core-page-builder-head-content-search\" />';\n\t\t\t\t\n\t\t\t\t// template type\n\t\t\t\techo '<div class=\"gdlr-core-page-builder-head-content-template-type\" >';\n\t\t\t\techo '<div class=\"gdlr-core-template-type-button gdlr-core-active\" data-type=\"page\" >' . esc_html__('Pre-Built Pages', 'goodlayers-core') . '</div>';\n\t\t\t\techo '<div class=\"gdlr-core-template-type-button\" data-type=\"block\" >' . esc_html__('Pre-Built Blocks', 'goodlayers-core') . '</div>';\n\t\t\t\techo '</div>';\n\t\t\t\t\n\t\t\t\t// template page\n\t\t\t\techo '<div class=\"gdlr-core-page-builder-head-content-template-container gdlr-core-active\" data-type=\"page\" >';\n\n\t\t\t\t$pb_page_templates = apply_filters('gdlr_core_page_builder_page_template_list', array());\n\t\t\t\tforeach( $pb_page_templates as $template_slug => $template_option ){\n\t\t\t\t\techo '<div class=\"gdlr-core-page-builder-head-content-template-item gdlr-core-pb-list-draggable\" data-template=\"template\" '; \n\t\t\t\t\techo 'data-title=\"' . esc_attr($template_option['title']) . '\" '; \n\t\t\t\t\techo 'data-type=\"' . esc_attr($template_option['type']) . '\" '; \n\t\t\t\t\techo 'data-template-slug=\"' . esc_attr($template_slug) . '\" >';\n\t\t\t\t\tif( !empty($template_option['thumbnail']) ){\n\t\t\t\t\t\techo '<img src=\"' . esc_url($template_option['thumbnail']) . '\" alt=\"\" />';\n\t\t\t\t\t}\n\t\t\t\t\techo gdlr_core_escape_content($template_option['title']) . '</div>';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\techo '</div>'; // gdlr-core-page-builder-head-content-template-container\t\n\t\t\t\t\n\t\t\t\t// template block\n\t\t\t\techo '<div class=\"gdlr-core-page-builder-head-content-template-container\" data-type=\"block\" >';\n\t\t\t\t\n\t\t\t\t$pb_block_templates = apply_filters('gdlr_core_page_builder_block_template_list', array());\n\t\t\t\tforeach( $pb_block_templates as $template_slug => $template_option ){\n\t\t\t\t\techo '<div class=\"gdlr-core-page-builder-head-content-template-item gdlr-core-pb-list-draggable\" data-template=\"template\" '; \n\t\t\t\t\techo 'data-title=\"' . esc_attr($template_option['title']) . '\" '; \n\t\t\t\t\techo 'data-type=\"' . esc_attr($template_option['type']) . '\" '; \n\t\t\t\t\techo 'data-template-slug=\"' . esc_attr($template_slug) . '\" >';\n\t\t\t\t\tif( !empty($template_option['thumbnail']) ){\n\t\t\t\t\t\techo '<img src=\"' . esc_url($template_option['thumbnail']) . '\" alt=\"\" />';\n\t\t\t\t\t}\n\t\t\t\t\techo '</div>';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\techo '</div>'; // gdlr-core-page-builder-head-content-template-container\n\t\t\t}",
"public function __toString()\n\t{\n\t\t$list_html = $this->build_list($this->data);\n\t\t\n\t\treturn $list_html;\n\t}",
"function latest_events($user_id = '', $from_date_field = 'start_date', $order = 'DESC', $number_of_latest_events = 1) {\n\t$latest_events = get_latest_events('', $from_date_field, $from_date_field, $order, $number_of_latest_events);\n\n\tif (empty($latest_events)) {\n\t\treturn;\n\t}\n?>\n\t\t<!-- Latest Events -->\n\t\t<section id=\"latest-events\" class=\"section-invert featurette\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t<h2>Latest sponsored event<?php echo (count($latest_events) > 1 ? 's' : ''); ?></h2>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"latest-events row\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ($latest_events as $latest_event) :\n\t\t\t\t\t\t$latest_event_featured_image = get_asset($latest_event['event_featured_image_id']);\n\t\t\t\t\t\t$latest_event_featured_image_properties = json_decode($latest_event_featured_image['asset_properties'], TRUE);\n\t\t\t\t\t\t$latest_event_featured_image_thumbnail_url = get_image_thumbnail_url($latest_event_featured_image_properties, 'desktop_featured_image');\n\t\t\t\t\t?>\n\t\t\t\t\t<div id=\"latest-event-<?php echo $latest_event['id']; ?>\" class=\"latest-events-event-wrapper\">\n\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t<a href=\"event.php?event_id=<?php echo $latest_event['id']; ?>\"><img class=\"img-responsive\" src=\"<?php echo $latest_event_featured_image_thumbnail_url; ?>\" alt=\"<?php echo 'event featured image'; // $latest_event_featured_image['asset_caption']; ?>\"></a>\n\t\t\t\t\t\t</div><!-- .col-md-7 -->\n\n\t\t\t\t\t\t<div class=\"col-md-6 hero\">\n\t\t\t\t\t\t\t<h3 class=\"lead\"><a href=\"event.php?event_id=<?php echo $latest_event['id']; ?>\"><?php echo $latest_event['event_name']; ?></a></h3>\n\n\t\t\t\t\t\t\t<?php echo ($latest_event['event_start_date'] ? '<p class=\"lead\">' . ($latest_event['event_end_date'] && $latest_event['event_start_date'] == $latest_event['event_end_date'] ? 'On ' : 'From ') . date('F j, Y', strtotime($latest_event['event_start_date'])) . ($latest_event['event_end_date'] && $latest_event['event_start_date'] != $latest_event['event_end_date'] ? ' to ' . date('F j, Y', strtotime($latest_event['event_end_date'])) : '') . '</p>' : ''); ?>\n\n\t\t\t\t\t\t\t<?php echo ($latest_event['event_description'] ? '<p class=\"lead\">' . $latest_event['event_description'] . '</p>' : ''); ?>\n\n\t\t\t\t\t\t\t<a href=\"upload-photos-to-event.php?event_id=<?php echo $latest_event['id']; ?>\" class=\"btn btn-primary\">Let's make a movie now</a>\n\t\t\t\t\t\t</div><!-- .col-md-5 -->\n\n\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t</div><!-- .latest-events-event-wrapper -->\n\t\t\t\t\t<?php endforeach; // foreach ($latest_events as $latest_event) ?>\n\t\t\t\t</div><!-- .latest-events -->\n\t\t\t</div><!-- .container -->\n\t\t</section><!-- #latest-events -->\n<?php\n}",
"function showEventList() {\n $content = @$this->vars[\"content\"];\n $start = @$this->vars[\"start\"];\n\n if ($content) {\n $general_url = $_SERVER[\"PHP_SELF\"] . \"?content=$content\";\n }\n\n $general_url_plain = $general_url;\n\n if (!$start) {\n $start = 0;\n }\n\n $txt = new Text($this->language, \"module_isic_bypass\");\n $txtf = new Text($this->language, \"output\");\n\n // instantiate template class\n $tpl = new template;\n $tpl->setCacheLevel($this->cachelevel);\n $tpl->setCacheTtl($this->cachetime);\n $usecache = checkParameters();\n\n $template = $GLOBALS[\"templates_\".$this->language][$this->tmpl][1] . \"/\" . \"module_isic_bypass_list.html\";\n\n $tpl->setInstance($_SERVER[\"PHP_SELF\"] . \"?language=\" . $this->language . \"&module=isic_bypass&type=list&sort=\" . $this->vars[\"sort\"] . \"&sort_order=\" . $this->vars[\"sort_order\"]);\n $tpl->setTemplateFile($template);\n\n // PAGE CACHED\n if ($tpl->isCached($template) == true && $usecache == true) {\n $GLOBALS[\"caching\"][] = \"isic\";\n if ($GLOBALS[\"modera_debug\"] == true) {\n return \"<!-- module isic_bypass cached -->\\n\" . $tpl->parse();\n }\n else {\n return $tpl->parse();\n }\n }\n\n // #################################\n\n $cur_time = time();\n\n if (!$this->vars[\"filter_start_time\"]) {\n $this->vars[\"filter_start_time\"] = IsicDate::getTimeStampFormatted(mktime(0, 0, 0, date(\"n\", $cur_time), 1, date(\"Y\", $cur_time)), 'Y-m-d H:i:s');\n } else {\n $this->vars[\"filter_start_time\"] = IsicDate::getTimeFormattedFromEuroToDb($this->vars[\"filter_start_time\"]);\n }\n $beg_date = IsicDate::getDateTimeFormatted($this->vars[\"filter_start_time\"]);\n\n if (!$this->vars[\"filter_end_time\"]) {\n $this->vars[\"filter_end_time\"] = IsicDate::getCurrentTimeFormatted('Y-m-d H:i:s');\n } else {\n $this->vars[\"filter_end_time\"] = IsicDate::getTimeFormattedFromEuroToDb($this->vars[\"filter_end_time\"]);\n }\n $end_date = IsicDate::getDateTimeFormatted($this->vars[\"filter_end_time\"]);\n\n $ff_fields = array(\n \"school_id\", \"lock_id\", \"person_name_first\", \"person_name_last\", \"person_number\", \"isic_number\", \"card_number\", \"access\", \"direction\", \"start_time\", \"end_time\"\n );\n\n $ff_fields_table = array(\n \"module_isic_bypass_lock\", \"module_isic_bypass_event\", \"module_isic_card\", \"module_isic_card\", \"module_isic_card\", \"module_isic_card\", \"module_isic_bypass_event\", \"module_isic_bypass_event\"\n );\n\n $ff_fields_partial = array(\n \"person_name_first\", \"person_name_last\", \"person_number\", \"isic_number\", \"card_number\"\n );\n\n $ff_fields_range_match = array(\"start_time\" => \"event_time\", \"end_time\" => \"event_time\");\n $ff_fields_range_from = array(\"start_time\");\n $ff_fields_range_to = array(\"end_time\");\n\n $condition = array();\n $url_filter = '';\n $hidden = '';\n for ($f = 0; $f < sizeof($ff_fields); $f++) {\n if ($this->vars[\"filter_\".$ff_fields[$f]] != \"\" && $this->vars[\"filter_\".$ff_fields[$f]] != \"0\") {\n if (in_array($ff_fields[$f], $ff_fields_partial)) {\n $condition[] = $this->db->quote_field_name($ff_fields_table[$f] . \".\" . $ff_fields[$f]) . \" LIKE \" . $this->db->quote(\"%\" . $this->vars[\"filter_\".$ff_fields[$f]] . \"%\");\n } elseif (in_array($ff_fields[$f], $ff_fields_range_from)) {\n $condition[] = $this->db->quote_field_name($ff_fields_table[$f] . \".\" . $ff_fields_range_match[$ff_fields[$f]]) . \" >= \" . $this->db->quote($this->vars[\"filter_\".$ff_fields[$f]]);\n } elseif (in_array($ff_fields[$f], $ff_fields_range_to)) {\n $condition[] = $this->db->quote_field_name($ff_fields_table[$f] . \".\" . $ff_fields_range_match[$ff_fields[$f]]) . \" <= \" . $this->db->quote($this->vars[\"filter_\".$ff_fields[$f]]);\n } else {\n if ($ff_fields[$f] == \"access\") {\n $condition[] = $this->db->quote_field_name($ff_fields_table[$f] . \".\" . $ff_fields[$f]) . \" = \" . $this->db->quote($this->vars[\"filter_\".$ff_fields[$f]] - 1);\n } else {\n $condition[] = $this->db->quote_field_name($ff_fields_table[$f] . \".\" . $ff_fields[$f]) . \" = \" . $this->db->quote($this->vars[\"filter_\".$ff_fields[$f]]);\n }\n }\n\n if ($ff_fields[$f] == \"start_time\") {\n $t_val = $beg_date;\n } else if ($ff_fields[$f] == \"end_time\") {\n $t_val = $end_date;\n } else {\n $t_val = $this->vars[\"filter_\".$ff_fields[$f]];\n }\n $url_filter .= \"&filter_\" . $ff_fields[$f] . \"=\" . urlencode($t_val);\n $hidden .= \"<input type=\\\"hidden\\\" name=\\\"filter_\" . $ff_fields[$f] . \"\\\" value=\\\"\" . urlencode($t_val) . \"\\\">\\n\";\n }\n }\n\n // restrictions based on user-type\n switch ($this->user_type) {\n case 1: // admin\n // do nothing, other filters will be in place\n break;\n case 2: // regular\n $condition[] = \"`module_isic_card`.`person_number` = '\" . mysql_escape_string($this->user_code) . \"'\";\n break;\n }\n\n $condition_sql = implode(\" AND \", $condition);\n if ($condition_sql) {\n $condition_sql = \" AND \" . $condition_sql;\n }\n\n $listSortOrder = new IsicListViewSortOrder($this->listSortFields, $this->listSortFieldDefault, $this->vars);\n $hidden .= IsicForm::getHiddenField('sort', $listSortOrder->getSort());\n $hidden .= IsicForm::getHiddenField('sort_order', $this->vars[\"sort_order\"]);\n $hidden .= IsicForm::getHiddenField('start', $start);\n\n if ($this->user_type == 1) {\n $res =& $this->db->query(\"\n SELECT\n `module_isic_bypass_event`.*,\n `module_isic_card`.`person_name_first`,\n `module_isic_card`.`person_name_last`,\n `module_isic_card`.`person_number`,\n `module_isic_card`.`isic_number`,\n `module_isic_bypass_lock`.`name` AS lock_name\n FROM\n `module_isic_bypass_event`,\n `module_isic_bypass_lock`,\n `module_isic_card`\n WHERE\n `module_isic_bypass_event`.`lock_id` = `module_isic_bypass_lock`.`id` AND\n `module_isic_bypass_event`.`card_id` = `module_isic_card`.`id` AND\n `module_isic_card`.`school_id` IN (!@)\n !\n ORDER BY\n ?f !\n LIMIT !, !\",\n $this->allowed_schools,\n $condition_sql,\n $listSortOrder->getOrderBy(),\n $listSortOrder->getSortOrder(),\n $start,\n $this->maxresults\n );\n } elseif ($this->user_type == 2) {\n $res =& $this->db->query(\"\n SELECT\n `module_isic_bypass_event`.*,\n `module_isic_card`.`person_name_first`,\n `module_isic_card`.`person_name_last`,\n `module_isic_card`.`person_number`,\n `module_isic_card`.`isic_number`,\n `module_isic_bypass_lock`.`name` AS lock_name\n FROM\n `module_isic_bypass_event`,\n `module_isic_bypass_lock`,\n `module_isic_card`\n WHERE\n `module_isic_bypass_event`.`lock_id` = `module_isic_bypass_lock`.`id` AND\n `module_isic_bypass_event`.`card_id` = `module_isic_card`.`id`\n !\n ORDER BY\n ?f !\n LIMIT !, !\",\n $condition_sql,\n $listSortOrder->getOrderBy(),\n $listSortOrder->getSortOrder(),\n $start,\n $this->maxresults\n );\n }\n\n// echo \"<!-- SQL: \" . $this->db->show_query() . \" -->\\n\";\n $card_url = $this->isic_common->getGeneralUrlByTemplate(870);\n\n if ($res !== false) {\n $row = 1;\n if ($res->num_rows()) {\n while ($data = $res->fetch_assoc()) {\n $tpl->addDataItem(\"DATA.DATA_NUMBER\", $row++);\n $tpl->addDataItem(\"DATA.STYLE\", $data[\"access\"] ? \"tRowOk\" : \"tRowNotOk\");\n $tpl->addDataItem(\"DATA.DATA_ACCESS\", $txt->display(\"access\" . $data[\"access\"]));\n $tpl->addDataItem(\"DATA.DATA_DIRECTION\", $txt->display(\"direction\" . $data[\"direction\"]));\n $tpl->addDataItem(\"DATA.DATA_LOCK_NAME\", $data[\"lock_name\"]);\n $tpl->addDataItem(\"DATA.DATA_PERSON_NAME_FIRST\", $data[\"person_name_first\"]);\n $tpl->addDataItem(\"DATA.DATA_PERSON_NAME_LAST\", $data[\"person_name_last\"]);\n $tpl->addDataItem(\"DATA.DATA_PERSON_NUMBER\", $data[\"person_number\"]);\n $tpl->addDataItem(\"DATA.DATA_ISIC_NUMBER\", $data[\"isic_number\"]);\n $tpl->addDataItem(\"DATA.DATA_EVENT_TIME\", IsicDate::getDateTimeFormatted($data[\"event_time\"]));\n $tpl->addDataItem(\"DATA.URL_DETAIL\", $card_url . \"&card_id=\" . $data[\"card_id\"]);\n }\n $res->free();\n } else {\n $tpl->addDataItem(\"RESULTS\", $txt->display(\"results_none\"));\n }\n } else {\n echo \"Database error \" . $this->db->error_code() . \": \" . $this->db->error_string();\n }\n\n\n // page listing\n if ($this->user_type == 1) {\n $res =& $this->db->query(\"\n SELECT\n COUNT(*) AS events_total\n FROM\n `module_isic_bypass_event`,\n `module_isic_bypass_lock`,\n `module_isic_card`\n WHERE\n `module_isic_bypass_event`.`lock_id` = `module_isic_bypass_lock`.`id` AND\n `module_isic_bypass_event`.`card_id` = `module_isic_card`.`id` AND\n `module_isic_card`.`school_id` IN (!@)\n !\",\n $this->allowed_schools,\n $condition_sql\n );\n } elseif ($this->user_type == 2) {\n $res =& $this->db->query(\"\n SELECT\n COUNT(*) AS events_total\n FROM\n `module_isic_bypass_event`,\n `module_isic_bypass_lock`,\n `module_isic_card`\n WHERE\n `module_isic_bypass_event`.`lock_id` = `module_isic_bypass_lock`.`id` AND\n `module_isic_bypass_event`.`card_id` = `module_isic_card`.`id`\n !\",\n $condition_sql\n );\n }\n\n $data = $res->fetch_assoc();\n $total = $results = $data[\"events_total\"];\n\n $disp = ereg_replace(\"{NR}\", \"$total\", $txt->display(\"results\"));\n if ($results >= $this->maxresults) {\n $end = $start + $this->maxresults;\n } else {\n $end = $start + $results;\n }\n if ($end == 0) {\n $start0 = 0;\n }\n else {\n $start0 = $start + 1;\n }\n $disp = str_replace(\"{DISP}\", $start0 . \"-$end\", $disp);\n $tpl->addDataItem(\"RESULTS\", $disp);\n\n $tpl->addDataItem(\"PAGES\", resultPages($start, $total, $general_url . \"&contact_id=\" . $data[\"id\"] .\n $url_filter . \"&sort=\" . $this->vars[\"sort\"].\"&sort_order=\" . $this->vars[\"sort_order\"],\n $this->maxresults, $txt->display(\"prev\"), $txt->display(\"next\")));\n\n // ####\n\n switch ($this->vars[\"error\"]) {\n case \"view\":\n $tpl->addDataItem(\"MESSAGE.MESSAGE\", $txt->display(\"error_view\"));\n break;\n }\n\n // filter fields\n $fields = array(\n \"filter_start_time\" => array(\"textinput\", 40,0,$beg_date,\"\",\"\",\"datePicker\"),\n \"filter_end_time\" => array(\"textinput\", 40,0,$end_date,\"\",\"\",\"datePicker\"),\n \"filter_lock_id\" => array(\"select\",0,0,$this->vars[\"filter_lock_id\"],\"\",\"\",\"\"),\n \"filter_school_id\" => array(\"select\", 0,0,$this->vars[\"filter_school_id\"],\"\",\"\",\"\"),\n \"filter_access\" => array(\"select\",0,0,$this->vars[\"filter_access\"],\"\",\"\",\"\"),\n \"filter_direction\" => array(\"select\", 0,0,$this->vars[\"filter_direction\"],\"\",\"\",\"\"),\n \"filter_person_name_first\" => array(\"textinput\", 20,0,$this->vars[\"filter_person_name_first\"],\"\",\"\",\"\"),\n \"filter_person_name_last\" => array(\"textinput\", 20,0,$this->vars[\"filter_person_name_last\"],\"\",\"\",\"\"),\n \"filter_person_number\" => array(\"textinput\", 20,0,$this->vars[\"filter_person_number\"],\"\",\"\",\"\"),\n \"filter_isic_number\" => array(\"textinput\", 20,0,$this->vars[\"filter_isic_number\"],\"\",\"\",\"\"),\n \"filter_card_number\" => array(\"textinput\", 20,0,$this->vars[\"filter_card_number\"],\"\",\"\",\"\"),\n );\n\n // active selection\n $list = array();\n $list[0] = $txt->display(\"all\");\n for ($i = 0; $i < 2; $i++) {\n $list[$i + 1] = $txt->display(\"access\" . $i);\n }\n $fields[\"filter_access\"][4] = $list;\n\n // access selection\n $list = array();\n $list[0] = $txt->display(\"all\");\n for ($i = 1; $i < 3; $i++) {\n $list[$i] = $txt->display(\"direction\" . $i);\n }\n $fields[\"filter_direction\"][4] = $list;\n\n // locks\n $list = array();\n $r = &$this->db->query('\n SELECT\n `module_isic_bypass_lock`.*\n FROM\n `module_isic_bypass_lock`\n ORDER BY\n `module_isic_bypass_lock`.`name`\n ');\n\n $list[0] = $txt->display(\"all_locks\");\n while ($data = $r->fetch_assoc()) {\n $list[$data[\"id\"]] = $data[\"name\"];\n }\n $fields[\"filter_lock_id\"][4] = $list;\n\n // schools\n $list = array();\n $r = &$this->db->query('\n SELECT\n `module_isic_school`.*\n FROM\n `module_isic_school`\n ORDER BY\n `module_isic_school`.`name`\n ');\n\n $list[0] = $txt->display(\"all_schools\");\n while ($data = $r->fetch_assoc()) {\n if (in_array($data[\"id\"], $this->allowed_schools) && !$this->isicDbSchools->isEhlRegion($data)) {\n $list[$data[\"id\"]] = $data[\"name\"];\n }\n }\n $fields[\"filter_school_id\"][4] = $list;\n\n while (list($key, $val) = each($fields)) {\n $fdata[\"type\"] = $val[0];\n $fdata[\"size\"] = $val[1];\n $fdata[\"cols\"] = $val[1];\n $fdata[\"rows\"] = $val[2];\n $fdata[\"list\"] = $val[4];\n $fdata[\"java\"] = $val[5];\n $fdata[\"class\"] = $val[6];\n\n $f = new AdminFields(\"$key\", $fdata);\n $field_data = $f->display($val[3]);\n $tpl->addDataItem(\"FIELD_$key\", $field_data);\n unset($fdata);\n }\n\n $listSortOrder->showTitleFields($tpl, $txt, $general_url . $url_filter);\n $tpl->addDataItem(\"URL_GENERAL_PLAIN\", $general_url_plain);\n $tpl->addDataItem(\"URL_GENERAL\", $general_url . $url_filter . \"&sort_order=\" . $this->vars[\"sort_order\"]);\n $tpl->addDataItem(\"SELF\", $general_url);\n\n // ####\n return $tpl->parse();\n }",
"public function gettingList() {\n\n // This is the array for the render system ready to print.\n $final_array = [];\n\n // Set the first element only a initial welcome message.\n $final_array['welcome_message'] = [\n '#type' => 'item',\n '#markup' => $this->t('Hello World, I am just a text.'),\n '#prefix' => '<div id=\"salute\">',\n '#suffix' => '</div>',\n '#attached' => [\n 'library' => [\n 'javascript_custom_module/js_hello_world_console',\n ],\n ],\n ];\n\n // We're adding the new resources to the same welcome element.\n $final_array['welcome_message']['#attached']['library'][] = 'javascript_custom_module/js_hello_world_advanced';\n $final_array['welcome_message']['#attached']['drupalSettings']['data']['name'] = $this->current_user->getDisplayName();\n $final_array['welcome_message']['#attached']['drupalSettings']['data']['mail'] = $this->current_user->getEmail();\n $final_array['welcome_message']['#attached']['library'][] = 'javascript_custom_module/js_custom_dialog_window';\n\n // Build a dynamic select query for database.\n $query = $this->connection->select('comment_field_data', 'a');\n\n // Add methods to the query object.\n $query->join('comment', 'b', 'a.cid = b.cid');\n $query->fields('a', ['cid', 'entity_id', 'subject', 'uid']);\n $query->fields('b', ['uuid']);\n $query->condition('a.uid', $this->current_user->id());\n $query->orderBy('cid', 'DESC');\n\n // Executes the select query.\n $result = $query->execute();\n\n // Go Through the results.\n $rows = [];\n foreach($result as $record) {\n $rows[] = [\n $record->cid,\n $record->entity_id,\n $record->subject,\n $record->uid,\n $record->uuid,\n ];\n }\n\n // Build the final table ready to render.\n $final_array['comment_table'] = [\n '#type' => 'table',\n '#rows' => $rows,\n '#header' => [\n $this->t('Comment ID'),\n $this->t('Entity ID'),\n $this->t('Subject'),\n $this->t('User ID'),\n $this->t('Universal Unique ID'),\n ],\n ];\n\n return $final_array;\n }",
"public function getEventHtml()\n {\n if (!$this->eventsByGroupId) return null;\n\n $return = '';\n\n foreach ($this->events as &$event)\n {\n // If we're supposed to inherit our colours from the group, do so\n if ($event->event_colour_inherit == 1)\n {\n $event->colour_hex = $this->groupsById[$event->id_group]->group_colour;\n $event->colour_rgb = $this->groupsById[$event->id_group]->group_colour_rgb;\n }\n\n $fullBgColor = 'background-color: rgba('.$event->colour_rgb.', 0.7);';\n\n // See if we have a \"custom\", shorter name to display\n if (!empty($event->event_name_short)) $displayName = $event->event_name_short;\n else $displayName = $event->event_name;\n\n // Is the start or end unsure?\n // That would mean we would need to use a gradient.\n\n // Always fade for 120 pixels unless the event is thinner than that\n $fadePercentage = round(120/$event->event_px_width*100);\n if ($fadePercentage > 50) $fadePercentage = '20';\n\n if ($event->event_start_unsure && $event->event_end_unsure)\n {\n\n $bgColor = 'linear-gradient(left,'.\n 'rgba('.$event->colour_rgb.', 0) 0%,'.\n 'rgba('.$event->colour_rgb.', 0.7) '.$fadePercentage.'%,'.\n 'rgba('.$event->colour_rgb.', 0.7) '.(100-$fadePercentage).'%,'.\n 'rgba('.$event->colour_rgb.', 0) 100%'.\n ');';\n }\n elseif ($event->event_start_unsure)\n {\n $bgColor = 'linear-gradient(left,'.\n 'rgba('.$event->colour_rgb.', 0) 0%,'.\n 'rgba('.$event->colour_rgb.', 0.7) '.$fadePercentage.'%,'.\n 'rgba('.$event->colour_rgb.', 0.7) 100%'.\n ');';\n }\n elseif ($event->event_end_unsure)\n {\n $bgColor = 'linear-gradient(left,'.\n 'rgba('.$event->colour_rgb.', 0.7) 0%,'.\n 'rgba('.$event->colour_rgb.', 0.7) '.(100-$fadePercentage).'%,'.\n 'rgba('.$event->colour_rgb.', 0) 100%'.\n ');';\n }\n\n // If we went the gradient route, also add browser prefixes\n if ($event->event_start_unsure || $event->event_end_unsure)\n {\n $fullBgColor .= 'background: -webkit-'.$bgColor;\n $fullBgColor .= 'background: -moz-'.$bgColor;\n $fullBgColor .= 'background: -ms-'.$bgColor;\n $fullBgColor .= 'background: -o-'.$bgColor;\n $fullBgColor .= 'background: '.$bgColor;\n }\n\n $return .= '<div class=\"chart-event\"'.\n ' data-id-group=\"'.$event->id_group.'\"'.\n ' data-id-event=\"'.$event->id_event.'\"'.\n ' style=\"left: '. $event->event_px_x.'px;'.\n 'top: '. $event->event_px_y.'px;'.\n 'width: '. $event->event_px_width.'px;'.\n 'height: '.$event->event_px_height.'px;'.\n 'background-color: '.$event->colour_hex.';'. // Fallback for some browsers\n $fullBgColor.\n '\"'.\n '>'.\n $displayName.\n '</div>';\n }\n\n return $return;\n }",
"public function actionEvents()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('events');\n\t}",
"function wp_print_community_events_templates()\n {\n }",
"public function showEvent()\n {\n switch($this->logo){\n case 'default':\n $logo = '<img src=\"public/img/default/event.png\" alt=\"WorldEsport logo\">';\n break;\n default:\n $logo = '<img src=\"inc/img/imgempevents.php?imgname='. $this->logo .'&u='. $this->currentUser->pk_iduser .'\" alt=\"WorldEsport employee events logo\">';\n }\n\n //test de la presence de description ou non\n switch($this->description){\n case true:\n $description = '<div class=\"info-line collapse\" id=\"collapse'. substr(str_replace($this->unauthorizedChar,'',$this->name),0,15) . str_replace($this->unauthorizedChar,'',$this->startdate) .'\">\n <p class=\"info-decription\">' . $this->description . '</p>\n </div>';\n $btcollapse = '<div class=\"bt-more-container\">\n <button class=\"share-button bt\" data-toggle=\"collapse\" href=\"#collapse'. substr(str_replace($this->unauthorizedChar,'',$this->name),0,15) . str_replace($this->unauthorizedChar,'',$this->startdate) .'\">\n '. $this->langFile[$this->pageName]->bt_myprofile_gamer_moredetails .'\n </button>\n </div>';\n break;\n default:\n $description = '<div class=\"info-line collapse\">\n <p class=\"info-decription\">' . $this->description . '</p>\n </div>';\n $btcollapse = '';\n }\n\n $content = ' <div class=\"profile-elem profil-event-container col-md-12\" data-elem=\"'.$this->id.'\">\n <div class=\"profile-aside-container\">\n <div class=\"loader-container loader-elem-bloc loader-profile-elem\">\n <div class=\"loader-double-container\">\n <span class=\"loader loader-double\">\n </span>\n </div>\n </div>\n <div class=\"edit-container\">\n <div class=\"edit-ico-container\">\n <div class=\"edit-gear edit-profile-bloc-elem ico-gear\"></div> \n </div>\n <div class=\"edit-options\">\n \n </div>\n </div>\n <div class=\"profile-bloc-elem-left col-md-9\">\n <div class=\"infos-container col-md-12\">\n <div class=\"info-line\">\n <p class=\"info\">'. $this->name .'</p>\n </div>\n <div class=\"info-line\">\n <p class=\"info\">'. $this->jobtitle .' '. $this->langGenerals->word_at .' </p><p class=\"info\">'. $this->company .'</p>\n </div> \n <div class=\"info-line\">\n <p class=\"info\">' . $this->dayStart . ' ' . $this->monthStart . ' ' . $this->yearStart . ' - </p><p class=\"info\">' . $this->dayEnd . ' ' . $this->monthEnd . ' ' . $this->yearEnd . '</p>\n </div>\n '. $description .' \n </div> \n '. $btcollapse .' \n </div> \n <div class=\"profile-bloc-elem-right col-md-3\">\n <div class=\"pic\">\n '. $logo .'\n </div>\n </div>\n </div> \n </div>';\n\n return $content;\n }",
"protected function addCodeDummy() {\n return '<ul class=\"list-inline\">\n<li>\n <a href=\"whatsapp://send?text=I%27m+using+Google+Analytics+Event+Tracking+from+Alligo+https%3A%2F%2Fgithub.com%2Falligo%2Fgoogle-analytics-event-tracking\"\n title=\"Share on WhatsApp\" target=\"_blank\"\n data-ga-event=\"click\"\n data-ga-category=\"GAET/Click/Share\"\n data-ga-action=\"SharedOn/WhatsApp\"\n data-ga-label=\"GAETexample\"\n >\n <i class=\"fa fa-whatsapp\" aria-hidden=\"true\"></i> Share on WhatsApp\n </a>\n</li>\n<li>\n <a href=\"https://www.facebook.com/sharer/sharer.php?p%5Burl%5D=https%3A%2F%2Fgithub.com%2Falligo%2Fgoogle-analytics-event-tracking\"\n title=\"Share on Facebook\" target=\"_blank\"\n data-ga-event=\"click\"\n data-ga-category=\"GAET/Click/Share\"\n data-ga-action=\"SharedOn/Facebook\"\n data-ga-label=\"GAETexample\"\n >\n <i class=\"fa fa-facebook\" aria-hidden=\"true\"></i> Share on Facebook\n </a>\n</li>\n<li>\n <a href=\"https://twitter.com/home?status=I%27m+using+Google+Analytics+Event+Tracking+from+Alligo+https%3A%2F%2Fgithub.com%2Falligo%2Fgoogle-analytics-event-tracking\"\n title=\"Share on Twitter\" target=\"_blank\"\n data-ga-event=\"click\"\n data-ga-category=\"GAET/Click/Share\"\n data-ga-action=\"SharedOn/Twitter\"\n data-ga-label=\"GAETexample\"\n >\n <i class=\"fa fa-twitter\" aria-hidden=\"true\"></i> Share on Twitter\n </a>\n</li>\n</ul>';\n }",
"public function run(){\n echo CHtml::closeTag($this->listTag);\n echo CHtml::closeTag($this->containerTag);\n }",
"function makeWeb()\n {\n\n $web = \"</div>No calendar information available.</div>\";\n if (isset($this->calendar->events)) {\n $web = \"\";\n foreach ($this->calendar->events as $event) {\n $timestamp = $this->textCalendar($event, [\"timestamp\"]);\n\n $web .=\n \"<div>\" .\n \"<div>\" .\n $this->thing->time_handler->textTime($timestamp) .\n \" \" .\n $event->summary .\n \" [\" .\n $event->runtime .\n \"] \" .\n \"</div><div>\" .\n $event->description .\n \"</div><div>\" .\n $event->location .\n \"</div></div>\";\n }\n }\n\n $this->thing_report[\"info\"] =\n \"Times are \" . $this->time_zone . \". Click refresh to update.\";\n\n $this->web = $web;\n $this->thing_report[\"web\"] = $this->web;\n }",
"public function _display($params)\n {\n ?>\n <!-------------------------------------------ATTENDEES-LIST---------------------------------------------->\n\n <br/><br/><br/><br/><br/><br/>\n <div id=\"atnd-list\">\n <img src=\"<?php printf('%s/%s', get_bloginfo('template_url'), 'img/list_header.png')?>\" class=\"list_header\">\n\n <br/><br/>\n <p class=\"tally\">\n\n\n <form class=\"form-search fright\" id=\"search_attendee_admin\">\n <label>Search</label> \n <div class=\"input-append\">\n <input type=\"text\" class=\"span2 search-query\" name=\"search\" id=\"search\">\n <input type=\"hidden\" id=\"sort\" name=\"sort\">\n <input type=\"hidden\" id=\"pid\" name=\"pid\" value=\"<?php printf('%s', $params['event_id'])?>\">\n <button type=\"submit\" class=\"btn\"><i class=\"icon-search\"></i></button>\n </div>\n </form>\n <div>\n <span class=\"count-list\">Attendees Count: </span><span class=\"count-total\"><?php printf('%d', $params['all'])?></span> \n <span class=\"count-list\">Clark: </span><span class=\"count-total\"><?php printf('%d', $params['clark'])?></span> \n <span class=\"count-list\">Makati: </span><span class=\"count-total\"><?php printf('%d', $params['makati'])?></span> \n </div>\n </p>\n\n <a href=\"<?php printf('%sedit.php?post_type=event', admin_url())?>\"><u>BACK TO EVENT'S LIST</u></a> |\n <a href=\"<?php printf('%s/%s?event_id=%d&create=word', plugins_url(), 'gngn/helper/word.php', $params['event_id'])?>\"><u>EXPORT TO WORD</u></a> |\n <a href=\"<?php printf('%s/%s?event_id=%d&create=excel', plugins_url(), 'gngn/helper/word.php', $params['event_id'])?>\"><u>EXPORT TO EXCEL</u></a>\n <form class=\"form-search\">\n\n <div class=\"atnd-list-table\" id=\"attendace\">\n <table class=\"table table-striped table-hover\">\n <thead class=\"btn-info\">\n <tr>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"floor_name\">Floor name ▲</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"firstname\">Full name</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"office_branch\">Office Branch</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"email_address\">Email Address</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"contact_no\">Contact Number</a></th>\n <th><a href=\"#\" class=\"arrow_admin\" val=\"office_branch\">Action</a></th><!----->\n </tr>\n </thead>\n <tbody id=\"slist\">\n <?php if(!empty($params['attendees']) && is_array($params['attendees'])):\n $branch = array(1 =>'Clark', 'Makati', 'Guest');\n foreach ($params['attendees'] as $key => $value) { ?>\n <tr>\n <td><?php printf('%s', $value['floor_name'])?></td> \n <td><?php printf('%s %s %s', $value['firstname'], $value['middlename'], $value['lastname'])?></td> \n <td><?php printf('%s', $branch[$value['office_branch']])?></td>\n <td><?php printf('%s', $value['email_address'])?></td>\n <td><?php printf('%s', $value['contact_no'])?></td>\n <td><?php printf('<a href=\"#\" class=\"btn btn-danger btn-mini remove\" att=\"%d\"><i class=\"icon-white icon-trash\"></i>Remove</a>', $value['attendee_id'])?></td>\n </tr>\n <?php } else: ?>\n <tr>\n <td colspan=\"6\">No one registered yet.</td>\n </tr>\n <?php endif; ?>\n </tbody>\n </table>\n </form>\n </div>\n <span class=\"clear\"></span>\n <a href=\"<?php printf('%sedit.php?post_type=event', admin_url())?>\"><u>BACK TO EVENT'S LIST</u></a>\n </div>\n <?php\n }",
"function output( $args ){\r\n\t\tglobal $EM_Location;\r\n\t\t$EM_Location_old = $EM_Location; //When looping, we can replace EM_Location global with the current event in the loop\r\n\t\t//Can be either an array for the get search or an array of EM_Location objects\r\n\t\tif( is_object(current($args)) && get_class((current($args))) == 'EM_Location' ){\r\n\t\t\t$locations = $args;\r\n\t\t}else{\r\n\t\t\t$locations = self::get( $args );\r\n\t\t}\r\n\t\t//What format shall we output this to, or use default\r\n\t\t$format = ( $args['format'] == '' ) ? get_option( 'dbem_location_list_item_format' ) : $args['format'] ;\r\n\t\t\r\n\t\t$output = \"\";\r\n\t\tif ( count($locations) > 0 ) {\r\n\t\t\tforeach ( $locations as $location ) {\r\n\t\t\t\t$EM_Location = $location;\r\n\t\t\t\t/* @var EM_Event $event */\r\n\t\t\t\t$output .= $location->output($format);\r\n\t\t\t}\r\n\t\t\t//Add headers and footers to output\r\n\t\t\tif( $format == get_option ( 'dbem_location_list_item_format' ) ){\r\n\t\t\t\t$single_event_format_header = get_option ( 'dbem_location_list_item_format_header' );\r\n\t\t\t\t$single_event_format_header = ( $single_event_format_header != '' ) ? $single_event_format_header : \"<ul class='dbem_events_list'>\";\r\n\t\t\t\t$single_event_format_footer = get_option ( 'dbem_location_list_item_format_footer' );\r\n\t\t\t\t$single_event_format_footer = ( $single_event_format_footer != '' ) ? $single_event_format_footer : \"</ul>\";\r\n\t\t\t\t$output = $single_event_format_header . $output . $single_event_format_footer;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$output = get_option ( 'dbem_no_events_message' );\r\n\t\t}\r\n\t\t//FIXME check if reference is ok when restoring object, due to changes in php5 v 4\r\n\t\t$EM_Location_old= $EM_Location;\r\n\t\treturn $output;\t\t\r\n\t}",
"public function __toString()\n {\n return 'Event ' . $this->createCompositeIdentifier() . ': ' . $this->getTitleFromDisplayPattern();\n }",
"public function entryAdvancedList() {\n $content = [];\n\n $content['message'] = [\n '#markup' => $this->t('A more complex list of entries in the database. Only the entries with name = \"John\" and age older than 18 years are shown, the username of the person who created the entry is also shown.'),\n ];\n\n $headers = [\n $this->t('pid'),\n $this->t('uid'),\n $this->t('studentname'),\n $this->t('studentno'),\n $this->t('chapter'),\n\t $this->t('status'),\n ];\n\n $rows = [];\n foreach ($entries = $this->repository->advancedLoad() as $entry) {\n // Sanitize each entry.\n $rows[] = array_map('Drupal\\Component\\Utility\\Html::escape', $entries);\n }\n $content['table'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#attributes' => ['id' => 'dbtng-example-advanced-list'],\n '#empty' => $this->t('No entries available.'),\n ];\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n return $content;\n }",
"public function toHtml() {\n\t\techo '<ol '.$this->getAttributes().'>'.$this->renderChildren().'</ol>';\n\t}",
"public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### EVENT CALENDAR ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}",
"function listContent()\n {\n }",
"protected function _generateEventLabels()\n {\n if (!self::$_eventList) {\n self::$_eventList = array(\n 'T0000' => Mage::helper('paypalmx')->__('General: Recibir pagos de de tipo no perteneciente a la categoria T00xx'),\n 'T0001' => Mage::helper('paypalmx')->__('Pagos masivos'),\n 'T0002' => Mage::helper('paypalmx')->__('Pagos subscritos, tambien pagos enviados y recibidos'),\n 'T0003' => Mage::helper('paypalmx')->__('Pagos previamente aprovados (BillUser API), ya sean enviados o recividos'),\n 'T0004' => Mage::helper('paypalmx')->__('eBay Auction Payment'),\n 'T0005' => Mage::helper('paypalmx')->__('Pagos Directos del API'),\n 'T0006' => Mage::helper('paypalmx')->__('Express Checkout APIs'),\n 'T0007' => Mage::helper('paypalmx')->__('Pagos regulares de la tienda'),\n 'T0008' => Mage::helper('paypalmx')->__('Pagos de envio ya sea USPS o UPS'),\n 'T0009' => Mage::helper('paypalmx')->__('Pagos de certificados de regalo: compra de un certificado de regalo'),\n 'T0010' => Mage::helper('paypalmx')->__('Auction Payment other than through eBay'),\n 'T0011' => Mage::helper('paypalmx')->__('Pago echos desde un telefono (echos por via telefonica)'),\n 'T0012' => Mage::helper('paypalmx')->__('Pagos por terminal virtual'),\n 'T0100' => Mage::helper('paypalmx')->__('General: sin cuota de pago, no perteneciente a la categoria T01xx'),\n 'T0101' => Mage::helper('paypalmx')->__('Cuota: Web Site Payments Pro Account Monthly'),\n 'T0102' => Mage::helper('paypalmx')->__('Cuota: Retiro foraneo de ACH'),\n 'T0103' => Mage::helper('paypalmx')->__('Cuota: Retiro de WorldLink Check'),\n 'T0104' => Mage::helper('paypalmx')->__('Cuota: solicitud de pagos masivos'),\n 'T0200' => Mage::helper('paypalmx')->__('General de conversion de moneda'),\n 'T0201' => Mage::helper('paypalmx')->__('Conversion de moneda usado por el usuario'),\n 'T0202' => Mage::helper('paypalmx')->__('Conversion de moneda requerido para cubrir el balance negativo'),\n 'T0300' => Mage::helper('paypalmx')->__('Fundacion general de la cuenta PayPal'),\n 'T0301' => Mage::helper('paypalmx')->__('Ayudante del balance PayPal funcion de la cuenta PayPal'),\n 'T0302' => Mage::helper('paypalmx')->__('ACH Fundacion para recuperacion de fondos del balance de la cuenta.'),\n 'T0303' => Mage::helper('paypalmx')->__('Fundacion EFT (Banco aleman)'),\n 'T0400' => Mage::helper('paypalmx')->__('Retiro general de la cuenta de Paypal'),\n 'T0401' => Mage::helper('paypalmx')->__('Limpiado Automático'),\n 'T0500' => Mage::helper('paypalmx')->__('General: Uso de la cuenta Paypal para comprar asi como para recibir pagos'),\n 'T0501' => Mage::helper('paypalmx')->__('Transaccion de Paypal tarjeto de debito virtual'),\n 'T0502' => Mage::helper('paypalmx')->__('Retiros de la tarjeta de debito PayPal del cajero automatico'),\n 'T0503' => Mage::helper('paypalmx')->__('Tranascciones escodndidas de la tarjeta de debito Virtual de PayPal'),\n 'T0504' => Mage::helper('paypalmx')->__('Avanzado Tarjeta de debito de PayPal'),\n 'T0600' => Mage::helper('paypalmx')->__('General: retiro de la cuenta de PayPalt'),\n 'T0700' => Mage::helper('paypalmx')->__('General (Compras con una tarjeta de credito)'),\n 'T0701' => Mage::helper('paypalmx')->__('Balance Negativo'),\n 'T0800' => Mage::helper('paypalmx')->__('General: bonus del tipo no perteneciente a las otras T08xx categories'),\n 'T0801' => Mage::helper('paypalmx')->__('Tarjeta de debito regreso de dinero'),\n 'T0802' => Mage::helper('paypalmx')->__('Bonus a referencias del comerciante'),\n 'T0803' => Mage::helper('paypalmx')->__('Bonus del ayudante'),\n 'T0804' => Mage::helper('paypalmx')->__('Bonus del seguro al comprador PayPal'),\n 'T0805' => Mage::helper('paypalmx')->__('Bonus de proteccion de PayPal'),\n 'T0806' => Mage::helper('paypalmx')->__('Bonus por primer uso de ACH'),\n 'T0900' => Mage::helper('paypalmx')->__('Redención General'),\n 'T0901' => Mage::helper('paypalmx')->__('Certificado de regalo de Redención'),\n 'T0902' => Mage::helper('paypalmx')->__('Points Incentive Redemption'),\n 'T0903' => Mage::helper('paypalmx')->__('Cupon de Redención'),\n 'T0904' => Mage::helper('paypalmx')->__('Reward Voucher Redemption'),\n 'T1000' => Mage::helper('paypalmx')->__('General. Product no longer supported'),\n 'T1100' => Mage::helper('paypalmx')->__('General: reversal of a type not belonging to the other T11xx categories'),\n 'T1101' => Mage::helper('paypalmx')->__('ACH Withdrawal'),\n 'T1102' => Mage::helper('paypalmx')->__('Debit Card Transaction'),\n 'T1103' => Mage::helper('paypalmx')->__('Reversal of Points Usage'),\n 'T1104' => Mage::helper('paypalmx')->__('ACH Deposit (Reversal)'),\n 'T1105' => Mage::helper('paypalmx')->__('Reversal of General Account Hold'),\n 'T1106' => Mage::helper('paypalmx')->__('Account-to-Account Payment, initiated by PayPal'),\n 'T1107' => Mage::helper('paypalmx')->__('Payment Refund initiated by merchant'),\n 'T1108' => Mage::helper('paypalmx')->__('Fee Reversal'),\n 'T1110' => Mage::helper('paypalmx')->__('Hold for Dispute Investigation'),\n 'T1111' => Mage::helper('paypalmx')->__('Reversal of hold for Dispute Investigation'),\n 'T1200' => Mage::helper('paypalmx')->__('General: adjustment of a type not belonging to the other T12xx categories'),\n 'T1201' => Mage::helper('paypalmx')->__('Chargeback'),\n 'T1202' => Mage::helper('paypalmx')->__('Reversal'),\n 'T1203' => Mage::helper('paypalmx')->__('Charge-off'),\n 'T1204' => Mage::helper('paypalmx')->__('Incentive'),\n 'T1205' => Mage::helper('paypalmx')->__('Reimbursement of Chargeback'),\n 'T1300' => Mage::helper('paypalmx')->__('General (Authorization)'),\n 'T1301' => Mage::helper('paypalmx')->__('Reauthorization'),\n 'T1302' => Mage::helper('paypalmx')->__('Void'),\n 'T1400' => Mage::helper('paypalmx')->__('General (Dividend)'),\n 'T1500' => Mage::helper('paypalmx')->__('General: temporary hold of a type not belonging to the other T15xx categories'),\n 'T1501' => Mage::helper('paypalmx')->__('Open Authorization'),\n 'T1502' => Mage::helper('paypalmx')->__('ACH Deposit (Hold for Dispute or Other Investigation)'),\n 'T1503' => Mage::helper('paypalmx')->__('Available Balance'),\n 'T1600' => Mage::helper('paypalmx')->__('Funding'),\n 'T1700' => Mage::helper('paypalmx')->__('General: Withdrawal to Non-Bank Entity'),\n 'T1701' => Mage::helper('paypalmx')->__('WorldLink Withdrawal'),\n 'T1800' => Mage::helper('paypalmx')->__('Buyer Credit Payment'),\n 'T1900' => Mage::helper('paypalmx')->__('General Adjustment without businessrelated event'),\n 'T2000' => Mage::helper('paypalmx')->__('General (Funds Transfer from PayPal Account to Another)'),\n 'T2001' => Mage::helper('paypalmx')->__('Settlement Consolidation'),\n 'T9900' => Mage::helper('paypalmx')->__('General: event not yet categorized'),\n );\n asort(self::$_eventList);\n }\n }",
"function main($content, $conf) {\n\n\t\t// some basic stuff:\n\t\t$ts = time();\n\t\t$base_url = $GLOBALS['TSFE']->tmpl->setup['config.']['baseURL'];\n\t\t$this->eventRecordPid = $conf['eventRecordPid'];\n\t\t\n\t\t$content = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n\t\t<rss version=\"2.0\" >\n\t\t<channel>';\n\t\t\n\t\t$content .= '<title>RSS Feed YOURWEBSITE.TLD</title>\n\t\t\t\t\t<link>http://www.YOURWEBSITE.TLD</link>\n\t\t\t\t\t<description>Alle Veranstaltungen im Ueberblick</description>';\n\t\t$content .= '<language>de-de</language>\n\t\t\t\t\t<copyright>'. date('Y') .' by YOURWEBSITE.TLD</copyright>';\n\t\t\n\t\t$content .= '<image>\n\t\t\t<title>Aktuelle Veranstaltungen</title>\n\t\t\t<url>http://YOURWEBSITE.TLD/typo3conf/ext/kb_eventboard/res/rss_icon_16x16.gif</url>\n\t\t\t<link>http://www.YOURWEBSITE.TLD/</link>\n\t\t\t<width>16</width>\n\t\t\t<height>16</height>\n\t\t\t<description>Aktuelle Veranstaltungen</description>\n\t\t</image>';\n\n\t\t\t\t\n\t\t\t\t$select_fields = '*';\n\t\t\t\t$from_table = 'tx_kbeventboard_events'; // table of your extension\n\t\t\t\t$where = \"pid = \".$this->eventRecordPid.\" AND deleted = 0 AND hidden = 0 AND datebegin > \".$ts.\"\";\n\t\n\t\t\t\t$group = '';\n\t\t\t\t$order = 'datebegin ASC';\n\t\t\t\t$limit = '40';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select_fields, $from_table, $where, $group, $order, $limit);\n\t\t\t\t\n\t\t\t\t$sql = $GLOBALS['TYPO3_DB']->SELECTquery($select_fields, $from_table, $where, $group, $order, $limit);\n\n\n\t\t\t\t// now put in all the items:\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\n\t\t\t\t\t$pubDate = date('D, d M Y H:i:s O', $row[\"datebegin\"]); // timestamp in the correct format for the rss feed\n\t\t\t\t\t$link_to_detailpage = $base_url . 'index.php?id='.$conf[\"singlePid\"].'&tx_kbeventboard_pi1[evt]='.$row[\"uid\"]; // link to the page with the detail view\n\t\t\t\t\t$description = substr(strip_tags($row[\"eventdescription\"]), 0, $conf[\"maxChars\"]) . ' [...]';\n\t\t\t\t\t$eventTitle = strip_tags($row[\"eventname\"]);\n\t\t\t\t\t\n\t\t\t\t\t$filter = array(\n\t\t\t\t\t\t\t\t' '=>'', '"e;'=>'\"', '& ' => ' +'\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach ($filter as $from => $to) {\n\t\t\t\t\t\t$description = str_replace($from, $to, $description);\n\t\t\t\t\t\t$eventTitle = str_replace($from, $to, $eventTitle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t$content .= '<item>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<title>'.date('d-m-Y',$row[\"datebegin\"]).': '.$eventTitle.'</title>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<link>'.$link_to_detailpage.'</link>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<description>'.$description.'</description>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<guid>'.$link_to_detailpage.'</guid>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<pubdate>'.$pubDate.'</pubdate>' . \"\\n\";\n\t\t\t\t\t$content .= '</item>';\n\t\t\t\t}\n\n\t\t\t$content .= '</channel>';\n\t\t$content .= '</rss>';\n\n\t\treturn $content;\n\t}",
"public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }",
"public function get_event_list()\n\t{\n\treturn $this->cal['VEVENT'];\n\t}",
"function printEventsList($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template_lst');\n\t \t$groupby = get_option('fse_groupby');\n\t \t$groupby_hdr = get_option('fse_groupby_header');\n\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\tif (is_bool($a))\n\t \t\t\t\t$echo = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby':\n\t \t\t\t\tif (in_array($a, array('','d','m','y')))\n\t \t\t\t\t$groupby = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby_header':\n\t \t\t\t\t$groupby_hdr = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\n\t \t\t}\n\t \t}\n\n\t \t// Sort must be by date, the user can choos, if asc or desc...\n\t \tif (isset($filter['orderby'])) {\n\t \t\tunset($filter['orderby']);\n\t \t}\n\t \t$filter['orderby'] = array('datefrom');\n\n\t \tif (isset($filter['orderdir'])) {\n\t \t\t$dir = $filter['orderdir'];\n\t \t\tif (isset($dir[0]))\n\t \t\t$dir = $dir[0];\n\t \t\telse\n\t \t\t$dir = 'asc';\n\t \t\tunset($filter['orderdir']);\n\t \t} else {\n\t \t\t$dir = 'asc';\n\t \t}\n\t \t$filter['orderdir'] = array($dir);\n\n\t \t$ret = '';\n\n\t \t$evt = $this->getEventsExternal($args);\n\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tif ($evt !== false) {\n\t \t\t$d = $m = $y = -1;\n\t \t\tforeach($evt as $e) {\n\t \t\t\t$dn = $e->getStart('d');\n\t \t\t\t$mn = $e->getStart('m');\n\t \t\t\t$yn = $e->getStart('y');\n\n\t \t\t\tif (($groupby == 'y' && $yn != $y) ||\n\t \t\t\t($groupby == 'm' && ($yn != $y || $mn != $m)) ||\n\t \t\t\t($groupby == 'd' && ($yn != $y || $mn != $m || $dn != $d))) {\n\n\t \t\t\t\t//echo $yn.'-'.$y.':'.$mn.'-'.$m.'<br />';\n\n\t \t\t\t\tif ($d != -1) {\n\t \t\t\t\t\t$ret .= '</ul></li>';\n\t \t\t\t\t}\n\t \t\t\t\t$ret .= '<li class=\"event_header\">'.$e->getStart($groupby_hdr).'<ul class=\"events\">';\n\t \t\t\t\t$d = $dn;\n\t \t\t\t\t$m = $mn;\n\t \t\t\t\t$y = $yn;\n\t \t\t\t}\n\t \t\t\t$ret .= '<li class=\"event\" id=\"event-'.$e->eventid.'\">';\n\t \t\t\t$ret .= $this->filterContent($template, $e);\n\t \t\t\t$ret .= '</li>';\n\t \t\t}\n\t \t\tif ($d != -1) {\n\t \t\t\t$ret .= '</ul></li>';\n\t \t\t}\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.'<ul class=\"groups\">'.$ret.'</ul>'.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }",
"public function createEvents()\n {\n //\n\n return 'something';\n }",
"public function londontec_event(){\n\t \n\t\t$id = $this->uri->segment(3);\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_londontec_event';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Create londotec event',\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n \n\t}",
"public function listNextAction()\n {\n $date = \\FreeBet\\Bundle\\UIBundle\\Services\\DateManager::getUtcDateTime();\n $events = $this->get('free_bet.event.repository')->findNextEvents($date);\n\n return $this->render('FreeBetCompetitionBundle:Event:listNext.html.twig', array(\n 'events' => $events\n ));\n }",
"public function renderList()\n {\n $html = '';\n foreach ($this->data as $listItem) {\n $html .= $this->render($listItem);\n }\n return $html;\n }",
"private function renderInWrapper () {\n\t\t//open the generic application wrapper template\n\t\t/*\n\t\t$C = __CLASS__;\n\t\t$st = new $C();\n\t\t$st->init(null, \"wrapper\");\n\t\t$st->set(\"content\", $this->fetch());\n\t\t$st->render(true);\n\t\t*/\n\t}",
"function RenderListRow() {\n\t\tglobal $conn, $Security;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// C_EVENT_ID\n\n\t\t$this->C_EVENT_ID->CellCssStyle = \"\"; $this->C_EVENT_ID->CellCssClass = \"\";\n\t\t$this->C_EVENT_ID->CellAttrs = array(); $this->C_EVENT_ID->ViewAttrs = array(); $this->C_EVENT_ID->EditAttrs = array();\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID->CellCssStyle = \"\"; $this->FK_CONGTY_ID->CellCssClass = \"\";\n\t\t$this->FK_CONGTY_ID->CellAttrs = array(); $this->FK_CONGTY_ID->ViewAttrs = array(); $this->FK_CONGTY_ID->EditAttrs = array();\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT->CellCssStyle = \"\"; $this->C_TYPE_EVENT->CellCssClass = \"\";\n\t\t$this->C_TYPE_EVENT->CellAttrs = array(); $this->C_TYPE_EVENT->ViewAttrs = array(); $this->C_TYPE_EVENT->EditAttrs = array();\n\n\t\t// C_POST\n\t\t$this->C_POST->CellCssStyle = \"\"; $this->C_POST->CellCssClass = \"\";\n\t\t$this->C_POST->CellAttrs = array(); $this->C_POST->ViewAttrs = array(); $this->C_POST->EditAttrs = array();\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->CellCssStyle = \"\"; $this->C_DATETIME_BEGIN->CellCssClass = \"\";\n\t\t$this->C_DATETIME_BEGIN->CellAttrs = array(); $this->C_DATETIME_BEGIN->ViewAttrs = array(); $this->C_DATETIME_BEGIN->EditAttrs = array();\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->CellCssStyle = \"\"; $this->C_DATETIME_END->CellCssClass = \"\";\n\t\t$this->C_DATETIME_END->CellAttrs = array(); $this->C_DATETIME_END->ViewAttrs = array(); $this->C_DATETIME_END->EditAttrs = array();\n\n\t\t// C_ODER\n\t\t$this->C_ODER->CellCssStyle = \"\"; $this->C_ODER->CellCssClass = \"\";\n\t\t$this->C_ODER->CellAttrs = array(); $this->C_ODER->ViewAttrs = array(); $this->C_ODER->EditAttrs = array();\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->CellCssStyle = \"\"; $this->C_USER_ADD->CellCssClass = \"\";\n\t\t$this->C_USER_ADD->CellAttrs = array(); $this->C_USER_ADD->ViewAttrs = array(); $this->C_USER_ADD->EditAttrs = array();\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->CellCssStyle = \"\"; $this->C_ADD_TIME->CellCssClass = \"\";\n\t\t$this->C_ADD_TIME->CellAttrs = array(); $this->C_ADD_TIME->ViewAttrs = array(); $this->C_ADD_TIME->EditAttrs = array();\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->CellCssStyle = \"\"; $this->C_USER_EDIT->CellCssClass = \"\";\n\t\t$this->C_USER_EDIT->CellAttrs = array(); $this->C_USER_EDIT->ViewAttrs = array(); $this->C_USER_EDIT->EditAttrs = array();\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->CellCssStyle = \"\"; $this->C_EDIT_TIME->CellCssClass = \"\";\n\t\t$this->C_EDIT_TIME->CellAttrs = array(); $this->C_EDIT_TIME->ViewAttrs = array(); $this->C_EDIT_TIME->EditAttrs = array();\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE->CellCssStyle = \"\"; $this->C_ACTIVE_LEVELSITE->CellCssClass = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->CellAttrs = array(); $this->C_ACTIVE_LEVELSITE->ViewAttrs = array(); $this->C_ACTIVE_LEVELSITE->EditAttrs = array();\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->CellCssStyle = \"\"; $this->C_TIME_ACTIVE->CellCssClass = \"\";\n\t\t$this->C_TIME_ACTIVE->CellAttrs = array(); $this->C_TIME_ACTIVE->ViewAttrs = array(); $this->C_TIME_ACTIVE->EditAttrs = array();\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL->CellCssStyle = \"\"; $this->C_SEND_MAIL->CellCssClass = \"\";\n\t\t$this->C_SEND_MAIL->CellAttrs = array(); $this->C_SEND_MAIL->ViewAttrs = array(); $this->C_SEND_MAIL->EditAttrs = array();\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE->CellCssStyle = \"\"; $this->C_FK_BROWSE->CellCssClass = \"\";\n\t\t$this->C_FK_BROWSE->CellAttrs = array(); $this->C_FK_BROWSE->ViewAttrs = array(); $this->C_FK_BROWSE->EditAttrs = array();\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI->CellCssStyle = \"\"; $this->FK_ARRAY_TINBAI->CellCssClass = \"\";\n\t\t$this->FK_ARRAY_TINBAI->CellAttrs = array(); $this->FK_ARRAY_TINBAI->ViewAttrs = array(); $this->FK_ARRAY_TINBAI->EditAttrs = array();\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY->CellCssStyle = \"\"; $this->FK_ARRAY_CONGTY->CellCssClass = \"\";\n\t\t$this->FK_ARRAY_CONGTY->CellAttrs = array(); $this->FK_ARRAY_CONGTY->ViewAttrs = array(); $this->FK_ARRAY_CONGTY->EditAttrs = array();\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID->ViewValue = $this->C_EVENT_ID->CurrentValue;\n\t\t$this->C_EVENT_ID->CssStyle = \"\";\n\t\t$this->C_EVENT_ID->CssClass = \"\";\n\t\t$this->C_EVENT_ID->ViewCustomAttributes = \"\";\n\n\t\t// FK_CONGTY_ID\n\t\tif (strval($this->FK_CONGTY_ID->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`PK_MACONGTY` = \" . ew_AdjustSql($this->FK_CONGTY_ID->CurrentValue) . \"\";\n\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_CONGTY_ID->ViewValue = $rswrk->fields('C_TENCONGTY');\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_CONGTY_ID->ViewValue = $this->FK_CONGTY_ID->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_CONGTY_ID->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_CONGTY_ID->CssStyle = \"\";\n\t\t$this->FK_CONGTY_ID->CssClass = \"\";\n\t\t$this->FK_CONGTY_ID->ViewCustomAttributes = \"\";\n\n\t\t// C_TYPE_EVENT\n\t\tif (strval($this->C_TYPE_EVENT->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_TYPE_EVENT->CurrentValue) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai Popup\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai su kien theo bai viet\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"3\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai su kien lien ket\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = $this->C_TYPE_EVENT->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_TYPE_EVENT->ViewValue = NULL;\n\t\t}\n\t\t$this->C_TYPE_EVENT->CssStyle = \"\";\n\t\t$this->C_TYPE_EVENT->CssClass = \"\";\n\t\t$this->C_TYPE_EVENT->ViewCustomAttributes = \"\";\n\n\t\t// C_POST\n\t\tif (strval($this->C_POST->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_POST->CurrentValue) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"trang chu\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"trang tuyen sinh\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_POST->ViewValue = $this->C_POST->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_POST->ViewValue = NULL;\n\t\t}\n\t\t$this->C_POST->CssStyle = \"\";\n\t\t$this->C_POST->CssClass = \"\";\n\t\t$this->C_POST->ViewCustomAttributes = \"\";\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->ViewValue = $this->C_DATETIME_BEGIN->CurrentValue;\n\t\t$this->C_DATETIME_BEGIN->ViewValue = ew_FormatDateTime($this->C_DATETIME_BEGIN->ViewValue, 7);\n\t\t$this->C_DATETIME_BEGIN->CssStyle = \"\";\n\t\t$this->C_DATETIME_BEGIN->CssClass = \"\";\n\t\t$this->C_DATETIME_BEGIN->ViewCustomAttributes = \"\";\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->ViewValue = $this->C_DATETIME_END->CurrentValue;\n\t\t$this->C_DATETIME_END->ViewValue = ew_FormatDateTime($this->C_DATETIME_END->ViewValue, 7);\n\t\t$this->C_DATETIME_END->CssStyle = \"\";\n\t\t$this->C_DATETIME_END->CssClass = \"\";\n\t\t$this->C_DATETIME_END->ViewCustomAttributes = \"\";\n\n\t\t// C_ODER\n\t\t$this->C_ODER->ViewValue = $this->C_ODER->CurrentValue;\n\t\t$this->C_ODER->ViewValue = ew_FormatDateTime($this->C_ODER->ViewValue, 7);\n\t\t$this->C_ODER->CssStyle = \"\";\n\t\t$this->C_ODER->CssClass = \"\";\n\t\t$this->C_ODER->ViewCustomAttributes = \"\";\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->ViewValue = $this->C_USER_ADD->CurrentValue;\n\t\t$this->C_USER_ADD->CssStyle = \"\";\n\t\t$this->C_USER_ADD->CssClass = \"\";\n\t\t$this->C_USER_ADD->ViewCustomAttributes = \"\";\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->ViewValue = $this->C_ADD_TIME->CurrentValue;\n\t\t$this->C_ADD_TIME->ViewValue = ew_FormatDateTime($this->C_ADD_TIME->ViewValue, 7);\n\t\t$this->C_ADD_TIME->CssStyle = \"\";\n\t\t$this->C_ADD_TIME->CssClass = \"\";\n\t\t$this->C_ADD_TIME->ViewCustomAttributes = \"\";\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->ViewValue = $this->C_USER_EDIT->CurrentValue;\n\t\t$this->C_USER_EDIT->CssStyle = \"\";\n\t\t$this->C_USER_EDIT->CssClass = \"\";\n\t\t$this->C_USER_EDIT->ViewCustomAttributes = \"\";\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->ViewValue = $this->C_EDIT_TIME->CurrentValue;\n\t\t$this->C_EDIT_TIME->ViewValue = ew_FormatDateTime($this->C_EDIT_TIME->ViewValue, 7);\n\t\t$this->C_EDIT_TIME->CssStyle = \"\";\n\t\t$this->C_EDIT_TIME->CssClass = \"\";\n\t\t$this->C_EDIT_TIME->ViewCustomAttributes = \"\";\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\tif (strval($this->C_ACTIVE_LEVELSITE->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_ACTIVE_LEVELSITE->CurrentValue) {\n\t\t\t\tcase \"0\":\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = \"khong kich hoat\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = \"Kich hoat\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = $this->C_ACTIVE_LEVELSITE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = NULL;\n\t\t}\n\t\t$this->C_ACTIVE_LEVELSITE->CssStyle = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->CssClass = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->ViewCustomAttributes = \"\";\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->ViewValue = $this->C_TIME_ACTIVE->CurrentValue;\n\t\t$this->C_TIME_ACTIVE->ViewValue = ew_FormatDateTime($this->C_TIME_ACTIVE->ViewValue, 7);\n\t\t$this->C_TIME_ACTIVE->CssStyle = \"\";\n\t\t$this->C_TIME_ACTIVE->CssClass = \"\";\n\t\t$this->C_TIME_ACTIVE->ViewCustomAttributes = \"\";\n\n\t\t// C_SEND_MAIL\n\t\tif (strval($this->C_SEND_MAIL->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_SEND_MAIL->CurrentValue) {\n\t\t\t\tcase \"0\":\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = \"khong gui mail\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = \"gui mail\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = $this->C_SEND_MAIL->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_SEND_MAIL->ViewValue = NULL;\n\t\t}\n\t\t$this->C_SEND_MAIL->CssStyle = \"\";\n\t\t$this->C_SEND_MAIL->CssClass = \"\";\n\t\t$this->C_SEND_MAIL->ViewCustomAttributes = \"\";\n\n\t\t// C_FK_BROWSE\n\t\tif (strval($this->C_FK_BROWSE->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->C_FK_BROWSE->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`C_HOTEN` = '\" . ew_AdjustSql(trim($wrk)) . \"'\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_EMAIL` FROM `t_nguoidung`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->C_FK_BROWSE->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->C_FK_BROWSE->ViewValue .= $rswrk->fields('C_EMAIL');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->C_FK_BROWSE->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->C_FK_BROWSE->ViewValue = $this->C_FK_BROWSE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_FK_BROWSE->ViewValue = NULL;\n\t\t}\n\t\t$this->C_FK_BROWSE->CssStyle = \"\";\n\t\t$this->C_FK_BROWSE->CssClass = \"\";\n\t\t$this->C_FK_BROWSE->ViewCustomAttributes = \"\";\n\n\t\t// FK_ARRAY_TINBAI\n\t\tif (strval($this->FK_ARRAY_TINBAI->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->FK_ARRAY_TINBAI->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`PK_TINBAI_ID` = \" . ew_AdjustSql(trim($wrk)) . \"\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_TITLE` FROM `t_tinbai_levelsite`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue .= $rswrk->fields('C_TITLE');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->FK_ARRAY_TINBAI->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = $this->FK_ARRAY_TINBAI->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_ARRAY_TINBAI->CssStyle = \"\";\n\t\t$this->FK_ARRAY_TINBAI->CssClass = \"\";\n\t\t$this->FK_ARRAY_TINBAI->ViewCustomAttributes = \"\";\n\n\t\t// FK_ARRAY_CONGTY\n\t\tif (strval($this->FK_ARRAY_CONGTY->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->FK_ARRAY_CONGTY->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`PK_MACONGTY` = \" . ew_AdjustSql(trim($wrk)) . \"\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue .= $rswrk->fields('C_TENCONGTY');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->FK_ARRAY_CONGTY->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = $this->FK_ARRAY_CONGTY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_ARRAY_CONGTY->CssStyle = \"\";\n\t\t$this->FK_ARRAY_CONGTY->CssClass = \"\";\n\t\t$this->FK_ARRAY_CONGTY->ViewCustomAttributes = \"\";\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID->HrefValue = \"\";\n\t\t$this->C_EVENT_ID->TooltipValue = \"\";\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID->HrefValue = \"\";\n\t\t$this->FK_CONGTY_ID->TooltipValue = \"\";\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT->HrefValue = \"\";\n\t\t$this->C_TYPE_EVENT->TooltipValue = \"\";\n\n\t\t// C_POST\n\t\t$this->C_POST->HrefValue = \"\";\n\t\t$this->C_POST->TooltipValue = \"\";\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->HrefValue = \"\";\n\t\t$this->C_DATETIME_BEGIN->TooltipValue = \"\";\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->HrefValue = \"\";\n\t\t$this->C_DATETIME_END->TooltipValue = \"\";\n\n\t\t// C_ODER\n\t\t$this->C_ODER->HrefValue = \"\";\n\t\t$this->C_ODER->TooltipValue = \"\";\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->HrefValue = \"\";\n\t\t$this->C_USER_ADD->TooltipValue = \"\";\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->HrefValue = \"\";\n\t\t$this->C_ADD_TIME->TooltipValue = \"\";\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->HrefValue = \"\";\n\t\t$this->C_USER_EDIT->TooltipValue = \"\";\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->HrefValue = \"\";\n\t\t$this->C_EDIT_TIME->TooltipValue = \"\";\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE->HrefValue = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->TooltipValue = \"\";\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->HrefValue = \"\";\n\t\t$this->C_TIME_ACTIVE->TooltipValue = \"\";\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL->HrefValue = \"\";\n\t\t$this->C_SEND_MAIL->TooltipValue = \"\";\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE->HrefValue = \"\";\n\t\t$this->C_FK_BROWSE->TooltipValue = \"\";\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI->HrefValue = \"\";\n\t\t$this->FK_ARRAY_TINBAI->TooltipValue = \"\";\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY->HrefValue = \"\";\n\t\t$this->FK_ARRAY_CONGTY->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"public function renderContentBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderBodyRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n return \"<ul class='product-list'>\\n\" . implode(\"\\n\", $rows) . \"\\n</ul>\";\n }",
"public function auto_build_list_content($data){\r\n\t\treturn $this->auto_build_list_thead() .\r\n\t\t\t$this->auto_build_list_tbody($data);\r\n\t}",
"public function displayEventWidget($attrs) {\n $widget = new EventsWidget();\n \n ob_start();\n $widget->widget([], $attrs);\n return ob_get_clean();\n }",
"public function indexAction()\n {\n $listToken = Mage::app()->getRequest()->getParam('t');\n $data = $this->getInputStream();\n\n $this->consumeEvents($listToken, $data);\n }",
"public function getSource()\n\t\t{\n\t\t\t$html = '<ul';\n\t\t\tif ($this->id) $html .= ' id=\"'.$this->id.'\"';\n\t\t\tif ($this->className) $html .= ' class=\"'.$this->className.'\"';\n\t\t\t$html .= $this->getStyle().\">\";\n\t\t\tforeach ($this->items as $i) $html .= $i->getSource();\n\t\t\t$html .= '</ul>';\n\t\t\treturn $html;\n\t\t}",
"public function getEventsJs()\n\t{\n\n\t\t$return = '';\n\t\tif (null !== $this->resources->itemAt('events'))\n\t\t{\n\t\t\tforeach ($this->resources->itemAt('events') as $event)\n\t\t\t{\n\t\t\t\t$return .= $event->toJs($this->getJsName());\n\t\t\t\t$return .= \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}",
"function printEvents($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template');\n\t \t$showend = get_option('fse_show_enddate');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\t$echo = ($a == true ? true : false);\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'alwaysshowenddate':\n\t \t\t\t\t$showend = ($a == true ? true : false);\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\t \t\t}\n\t \t}\n\n\t \t$ret = '';\n\t \t$evt = $this->getEventsExternal($args);\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tforeach($evt as $e) {\n\t \t\t$ret .= $this->filterContent($template, $e);\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.$ret.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }",
"public static function entries_inner () \n {\n $html = null;\n\n $top = self::entries_top();\n $inner = self::entries_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'entries', $top, $inner, $bottom );\n\n return $html;\n }",
"public function viewEvents();",
"public function listEventsAction()\n {\n $events = $this->getDoctrine()->getRepository('AppBundle:Event')->findEventsByManager($this->getUser());\n\n return $this->render('AppBundle:frontend/manager:event_list.html.twig', [\n 'events' => $events,\n ]);\n }",
"private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}",
"public function __toString(){\n\t\t\n\t\t// The string we return is outputted by the echo statement\n\t\t\n\t\t\treturn '\n\t\t\t\t<li id=\"todo-'.$this->data['resultat_id'].'\" class=\"todo ' . $this->data['castell_id'] . '\">\n\t\t\t\t\t<div class=\"prova\">'.$this->data['castell_id'].'\n\t\t\t\t\t<span class=\"text\">'.$this->data['resultat'].'</span></div>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"actions\">\n\t\t\t\t\t\t<a href=\"#\" class=\"edit no_print\">Edit</a>\n\t\t\t\t\t\t<a href=\"#\" class=\"delete no_print\">Delete</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</li>';\n\t}",
"public function createIndexHTML() {\r\n\t\t//Declare $res variable from blogStatement\r\n\t\t$res = $this->blogstate->blogStatement();\r\n\r\n\t\t$HTML = \"\";\r\n\t\t//Adding the news items.\r\n\t\tforeach($res AS $key => $val) {\r\n\t\t\t$HTML .= \r\n\t\t\t\t\"<div class='col-md-4'>\r\n\t\t\t\t\t<h2><a href='newsitem.php?slug=\". $val->slug .\"'>{$val->title}</a></h2>\r\n \t\t\t\t\t<p>{$this->handleString($val->DATA, $val->slug, $val->FILTER)}</p>\r\n \t\t\t\t</div>\r\n\t\t\t\t\";\r\n\t\t}\r\n\t\treturn $HTML;\r\n\t}",
"function display_postasevent_demo() {\n\techo '<table><tbody>';\n\techo '<tr><th>Event Start Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_start_date', true ) ) . '</td></tr>';\n\techo '<tr><th>Event Start Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_start_time', true ) . '</td></tr>';\n\n\techo '<tr style=\"background-color:rgba(81, 136, 230, 0.66);\"><th>Event End Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_end_date', true ) ) . '</td></tr>';\n\techo '<tr style=\"background-color:rgba(81, 136, 230, 0.66);\"><th>Event End Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_end_time', true ) . '</td></tr>';\n\n\techo '<tr><th>Registration Deadline Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_reg_date', true ) ) . '</td></tr>';\n\techo '<tr><th>Registration Deadline Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_reg_time', true ) . '</td></tr>';\n\techo '</tbody></table>';\n}",
"public function renderList()\n {\n $pages = $this->module->getAllHTMLPages(true /* get inactive as well */);\n $content = '';\n\n if (!$pages)\n return $content;\n\n foreach ($pages as $i => $page) {\n $pages[$i]['full_url'] = $this->module->getFullURLForPage($pages[$i], $pages);\n }\n\n $fieldsList = [\n 'id_page' => [\n 'title' => 'ID',\n 'align' => 'center',\n 'class' => 'fixed-width-xs',\n ],\n 'name' => [\n 'title' => $this->l('Name'),\n ],\n 'full_url' => [\n 'title' => $this->l('Full URL'),\n ],\n 'active' => [\n 'title' => $this->l('Active'),\n 'active' => 'status',\n 'type' => 'bool',\n ]\n ];\n\n $helper = new HelperList();\n $helper->shopLinkType = '';\n $helper->simple_header = true;\n $helper->actions = [\"edit\", \"delete\", ];\n $helper->show_toolbar = false;\n $helper->module = $this;\n $helper->listTotal = count($pages);\n $helper->identifier = 'id_page';\n $helper->position_identifier = 'id_page';\n $helper->title = \"Custom Pages\";\n $helper->orderBy = 'full_url';\n $helper->orderWay = 'DESC';\n $helper->table = $this->table;\n $helper->token = Tools::getAdminTokenLite('AdminCustomHTMLPages');\n $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;\n\n $content .= $helper->generateList($pages, $fieldsList);\n\n return $content;\n }",
"public function eventSchedule()\n {\n $speakerName = array(\n \"daniela-pitta\"\n ,\"helena-saminez\"\n ,\"galvao-abbott\"\n ,\"bruno-porkaria\"\n ,\"atmos-maciel\"\n ,\"evaldo-barbosa\"\n ,\"fabio-soares\"\n ,\"nanderson-castro\"\n ,\"ricardo-coelho\"\n ,\"willian-mano\"\n ,\"romulo-martins\"\n ,\"alisson-gomes\"\n ,\"henrique-monteiro\"\n ,\"paulo-coelho\"\n );\n\n return $this->app['twig']->render('/when/when.twig',\n [\n 'link_when' => 'quando'\n ,'link_who' => '/quem'\n ,'speakerName' => $speakerName\n ]\n );\n }"
] | [
"0.6842564",
"0.6603555",
"0.6529645",
"0.6372589",
"0.6218623",
"0.61129034",
"0.60898525",
"0.6053805",
"0.59469587",
"0.58949643",
"0.5894375",
"0.5858712",
"0.5826435",
"0.5808398",
"0.5785451",
"0.57779014",
"0.5746479",
"0.57371944",
"0.57312787",
"0.5708856",
"0.57039016",
"0.56958276",
"0.5690239",
"0.5675039",
"0.5651295",
"0.5629465",
"0.5619414",
"0.56131375",
"0.5605242",
"0.5601004",
"0.5586947",
"0.5582737",
"0.5574511",
"0.556777",
"0.55430406",
"0.5529077",
"0.5528201",
"0.55088496",
"0.5487194",
"0.5481198",
"0.54651994",
"0.546192",
"0.54502684",
"0.5428904",
"0.54256517",
"0.53696555",
"0.5367487",
"0.53633446",
"0.5358832",
"0.53582376",
"0.5350306",
"0.5344854",
"0.53375244",
"0.5336924",
"0.53322095",
"0.533081",
"0.53292394",
"0.53152543",
"0.52955395",
"0.5294713",
"0.52933824",
"0.5287193",
"0.5279881",
"0.5277091",
"0.5271526",
"0.5261434",
"0.5261432",
"0.52598435",
"0.52548826",
"0.5251104",
"0.5247785",
"0.524264",
"0.52376115",
"0.52319235",
"0.52301663",
"0.5225668",
"0.52255905",
"0.5222682",
"0.52187115",
"0.5215502",
"0.5212748",
"0.5211998",
"0.521193",
"0.52101195",
"0.5199911",
"0.51984066",
"0.5192874",
"0.5179293",
"0.5172871",
"0.51684785",
"0.5163374",
"0.5160585",
"0.51581013",
"0.51505923",
"0.51498026",
"0.51463735",
"0.51334095",
"0.51308316",
"0.5130445",
"0.51290447"
] | 0.62439334 | 4 |
Display the filter form for the events | function obj_do_cx_events_list_filter( $events ) {
$months = evt_helper_get_year_months( $events );
$types = evt_helper_get_event_types( $events );
$search_term = evt_helper_get_search_term();
$reset_display = 'none';
if ('' !== $search_term ) {
$reset_display = 'block';
}
?>
<div class="event-list-filter__wrap">
<!-- <div class="event-search-form-wrap">
<form method="get" action="/events/">
<div class="event-search-form-inner">
<input type="search" value="<?php echo $search_term; ?>" name="evtq" placeholder="Search" class="input-search" />
<button class="btn-search">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
</div> -->
<div class="select-wrap">
<select name="event-list__month" id="event-list__month">
<option value="all">When</option>
<?php foreach ( $months as $abbr => $month ) : ?>
<option value="<?php echo $abbr; ?>"><?php echo $month; ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="select-wrap">
<select name="event-list__type" id="event-list__type">
<option value="all">Type</option>
<?php foreach ( $types as $abbr => $type ) : ?>
<option value="<?php echo $abbr; ?>"><?php echo $type; ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="filter-reset" style="display:<?php echo $reset_display; ?>">Reset</div>
</div>
<span style="display: none;" class="no-events-shown-message grande-text">No results seem to match your search. Adjust the filters to see what other events may be relevant for you.</span>
<?php
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _report_filters_ui()\n\t{\n\t\t$filter = View::factory('actionable_filter');\n\t\t$filter->render(TRUE);\n\t}",
"function ShowFilterList() {\n\t\tglobal $dealers_reports;\n\t\tglobal $ReportLanguage;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\n\t\t// Field StartDate\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($dealers_reports->StartDate, $sExtWrk, $dealers_reports->StartDate->DateFilter);\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $dealers_reports->StartDate->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \" $sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \" $sWrk<br>\";\n\n\t\t// Show Filters\n\t\tif ($sFilterList <> \"\")\n\t\t\techo $ReportLanguage->Phrase(\"CurrentFilters\") . \"<br>$sFilterList\";\n\t}",
"function FilterForm()\n\t{\tob_start();\n\t\techo '<form class=\"akFilterForm\"><span>Filter</span><input type=\"text\" name=\"filter\" value=\"', $this->InputSafeString($this->filter), '\" /><input type=\"submit\" class=\"submit\" value=\"Get\" /><div class=\"clear\"></div></form>';\n\t\treturn ob_get_clean();\n\t}",
"function ShowFilterList() {\n\t\tglobal $deals_details;\n\t\tglobal $ReportLanguage;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\n\t\t// Field dealer\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($deals_details->dealer, $sExtWrk, \"\");\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $deals_details->dealer->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \" $sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \" $sWrk<br>\";\n\n\t\t// Field date_start\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($deals_details->date_start, $sExtWrk, $deals_details->date_start->DateFilter);\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $deals_details->date_start->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \" $sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \" $sWrk<br>\";\n\n\t\t// Field status\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($deals_details->status, $sExtWrk, \"\");\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $deals_details->status->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \" $sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \" $sWrk<br>\";\n\n\t\t// Show Filters\n\t\tif ($sFilterList <> \"\")\n\t\t\techo $ReportLanguage->Phrase(\"CurrentFilters\") . \"<br>$sFilterList\";\n\t}",
"public function renderFilters()\n {\n $this->timber->filter->issueDetect();\n $this->timber->filter->configLibs();\n $this->timber->security->cookieCheck();\n $this->services->Common->renderFilter(array('staff', 'admin'), '/admin/calendar');\n\n if( !($this->timber->access->checkPermission('view.calendar')) ){\n $this->timber->redirect( $this->timber->config('request_url') . '/404' );\n }\n }",
"public function show(Events $events)\n {\n //\n }",
"public function showEvents($args)\n {\n $view = Zikula_View::getInstance($this->name);\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Event');\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n $firstLoad = FormUtil::getPassedValue(\"firstLoad\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n\n // $start = $startlimit + $eventlimit;\n $start = $startlimit;\n if ($firstLoad) {\n // $start = 0;\n }\n // $limit = $start;\n $limit = $start + 10;\n $end = $eventlimit;\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND b.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND b.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND b.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND b.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND b.shop_id=$shop_id\";\n }\n $join = \"\";\n if (!empty($category_id)) {\n $append .= \" AND c.category_id=$category_id \";\n $join = \" INNER JOIN zselex_shop_to_category c ON c.shop_id=b.shop_id \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND b.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (b.shop_name LIKE :search OR MATCH (b.shop_name) AGAINST (:search2) OR b.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n $event_args = array(\n 'append' => $append,\n 'join' => $join,\n 'setParams' => $setParams,\n 'start' => $start,\n 'end' => $end\n );\n\n // echo \"<pre>\"; print_r($event_args); echo \"</pre>\";\n $result = $repo->getAllEvents($event_args);\n\n $count = $repo->getAllEventsCount(array(\n 'append' => $append,\n 'join' => $join,\n 'setParams' => $setParams\n ));\n\n /*\n * $countNext = $repo->getAllEventsCount(\n * array('append' => $append,\n * 'join' => $join,\n * 'setParams' => $setParams,\n * 'start' => $start + 10,\n * 'end' => $end\n * ));\n */\n } else {\n\n $count = 0;\n }\n\n $counts = $countNext;\n\n $data = '';\n $view->assign('limit', $limit);\n $view->assign('events', $result);\n $view->assign('count', $count);\n $view->assign('counts', $counts);\n $output_tpl = $view->fetch('ajax/show_all_events.tpl');\n $data .= new Zikula_Response_Ajax_Plain($output_tpl);\n // $data[\"data\"] = $output;\n AjaxUtil::output($data);\n }",
"function theme_simplenews_filter_form($variables) {\n $form = $variables['form'];\n\n $output = '<div id=\"simplenews-admin-filter\">';\n $output .= drupal_render($form['filters']);\n $output .= '</div>';\n $output .= drupal_render_children($form);\n return $output;\n}",
"public function showEvents2($args)\n {\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n if (isset($startlimit) && !empty($startlimit)) {\n $pageLimit = $startlimit;\n } else {\n $pageLimit = '0';\n }\n $loadCount = $pageLimit + $eventlimit;\n // echo $loadCount;\n $reset = FormUtil::getPassedValue(\"reset\");\n // echo $reset; exit;\n if (!empty($eventlimit)) {\n $limit = $eventlimit;\n $limitquery = \"LIMIT 0 , $eventlimit\";\n } else {\n $limit = \"2\";\n $limitquery = \"LIMIT 0 , $limit\";\n }\n\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n // $shops = ModUtil::apiFunc('ZSELEX', 'admin', 'getShop', $items);\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND a.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND a.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND a.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND a.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND a.shop_id=$shop_id\";\n }\n if (!empty($category_id)) {\n // $append .= \" AND a.cat_id=$category_id\";\n $append .= \" AND a.shop_id IN(SELECT shop_id FROM zselex_shop_to_category WHERE category_id=$category_id) \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND a.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (a.shop_name LIKE :search OR MATCH (a.shop_name) AGAINST (:search2) OR a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n $result = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getUpcomingEventShops(array(\n 'append' => $append,\n 'setParams' => $setParams,\n 'show_all' => true,\n 'upcommingEvents' => true\n ));\n\n $count = count($result);\n } else {\n\n $count = 0;\n }\n $shopsql = '';\n if ($count > 0) {\n\n foreach ($result as $shopid) {\n $shop_idarray [] = $shopid ['shop_id'];\n }\n\n $shop_ids = implode(\",\", $shop_idarray);\n // foreach ($result as $shop) {\n $shopsql = \" AND a.shop_id IN($shop_ids)\";\n $shopquery1 = \" AND a.shop IN($shop_ids)\";\n\n if ($reset != 'reset') {\n $shopquery = $shopsql;\n } else {\n $shopquery = \"\";\n }\n\n // echo $shopquery;\n\n /*\n * $minmax = \"SELECT MIN( shop_event_startdate ) as mindate , MAX( shop_event_enddate ) as maxdate\n * FROM zselex_shop_events a\n * WHERE a.shop_event_id IS NOT NULL AND UNIX_TIMESTAMP(a.shop_event_startdate) != 0 AND UNIX_TIMESTAMP(a.shop_event_enddate) != 0 AND a.status='1' \" . \" \" . $shopquery . \" \" . $limitquery;\n * //echo $minmax;\n * $q = DBUtil::executeSQL($minmax);\n * $e = $q->fetch();\n */\n $e = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventDates(array(\n 'shopquery' => $shopquery1\n ));\n\n $mindate = $e ['mindate'];\n $maxdate = $e ['maxdate'];\n $mxdates = array(\n \"0\" => $maxdate\n );\n $datearray = array();\n // echo \"mindate : \" . $mindate;\n // echo \"maxdate : \" . $maxdate;\n\n $datearray = $this->createDateRangeArray($mindate, $maxdate);\n $datearray = array_merge($datearray, $mxdates);\n\n $dateCount = count($datearray);\n\n $todayDate = date(\"Y-m-d\");\n $arrays = array();\n\n $i = 0;\n $j = 0;\n foreach ($datearray as $key => $d) {\n if ($d < $todayDate) continue;\n // echo $d . '<br>';\n if ($i == $limit) {\n // break;\n }\n\n /*\n * $sql1 = \"SELECT a.shop_event_id , a.shop_id , a.shop_event_name , a.shop_event_shortdescription , a.shop_event_description , a.shop_event_startdate , a.shop_event_starthour , a.shop_event_startminute , a.shop_event_enddate , a.shop_event_endhour , a.shop_event_endminute,a.price,a.email,a.phone,a.shop_event_venue,\n * b.aff_id , c.aff_image\n * FROM zselex_shop_events a\n * LEFT JOIN zselex_shop b ON b.shop_id=a.shop_id\n * LEFT JOIN zselex_shop_affiliation c ON c.aff_id=b.aff_id\n * WHERE '\" . $d . \"' BETWEEN a.shop_event_startdate AND a.shop_event_enddate AND (a.activation_date<=CURDATE() OR UNIX_TIMESTAMP(a.activation_date) = 0) \" . \" \" . $shopquery;\n * //echo $sql1;\n *\n * $query1 = DBUtil::executeSQL($sql1);\n * $events1 = $query1->fetchAll();\n */\n $events1 = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventBetweenDates(array(\n 'd' => $d,\n 'shopsql' => $shopquery1\n ));\n foreach ($events1 as $get => $owner) {\n $ownerName = ModUtil::apiFunc('ZSELEX',\n 'admin', 'getOwner',\n $args = array(\n 'shop_id' => $owner ['shop_id']\n ));\n $events1 [$get] ['uname'] = $ownerName;\n }\n // echo $events1['shop_event_name'] . '<br>';\n $dates = strtotime(date(\"Y-m-d\", strtotime($d)).\" +$j day\");\n $headlinedates = date('l dS \\o\\f F Y', $dates);\n // echo $headlinedates . '<br>';\n $arrays ['dates'] [$d] = $events1;\n\n // echo \"<pre>\"; print_r($events1); echo \"</pre>\";\n // $datearray[$key]['eventsname'] = 'hiii';\n $i ++;\n $j ++;\n }\n\n $l = 0;\n $eventcount = count($arrays ['dates']);\n // echo $eventcount;\n if ($eventcount > 0) {\n $todayDate = date(\"Y-m-d\");\n $current_theme = System::getVar('Default_Theme');\n // exit;\n if ($current_theme == 'CityPilot') {\n // echo \"hellooo\";\n $output .= '<div class=\"DateBlock\">';\n $k = 0;\n $s = 0;\n foreach ($arrays ['dates'] as $key => $d1) {\n // echo \"hii\";\n if ($k == $limit) {\n // break;\n }\n $eventsdate = $key;\n $dateexplode = explode('-', $eventsdate);\n $dayname = date_format(date_create($eventsdate), 'l');\n $dayname = $this->__($dayname);\n\n // echo $startlimit . '<br>';\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n // echo $s . '<br>';\n // echo $l . '<br>';\n if ($s >= $startlimit) {\n $newArray [] = $d2;\n if ($l == $limit) {\n break;\n }\n\n if ($d2 [price] > 0) {\n $curr_args = array(\n 'amount' => $d2 [price],\n 'currency_symbol' => '',\n 'decimal_point' => ',',\n 'thousands_sep' => '.',\n 'precision' => '2'\n );\n $price = ModUtil::apiFunc('ZSELEX',\n 'user', 'number2currency',\n $curr_args);\n } else {\n $price = $this->__(\"FREE\");\n }\n\n if ($d2 ['aff_id'] > 0) {\n $aff_image = pnGetBaseURL().\"modules/ZSELEX/images/affiliates/\".$d2 ['aff_image'];\n $aff_image_link = \"<img src='\".$aff_image.\"' style='width: 50px;'>\";\n $aff_image_div = \"<div style='width: 50px; height: 50px; position: relative;z-index:999;display:inline-block; float:right; margin-top:-45px; margin-right: 30px;'>$aff_image_link</div>\";\n }\n $evntUrl = pnGetBaseURL().ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 [shop_id],\n 'eventId' => $d2 [shop_event_id]\n ));\n // $evntUrl = \"www.gmail.com\";\n $output .= '<a href=\"'.$evntUrl.'\" class=\"HoverEffet\">\n <div class=\"DateBorder\">\n <div class=\"Date\">\n <span class=\"DateSpan\">'.$dateexplode [2].'/'.$dateexplode [1].'</span><br /><span class=\"YearSpan\">'.$dateexplode [0].'</span><br /><span class=\"WeekDay\">'.$dayname.'</span>\n </div>\n\n <div class=\"DateHead\">\n <h5>'.stripslashes(wordwrap($d2 [shop_event_name],\n 19, \"<br>\\n\", TRUE)).'</h5>\n '.$aff_image_div.'\n <h6>'.stripslashes($d2 [shop_event_shortdescription]).'</h6>\n </div>\n <div class=\"DatePrice\">\n <p>'.$this->__('Price').' : '.$price.'</p>\n '.$this->__('Time').' : '.$d2 [shop_event_startdate].', '.$d2 [shop_event_starthour].' - '.($d2 [shop_event_enddate]\n != $d2 [shop_event_startdate] ? $d2 [shop_event_enddate].', '\n : '').$d2 [shop_event_endhour].'<br>\n '.$this->__('Location').' : '.stripslashes($d2 [shop_event_venue]).'\n </div>\n <div class=\"Sect3\">\n '.$this->__('Contact').' : '.$d2 [phone].'<br>\n '.$this->__('Organizer').' : '.$d2 [uname].'<br>\n <span class=\"Sect3Link\">\n '.$this->__('See More').'...\n </span>\n </div>\n </div>\n </a>';\n // echo $l;\n $l ++;\n }\n $s ++;\n }\n\n $k ++;\n }\n $newArrayCount = sizeof($newArray);\n $output .= \"</div>\";\n } else {\n // echo \"hellooo\";\n foreach ($arrays ['dates'] as $key => $d1) {\n if ($k == $limit) {\n break;\n }\n\n $dayname = date_format(date_create($key), 'l');\n $output .= \"<div>\n <b>$key $dayname</b> </br>\";\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n $output .= \" <a href='\".ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 ['shop_id'],\n 'eventId' => $d2 ['shop_event_id']\n )).\"'>$d2[shop_event_name]</a><br>\n <div>\";\n }\n $output .= \"</br>\";\n $k ++;\n }\n }\n // exit;\n // echo $totalCount;\n // $loadCount = 3;\n // echo \"eventcount : \" . $eventcount;\n // if ($eventcount >= $limit) {\n if ($newArrayCount > $limit) {\n // $output .= '<div style=\"cursor:pointer\" align=right onclick=getMoreEvents()> <font color=\"blue\">more events... </font> </div>';\n // $output .= \"<div class='allevent' style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> <font color='blue'>\" . $this->__('All Events...') . \" </font> </div>\";\n // $output .= \"<div style='cursor:pointer'><a class='infoclass' id='allevents' href='\" . ModUtil::url('ZSELEX', 'info', 'showEvents') . \"'>All Events...</a></div>\";\n // $output .= \"<br><a href style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> \" . $this->__('All Events...') . \"</a>\";\n $output .= '<div class=\"load_more_link\" align=\"right\">';\n $output .= '<input type=\"button\" class=\"eventmorebutton\" value=\"'.$this->__('Load More Events').'\"\n onclick=showEvents(\"'.$loadCount.'\")>';\n $output .= '<span class=\"flash\"></span></div>';\n }\n } else {\n $output .= '<dt> '.$this->__('No Events Found').' </dt>';\n }\n // }\n } else {\n\n $output .= '<dt> '.$this->__('No Events Found').' </dt>';\n }\n\n $output .= '</dl>';\n\n $data [\"data\"] = $output;\n AjaxUtil::output($data);\n }",
"public function show(events $events)\n {\n //\n }",
"public function filterAction()\r\n {\r\n \t/*\r\n \t * form needs to include:\r\n \t * \r\n \t * user id\r\n \t * task category\r\n \t * client id\r\n \t * project id\r\n \t * start date\r\n \t * end date\r\n \t */\r\n $this->view->allUsers = $this->userService->getUserList();\r\n $task = new Task();\r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->clients = $this->clientService->getClients();\r\n \t $this->view->projects = new ArrayObject();\r\n $this->renderView('timesheet/filter.php'); \t\r\n }",
"function simplenews_issue_filter_form() {\n // Current filter selections in $session var; stored at form submission\n // Example: array('newsletter' => 'all')\n $session = isset($_SESSION['simplenews_issue_filter']) ? $_SESSION['simplenews_issue_filter'] : _simplenews_issue_filter_default();\n $filters = simplenews_issue_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only newsletters which'),\n );\n\n // Filter values are default\n $form['filters']['newsletter'] = array(\n '#type' => 'select',\n '#title' => $filters['newsletter']['title'],\n '#options' => $filters['newsletter']['options'],\n '#default_value' => $session['newsletter'],\n );\n $form['filters']['buttons']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#prefix' => '<span class=\"spacer\" />',\n );\n // Add Reset button if filter is in use\n if ($session != _simplenews_issue_filter_default()) {\n $form['filters']['buttons']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n );\n }\n\n return $form;\n}",
"public function indexAction() {\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t\n\t\t// Get subject and check auth\n\t\t$subject = Engine_Api::_()->core()->getSubject('event');\n\t\tif (!$subject->authorization()->isAllowed($viewer, 'view')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t\n\t\t// Prepare data\n\t\t$this->view->event = $event = $subject;\n\t\t\t\n\t //Get viewer, event, search form\n\t \t$viewer = Engine_Api::_() -> user() -> getViewer();\n\t \t$this -> view -> event = $event = Engine_Api::_() -> core() -> getSubject();\n\t\t$this -> view -> form = $form = new Ynevent_Form_Video_Search;\n\t\n\t\tif ( !$event->authorization()->isAllowed($viewer, 'view') ) { return; }\n\t \n\t // Check create video authorization\n\t\t$canCreate = $event -> authorization() -> isAllowed($viewer, 'video');\n\t\t$levelCreate = Engine_Api::_() -> authorization() -> getAdapter('levels') -> getAllowed('event', $viewer, 'video');\n\n\t\t//print_r($canCreate); exit;\n\t\t\n\t\tif ($canCreate && $levelCreate) {\n\t\t\t$this -> view -> canCreate = true;\n\t\t} else {\n\t\t\t$this -> view -> canCreate = false;\n\t\t}\n\t\n\t //Prepare data filer\n\t $params = array();\n\t $params = $this->_getAllParams();\n\t $params['title'] = '';\n\t $params['parent_type'] = 'event';\n\t $params['parent_id'] = $event->getIdentity();\n\t $params['search'] = 1;\n\t $params['limit'] = 12;\n\t $form->populate($params);\n\t $this->view->formValues = $form->getValues();\n\t //Get data\n\t //print_r($params); exit;\n\t $this -> view -> paginator = $paginator = Engine_Api::_() -> ynvideo() -> getVideosPaginator($params);\n\t if(!empty($params['orderby'])){\n\t switch($params['orderby']){\n\t case 'most_liked':\n\t $this->view->infoCol = 'like';\n\t break;\n\t case 'most_commented':\n\t $this->view->infoCol = 'comment';\n\t break;\n\t default:\n\t $this->view->infoCol = 'view';\n\t break;\n\t }\n\t }\n\t \n\t\t// Add count to title if configured\n\t if( $this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0 ) {\n\t $this->_childCount = $paginator->getTotalItemCount();\n\t }\n\t}",
"public function showEvents1($args)\n {\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n if (isset($startlimit) && !empty($startlimit)) {\n $pageLimit = $startlimit;\n } else {\n $pageLimit = '0';\n }\n $loadCount = $pageLimit + $eventlimit;\n // echo $loadCount;\n $reset = FormUtil::getPassedValue(\"reset\");\n // echo $reset; exit;\n if (!empty($eventlimit)) {\n $limit = $eventlimit;\n $limitquery = \"LIMIT 0 , $eventlimit\";\n } else {\n $limit = \"2\";\n $limitquery = \"LIMIT 0 , $limit\";\n }\n\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n // $shops = ModUtil::apiFunc('ZSELEX', 'admin', 'getShop', $items);\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND a.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND a.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND a.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND a.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND a.shop_id=$shop_id\";\n }\n if (!empty($category_id)) {\n // $append .= \" AND a.cat_id=$category_id\";\n $append .= \" AND a.shop_id IN(SELECT shop_id FROM zselex_shop_to_category WHERE category_id=$category_id) \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND a.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (a.shop_name LIKE :search OR MATCH (a.shop_name) AGAINST (:search2) OR a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n /*\n * $sql = \"SELECT a.shop_id\n * FROM zselex_shop a\n * WHERE a.shop_id IS NOT NULL\n * AND a.status='1' $append\";\n * //echo $sql;\n * $query = DBUtil::executeSQL($sql);\n * $result = $query->fetchAll();\n */\n\n $result = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getUpcomingEventShops(array(\n 'append' => $append,\n 'setParams' => $setParams,\n 'show_all' => true,\n 'upcommingEvents' => true\n ));\n\n $count = count($result);\n } else {\n\n $count = 0;\n }\n $shopsql = '';\n if ($count > 0) {\n\n foreach ($result as $shopid) {\n $shop_idarray [] = $shopid ['shop_id'];\n }\n\n $shop_ids = implode(\",\", $shop_idarray);\n // foreach ($result as $shop) {\n $shopsql = \" AND a.shop_id IN($shop_ids)\";\n $shopquery1 = \" AND a.shop IN($shop_ids)\";\n\n if ($reset != 'reset') {\n $shopquery = $shopsql;\n } else {\n $shopquery = \"\";\n }\n\n // echo $shopquery;\n\n /*\n * $minmax = \"SELECT MIN( shop_event_startdate ) as mindate , MAX( shop_event_enddate ) as maxdate\n * FROM zselex_shop_events a\n * WHERE a.shop_event_id IS NOT NULL AND UNIX_TIMESTAMP(a.shop_event_startdate) != 0 AND UNIX_TIMESTAMP(a.shop_event_enddate) != 0 AND a.status='1' \" . \" \" . $shopquery . \" \" . $limitquery;\n * //echo $minmax;\n * $q = DBUtil::executeSQL($minmax);\n * $e = $q->fetch();\n */\n $e = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventDates(array(\n 'shopquery' => $shopquery1\n ));\n\n $mindate = $e ['mindate'];\n $maxdate = $e ['maxdate'];\n $mxdates = array(\n \"0\" => $maxdate\n );\n $datearray = array();\n // echo \"mindate : \" . $mindate;\n // echo \"maxdate : \" . $maxdate;\n\n $datearray = $this->createDateRangeArray($mindate, $maxdate);\n $datearray = array_merge($datearray, $mxdates);\n\n $dateCount = count($datearray);\n\n $todayDate = date(\"Y-m-d\");\n $arrays = array();\n\n $i = 0;\n $j = 0;\n foreach ($datearray as $key => $d) {\n if ($d < $todayDate) continue;\n // echo $d . '<br>';\n if ($i == $limit) {\n // break;\n }\n\n /*\n * $sql1 = \"SELECT a.shop_event_id , a.shop_id , a.shop_event_name , a.shop_event_shortdescription , a.shop_event_description , a.shop_event_startdate , a.shop_event_starthour , a.shop_event_startminute , a.shop_event_enddate , a.shop_event_endhour , a.shop_event_endminute,a.price,a.email,a.phone,a.shop_event_venue,\n * b.aff_id , c.aff_image\n * FROM zselex_shop_events a\n * LEFT JOIN zselex_shop b ON b.shop_id=a.shop_id\n * LEFT JOIN zselex_shop_affiliation c ON c.aff_id=b.aff_id\n * WHERE '\" . $d . \"' BETWEEN a.shop_event_startdate AND a.shop_event_enddate AND (a.activation_date<=CURDATE() OR UNIX_TIMESTAMP(a.activation_date) = 0) \" . \" \" . $shopquery;\n * //echo $sql1;\n *\n * $query1 = DBUtil::executeSQL($sql1);\n * $events1 = $query1->fetchAll();\n */\n $events1 = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventBetweenDates(array(\n 'd' => $d,\n 'shopsql' => $shopquery1\n ));\n foreach ($events1 as $get => $owner) {\n $ownerName = ModUtil::apiFunc('ZSELEX',\n 'admin', 'getOwner',\n $args = array(\n 'shop_id' => $owner ['shop_id']\n ));\n $events1 [$get] ['uname'] = $ownerName;\n }\n // echo $events1['shop_event_name'] . '<br>';\n $dates = strtotime(date(\"Y-m-d\", strtotime($d)).\" +$j day\");\n $headlinedates = date('l dS \\o\\f F Y', $dates);\n // echo $headlinedates . '<br>';\n $arrays ['dates'] [$d] = $events1;\n\n // echo \"<pre>\"; print_r($events1); echo \"</pre>\";\n // $datearray[$key]['eventsname'] = 'hiii';\n $i ++;\n $j ++;\n }\n\n $l = 0;\n $eventcount = count($arrays ['dates']);\n // echo $eventcount;\n if ($eventcount > 0) {\n $todayDate = date(\"Y-m-d\");\n $current_theme = System::getVar('Default_Theme');\n // exit;\n if ($current_theme == 'CityPilot') {\n // echo \"hellooo\";\n $output .= '<div class=\"DateBlock\">';\n $k = 0;\n $s = 0;\n foreach ($arrays ['dates'] as $key => $d1) {\n // echo \"hii\";\n if ($k == $limit) {\n // break;\n }\n $eventsdate = $key;\n $dateexplode = explode('-', $eventsdate);\n $dayname = date_format(date_create($eventsdate), 'l');\n $dayname = $this->__($dayname);\n\n // echo $startlimit . '<br>';\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n // echo $s . '<br>';\n // echo $l . '<br>';\n if ($s >= $startlimit) {\n $newArray [] = $d2;\n if ($l == $limit) {\n break;\n }\n\n if ($d2 [price] > 0) {\n $curr_args = array(\n 'amount' => $d2 [price],\n 'currency_symbol' => '',\n 'decimal_point' => ',',\n 'thousands_sep' => '.',\n 'precision' => '2'\n );\n $price = ModUtil::apiFunc('ZSELEX',\n 'user', 'number2currency',\n $curr_args);\n } else {\n $price = $this->__(\"FREE\");\n }\n\n if ($d2 ['aff_id'] > 0) {\n $aff_image = pnGetBaseURL().\"modules/ZSELEX/images/affiliates/\".$d2 ['aff_image'];\n $aff_image_link = \"<img src='\".$aff_image.\"' style='width: 50px;'>\";\n $aff_image_div = \"<div style='width: 50px; height: 50px; position: relative;z-index:999;display:inline-block; float:right; margin-top:-45px; margin-right: 30px;'>$aff_image_link</div>\";\n }\n $evntUrl = pnGetBaseURL().ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 [shop_id],\n 'eventId' => $d2 [shop_event_id]\n ));\n // $evntUrl = \"www.gmail.com\";\n $output .= '<a href=\"'.$evntUrl.'\" class=\"HoverEffet\">\n <div class=\"DateBorder\">\n <div class=\"Date\">\n <span class=\"DateSpan\">'.$dateexplode [2].'/'.$dateexplode [1].'</span><br /><span class=\"YearSpan\">'.$dateexplode [0].'</span><br /><span class=\"WeekDay\">'.$dayname.'</span>\n </div>\n\n <div class=\"DateHead\">\n <h5>'.stripslashes(wordwrap($d2 [shop_event_name],\n 19, \"<br>\\n\", TRUE)).'</h5>\n '.$aff_image_div.'\n <h6>'.stripslashes($d2 [shop_event_shortdescription]).'</h6>\n </div>\n <div class=\"DatePrice\">\n <p>'.$this->__('Price').' : '.$price.'</p>\n '.$this->__('Time').' : '.$d2 [shop_event_startdate].', '.$d2 [shop_event_starthour].' - '.($d2 [shop_event_enddate]\n != $d2 [shop_event_startdate] ? $d2 [shop_event_enddate].', '\n : '').$d2 [shop_event_endhour].'<br>\n '.$this->__('Location').' : '.stripslashes($d2 [shop_event_venue]).'\n </div>\n <div class=\"Sect3\">\n '.$this->__('Contact').' : '.$d2 [phone].'<br>\n '.$this->__('Organizer').' : '.$d2 [uname].'<br>\n <span class=\"Sect3Link\">\n '.$this->__('See More').'...\n </span>\n </div>\n </div>\n </a>';\n // echo $l;\n $l ++;\n }\n $s ++;\n }\n\n $k ++;\n }\n $newArrayCount = sizeof($newArray);\n $output .= \"</div>\";\n } else {\n // echo \"hellooo\";\n foreach ($arrays ['dates'] as $key => $d1) {\n if ($k == $limit) {\n break;\n }\n\n $dayname = date_format(date_create($key), 'l');\n $output .= \"<div>\n <b>$key $dayname</b> </br>\";\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n $output .= \" <a href='\".ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 ['shop_id'],\n 'eventId' => $d2 ['shop_event_id']\n )).\"'>$d2[shop_event_name]</a><br>\n <div>\";\n }\n $output .= \"</br>\";\n $k ++;\n }\n }\n // exit;\n // echo $totalCount;\n // $loadCount = 3;\n // echo \"eventcount : \" . $eventcount;\n // if ($eventcount >= $limit) {\n if ($newArrayCount > $limit) {\n // $output .= '<div style=\"cursor:pointer\" align=right onclick=getMoreEvents()> <font color=\"blue\">more events... </font> </div>';\n // $output .= \"<div class='allevent' style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> <font color='blue'>\" . $this->__('All Events...') . \" </font> </div>\";\n // $output .= \"<div style='cursor:pointer'><a class='infoclass' id='allevents' href='\" . ModUtil::url('ZSELEX', 'info', 'showEvents') . \"'>All Events...</a></div>\";\n // $output .= \"<br><a href style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> \" . $this->__('All Events...') . \"</a>\";\n $output .= '<div class=\"load_more_link\" align=\"right\">';\n $output .= '<input type=\"button\" class=\"eventmorebutton\" value=\"'.$this->__('Load More Events').'\"\n onclick=showEvents(\"'.$loadCount.'\")>';\n $output .= '<span class=\"flash\"></span></div>';\n }\n } else {\n $output .= '<dt> '.$this->__('No Events Found').' </dt>';\n }\n // }\n } else {\n\n $output .= '<dt> '.$this->__('No Events Found').' </dt>';\n }\n\n $output .= '</dl>';\n\n // ZSELEX_Util::ajaxOutput($output);\n $data [\"data\"] = $output;\n AjaxUtil::output($data);\n }",
"public function indexAction() {\n\t\t// TODO Auto-generated IndexController::indexAction() default action\n\t\t\n\t\t\n\t\t$data = $this->table->fetchAllEvents($paginated = true, $page = $this->_request->page, $countPerPage = 3, $asArray = false);\n\t\t$this->view->data = $data;\n\t\t\n\t\t$this->view->form = new Events_Form_Search();\n\t}",
"private function displaySearchForm($filter)\t{\n trace('[CMD] '.__METHOD__);\n\n\t\t$formname = 'SearchForm';\n $tmplForm = $this->cObj->getSubpart($this->templateFile, '###'.strtoupper($formname).'###');\n\n\t\t$choicesArray = array();\n\t\t$disableArray = array();\n\t\t$hideArray = array();\n\n\t\t$formMarkerArray = $this->formHandler->prepareConfSubst($formname, $filter, $choicesArray, $disableArray, $hideArray);\n\n\t\t// HOOK: allow multiple hooks to manipulate formMarkerArray\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsauserreg']['pi5_hooks']['displaySearchFormHook'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsauserreg']['pi5_hooks']['displaySearchFormHook'] as $className) {\n\t\t\t\t$hookObj = &t3lib_div::getUserObj($className);\n\t\t\t\t$formMarkerArray = $hookObj->displaySearchFormHook($this, $formMarkerArray);\n\t\t\t}\n\t\t}\n\n return $this->cObj->substituteMarkerArray($tmplForm, $formMarkerArray);\n\t}",
"function theme_simplenews_subscription_filter_form($variables) {\n $form = $variables['form'];\n\n $output = '<div id=\"simplenews-subscription-filter\">';\n $output .= drupal_render($form['filters']);\n $output .= '</div>';\n $output .= drupal_render_children($form);\n return $output;\n}",
"function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }",
"protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new EventDateFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('AtkRegistrationBundle:EventDate')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('EventDateControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('EventDateControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('EventDateControllerFilter')) {\n $filterData = $session->get('EventDateControllerFilter');\n $filterForm = $this->createForm(new EventDateFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \n }\n\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }",
"public function listAction()\r\n\t{\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\t\t$this -> view -> business = $business = Engine_Api::_() -> core() -> getSubject();\r\n\t\t$this -> view -> form = $form = new Ynbusinesspages_Form_Event_Search;\r\n\t\t$val = $this -> _getAllParams();\r\n\t\t// Populate form data\r\n\t\tif (!$form -> isValid($val))\r\n\t\t{\r\n\t\t\t$form -> populate($defaultValues);\r\n\t\t\t$this -> view -> formValues = $values = array();\r\n\t\t\t$this -> view -> message = \"The search value is not valid !\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$values = $form -> getValues();\r\n\t\t$values['business_id'] = $business -> getIdentity();\r\n\t\t// Prepare data\r\n\t\t$this -> view -> formValues = $values = array_merge($values, $_GET);\r\n\t\t\r\n\t\t// Check create event authorization\r\n\t\t$this -> view -> canCreate = $business -> isAllowed('event_create');\r\n\t\t//Get data\r\n\t\t$this -> view -> paginator = $paginator = Engine_Api::_()->getDbTable('mappings', 'ynbusinesspages') -> getEventsPaginator($values);\r\n\t\t$paginator -> setCurrentPageNumber($this -> _getParam('page'));\r\n\t}",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->inscricao_evento_id) AND ( (is_scalar($data->inscricao_evento_id) AND $data->inscricao_evento_id !== '') OR (is_array($data->inscricao_evento_id) AND (!empty($data->inscricao_evento_id)) )) )\n {\n\n $filters[] = new TFilter('inscricao_id', 'in', \"(SELECT id FROM inscricao WHERE evento_id = '{$data->inscricao_evento_id}')\");// create the filter \n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n }",
"public function show(Event $event)\n {\n \n }",
"function DisplayEvents()\r\n\t{\t\r\n\t\tglobal $_GET;\r\n\t\tglobal $_POST;\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\tglobal $_SESSION;\t\r\n\t\t\r\n\t\t//\r\n\t\t// PAGE FLAG\r\n\t\t//\r\n\t\t$flag = $_SETTINGS['events_page_clean_url'];\r\n\t\tif($flag == $_REQUEST['page']){\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// DEBUG SECTION\r\n\t\t\t//\r\n\t\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\t\techo \"<br>PAGE: \".$_REQUEST['page'].\"<br>\";\r\n\t\t\t\techo \"<br>FORM1: \".$_REQUEST['FORM1'].\"<br>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// IF FORM1 CALENDAR\r\n\t\t\t//\r\n\t\t\tif($_REQUEST['FORM1'] == 'calendar'){\r\n\t\t\t\t$this->DisplayCalendarOfEvents();\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// ELSE DISPLAY EVENTS BY DEFAULT\r\n\t\t\t//\r\n\t\t\telse {\t\t\r\n\t\t\t\techo \"<div class='events'>\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// CHECK FOR A CATEGORY\r\n\t\t\t\tif($_REQUEST['form1'] != ''){\r\n\t\t\t\t\r\n\t\t\t\t\t$form1Array = explode(\":\",$_REQUEST['FORM1']);\r\n\t\t\t\t\t$categoryName = $form1Array[0];\r\n\t\t\t\t\t$pageNum = $form1Array[1];\r\n\t\t\t\t\t$eventName = $form1Array[2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cagegorySQL = \"AND ec.name='\".$categoryName.\"' \";\r\n\t\t\t\t\t$nameSQL = \"AND ev.name='\".$eventName.\"' \";\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// PAGINATION\r\n\t\t\t\t$page = 1; // start page\t\t\t\r\n\t\t\t\t$size = 4; // records per page\r\n\t\t\t\t$select = \t\"SELECT * FROM events \".\r\n\t\t\t\t\t\t\t\"WHERE events.active='1' \".\r\n\t\t\t\t\t\t\t\"AND events.published='1' \".\r\n\t\t\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\" \".\r\n\t\t\t\t\t\t\t\"ORDER BY events.date DESC \";\t\r\n\t\t\t\t$total_records = mysql_num_rows(doQuery($select)); // total records\r\n\t\t\t\tif($pageNum){ $page = (int) $pageNum; } // current page\r\n\t\t\t\t$pagination = new Pagination();\r\n\t\t\t\t$pagination->setLink(\"\".$_SETTINGS['website'].\"/\".$_REQUEST['page'].\"/\".$categoryName.\":%s\");\r\n\t\t\t\t$pagination->setPage($page);\r\n\t\t\t\t$pagination->setSize($size);\r\n\t\t\t\t$pagination->setTotalRecords($total_records);\r\n\t\t\t\t$select2 = \t$select.$pagination->getLimitSql();\t\t\t\t\r\n\t\t\t\t$result = doQuery($select);\r\n\t\t\t\t\r\n\t\t\t\t$i=0;\r\n\t\t\t\twhile ($row = mysql_fetch_array($result)){\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='event_cont'>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='eventmaps' id='eventmap\".$i.\"'></div>\";\r\n\t\t\t\t\techo \"<div class='event_cont_img_box'><img src='\".$_SETTINGS['website'].\"uploads/\".$row['image'].\"' class='event_cont_img' alt='' /></div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<strong>\".$row['title'].\"</strong>\";\r\n\t\t\t\t\techo \"<label>\".TimestampIntoDate($row['date']).\"</label>\";\r\n\t\t\t\t\techo \"<label>\".$row['location'].\"</label>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"\".truncateString($row['content'], 300, $stopanywhere=false).\"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<ul class='event_list'>\";\r\n\t\t\t\t\techo \"<li><b>Location:</b> \".$row['location'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Address:</b> \".$row['address'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Openings:</b></li>\";\r\n\t\t\t\t\techo \"<li><b>Price:</b> $\".$row['price'].\"</li>\";\t\t\t\t\t\r\n\t\t\t\t\techo \"</ul>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// CHECKOUT FORM\r\n\t\t\t\t\tif($row['price'] != 0){\r\n\t\t\t\t\t\techo\t\"<form class='product-form' method='post'>\".\r\n\t\t\t\t\t\t\t\t\"<input class='hidden' type='hidden' name='pid' value='\".$product_id.\"' >\".\r\n\t\t\t\t\t\t\t\t\"<input type='hidden' class='qtyinput' name='qty' value='1' size='2' >\";\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ADDTOCART' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\techo\t\"<form>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ATTENDEVENT' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\techo \"There are currently no events listed\";\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t<?\r\n\t\t\t\t\r\n\t\t\t\t$navigation = $pagination->create_links();\r\n\t\t\t\techo $navigation; // will draw our page navigation\r\n\t\t\t\r\n\t\t\t\techo \"</div>\";\t\r\n\t\t\t\techo \"<div id='map_canvas'></div>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function show(Event $event)\n {\n //\n }",
"public function show(Event $event)\n {\n //\n }",
"public function show(Event $event)\n {\n //\n }",
"public function showFilters()\n\t{\n\t\t$data = array(\n\t\t\t'filters' => $this->profileService->getFilters(),\n\t\t\t'properties' => $this->profileService->getPropertiesForProfile($this->profile)->lists('option_id')\n\t\t);\n\n\t\treturn new FilterView($data);\n\t}",
"public function filter_event() {\n\t\tif ( isset( $_POST['campus'] ) && isset( $_POST['month'] ) && isset( $_POST['year'] ) ) {\n\t\t\tTribeEventsQuery::init();\n\n\t\t\t$event_args = array(\n\t\t\t\t'eventDisplay' => 'upcoming',\n\t\t\t\t'post_type' => 'tribe_events',\n\t\t\t\t'posts_per_page' => 10,\n\t\t\t\t'post_status' => 'publish',\n\t\t\t);\n\n\t\t\tif ( '0' !== $_POST['month'] ) {\n\t\t\t\tif ( (int) $_POST['month'] >= (int) date( 'n' ) ) {\n\t\t\t\t\t$event_args['eventDisplay'] = 'monthly';\n\t\t\t\t} else {\n\t\t\t\t\t$event_args['eventDisplay'] = 'past';\n\t\t\t\t}\n\n\t\t\t\t$startdate = $_POST['year'] .'-'. $_POST['month'] . '-01 01:00:00';\n\t\t\t\tif ( $_POST['month'] === '12' ) {\n\t\t\t\t\t$enddate = $_POST['year'] .'-'. $_POST['month'] . '-31 23:00:00';\n\t\t\t\t} else {\n\t\t\t\t\t$enddate = $_POST['year'] .'-'. ( $_POST['month'] + 1 ) . '-01 01:00:00';\n\t\t\t\t}\n\n\t\t\t\t$event_args['meta_query'] = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t\t\t'value' => $startdate,\n\t\t\t\t\t\t'type' => 'DATETIME',\n\t\t\t\t\t\t'compare' => '>='\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t\t\t'value' => $enddate,\n\t\t\t\t\t\t'type' => 'DATETIME',\n\t\t\t\t\t\t'compare' => '<'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( '0' !== $_POST['campus'] ) {\n\t\t\t\t$event_args['ctrs-campus'] = sanitize_text_field( $_POST['campus'] );\n\t\t\t}\n\n\t\t\tif ( '0' === $_POST['month'] ) {\n\t\t\t\t$event_query = TribeEventsQuery::getEvents( $event_args, true );\n\t\t\t} else {\n\t\t\t\t$event_query = new WP_Query( $event_args );\n\t\t\t}\n\n\t\t\tglobal $wp_query, $post;\n\t\t\t$wp_query = $event_query;\n\t\t\tif ( ! empty( $event_query->posts ) ) {\n\t\t\t\t$post = $event_query->posts[0];\n\t\t\t}\n\n\t\t\tob_start();\n\n\t\t\tif ( have_posts() ) { ?>\n\t\t\t\t<div class=\"events-container\">\n\t\t\t\t\t<!-- Notices -->\n\t\t\t\t\t<?php tribe_events_the_notices() ?>\n\n\t\t\t\t\t<!-- Events Loop -->\n\t\t\t\t\t<?php if ( have_posts() ) : ?>\n\t\t\t\t\t\t<?php do_action( 'tribe_events_before_loop' ); ?>\n\t\t\t\t\t\t<?php tribe_get_template_part( 'list/loop' ) ?>\n\t\t\t\t\t\t<?php do_action( 'tribe_events_after_loop' ); ?>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php } else { ?>\n\t\t\t\t<div class=\"tribe-events-notices\"><ul><li>There were no results found.</li></ul></div>\n\t\t\t<?php }\n\n\t\t\t$filtered_events = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\twp_reset_postdata();\n\n\t\t\techo $filtered_events;\n\t\t\tdie();\n\t\t} else {\n\t\t\tdie();\n\t\t}\n\t}",
"public function indexAction() {\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t// Get subject and check auth\n\t\t$subject = Engine_Api::_()->core()->getSubject('event');\n\t\tif (!$subject->authorization()->isAllowed($viewer, 'view')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t// Prepare data\n\t\t$this->view->event = $event = $subject;\n\t\t$limit =$this->_getParam('max',5);\n\t\t$currentDay = date('Y') . '-' . date('m') . '-' . date('d');\n\t\t\n\t\t$table = Engine_Api::_()->getItemTable('event');\n\t\t$select = $table->select()\n ->where('category_id = ?', $event->category_id)\n ->where('event_id != ?', $event->getIdentity())\n ->order(\"DATEDIFF('{$currentDay}', starttime) DESC\")\n ->limit($limit);\n\n\t\t$showedEvents = $table->fetchAll($select);\n\t\t$this->view->showedEvents = $showedEvents;\n\t\t// Hide if nothing to show\n\t\tif( count($showedEvents) <= 0 ) {\n\t return $this->setNoRender();\n\t }\n }",
"function Search_show()\n{\n global $db;\n global $tpl;\n global $sForm;\n $sFormTitle = \"Zoek nieuwsbericht\";\n $sActionFileName = \"nieuwsRecord.php\";\n\n//-------------------------------\n// Search Open Event begin\n// Search Open Event end\n//-------------------------------\n $tpl->set_var(\"FormTitle\", $sFormTitle);\n $tpl->set_var(\"ActionPage\", $sActionFileName);\n//-------------------------------\n// Set variables with search parameters\n//-------------------------------\n $flds_titel = strip(get_param(\"s_titel\"));\n $flds_datum = strip(get_param(\"s_datum\"));\n\n//-------------------------------\n// Search Show begin\n//-------------------------------\n\n\n//-------------------------------\n// Search Show Event begin\n// Search Show Event end\n//-------------------------------\n $tpl->set_var(\"s_titel\", tohtml($flds_titel));\n $tpl->set_var(\"s_datum\", tohtml($flds_datum));\n\n//-------------------------------\n// Search Show end\n//-------------------------------\n\n//-------------------------------\n// Search Close Event begin\n// Search Close Event end\n//-------------------------------\n $tpl->parse(\"FormSearch\", false);\n//===============================\n}",
"public function show(Evento $evento)\n {\n //\n }",
"public function show(evento $evento)\n {\n //\n }",
"public function index()\n {\n $filters = Filter::get();\n return view('admin.filters.index', compact('filters'));\n }",
"function renderFilterCreationForm() {\n\t\t$this->pi_loadLL();\n\t\t$markerArray = array();\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER###');\n\n\t\t$markerList = array('SAVE', 'CANCEL', 'FILTER_TITLE_LABEL', 'FILTER_DESCRIPTION_LABEL');\n\t\tforeach ($markerList as $marker) {\n\t\t\t$markerArray[$marker] = $this->cObj->stdWrap($this->pi_getLL($marker, $marker, false), $this->conf['newfilter.'][strtolower($marker) . '.']);\n\t\t}\n\n\t\t// FORM URL\n\t\tif (!isset($this->conf['newfilter.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter.']['form_url.']['returnLast'] = 'url';\n\t\t$markerArray['FORM_URL'] = $this->cObj->typolink('', $this->conf['newfilter.']['form_url.']);\n\n\t\t$content = tslib_CObj::substituteMarkerArray($content, $markerArray, '###|###');\n\n\t\treturn $content;\n\t}",
"protected static function display_search_form() {\n $locale = self::$locale;\n add_to_title($locale['global_202']);\n $form_elements = self::$form_config['form_elements'];\n /*\n * Search Areas\n */\n $options_table = \"<p><strong>\".$locale['405'].\"</strong></p><table style='width:100%'>\\n\";\n if (!empty(self::$form_config['radio_button'])) {\n foreach (self::$form_config['radio_button'] as $key => $value) {\n $options_table .= \"<tr>\\n<td>\".$value.\"</td>\\n</tr>\\n\";\n }\n }\n $options_table .= \"<tr>\\n<td>\\n\n \".form_checkbox('stype', $locale['407'], self::get_param('stype'), [\n 'type' => 'radio',\n 'value' => 'all',\n 'onclick' => 'display(this.value)',\n 'reverse_label' => TRUE\n ]\n ).\"</td>\\n</tr>\\n</table>\\n\";\n\n /*\n * Date limit\n */\n $date_opts = [\n '0' => $locale['421'],\n '86400' => $locale['422'],\n '604800' => $locale['423'],\n '1209600' => $locale['424'],\n '2419200' => $locale['425'],\n '7257600' => $locale['426'],\n '14515200' => $locale['427']\n ];\n\n $disabled_status = FALSE;\n if (isset($form_elements[self::get_param('stype')]['disabled'])) {\n $disabled_status = !empty($form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE;\n if (self::get_param('stype') != 'all') {\n $disabled_status = in_array(\"datelimit\", $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE;\n }\n }\n\n if (self::get_param('stype') == \"all\") {\n $disabled_status = TRUE;\n }\n\n $search_areas = \"<div class='row'>\";\n $search_areas .= \"<div class='col-xs-12 col-sm-3'>\".$locale['420'].\"</div>\";\n $search_areas .= \"<div class='col-xs-12 col-sm-9'>\";\n $search_areas .= form_select('datelimit', '', self::get_param('datelimit'),\n [\n 'inner_width' => '150px',\n 'options' => $date_opts,\n 'deactivate' => $disabled_status\n ]);\n $search_areas .= form_checkbox('fields', $locale['430'], self::get_param('fields'),\n [\n 'type' => 'radio',\n 'value' => '2',\n 'reverse_label' => TRUE,\n 'input_id' => 'fields1',\n 'class' => 'm-b-0',\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"fields1\", $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]\n );\n $search_areas .= form_checkbox('fields', $locale['431'], self::get_param('fields'),\n [\n 'type' => 'radio',\n 'value' => '1',\n 'reverse_label' => TRUE,\n 'input_id' => 'fields2',\n 'class' => 'm-b-0',\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"fields2\", $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]\n );\n $search_areas .= form_checkbox('fields', $locale['432'], self::get_param('fields'),\n [\n 'type' => 'radio',\n 'value' => '0',\n 'reverse_label' => TRUE,\n 'input_id' => 'fields3',\n 'class' => 'm-b-0',\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"fields3\",\n $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]\n );\n $search_areas .= \"</div></div>\";\n\n /*\n * Sort\n */\n $sort_opts = [\n 'datestamp' => $locale['441'],\n 'subject' => $locale['442'],\n 'author' => $locale['443']\n ];\n\n $sort = \"<div class='row'>\";\n $sort .= \"<div class='col-xs-12 col-sm-3'>\".$locale['440'].\"</div>\";\n $sort .= \"<div class='col-xs-12 col-sm-9'>\";\n $sort .= form_select('sort', '', self::get_param('sort'), [\n 'inner_width' => '150px',\n 'options' => $sort_opts,\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"sort\",\n $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]);\n $sort .= form_checkbox('order', $locale['450'], self::get_param('order'),\n [\n 'type' => 'radio',\n 'value' => '0',\n 'reverse_label' => TRUE,\n 'input_id' => 'order1',\n 'class' => 'm-b-0',\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"order1\",\n $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]\n );\n $sort .= form_checkbox('order', $locale['451'], self::get_param('order'),\n [\n 'type' => 'radio',\n 'value' => '1',\n 'reverse_label' => TRUE,\n 'input_id' => 'order2',\n 'class' => 'm-b-0',\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"order2\", $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]\n );\n $sort .= \"</div></div>\";\n\n /*\n * Char list\n */\n $char_opts = [\n '50' => '50',\n '100' => '100',\n '150' => '150',\n '200' => '200'\n ];\n\n $char_areas = \"<div class='row'>\";\n $char_areas .= \"<div class='col-xs-12 col-sm-3'>\".$locale['460'].\"</div>\";\n $char_areas .= \"<div class='col-xs-12 col-sm-9'>\";\n $char_areas .= form_select('chars', '', self::get_param('chars'), [\n 'inner_width' => '150px',\n 'options' => $char_opts,\n 'deactivate' => (self::get_param('stype') != \"all\" ? (isset($form_elements[self::get_param('stype')]) && in_array(\"chars\",\n $form_elements[self::get_param('stype')]['disabled']) ? TRUE : FALSE) : FALSE)\n ]\n );\n $char_areas .= \"</div></div>\";\n\n /*\n * Bind\n */\n $info = [\n 'openform' => openform('advanced_search_form', 'post', BASEDIR.'search.php'),\n 'closeform' => closeform(),\n 'search_form_stext' => form_text('stext', str_replace('[SITENAME]', fusion_get_settings('sitename'), self::$locale['400']), urldecode(self::get_param('stext')), ['inline' => FALSE, 'placeholder' => $locale['401']]),\n 'search_form_button' => form_button('search', $locale['402'], $locale['402'], ['class' => 'btn-primary']),\n 'search_form_method' => form_checkbox('method', '', self::get_param('method'),\n [\n \"options\" => [\n 'OR' => $locale['403'],\n 'AND' => $locale['404']\n ],\n 'type' => 'radio',\n 'reverse_label' => TRUE,\n ]),\n 'search_form_sources' => $options_table,\n 'search_areas' => $search_areas,\n 'sort_areas' => $sort,\n 'char_areas' => $char_areas\n ];\n /*\n * Replace\n */\n echo $info['openform'];\n echo strtr(Search::render_search(), [\n '{%title%}' => str_replace('[SITENAME]', fusion_get_settings('sitename'), self::$locale['400']),\n '{%search_text%}' => $info['search_form_stext'],\n '{%search_button%}' => $info['search_form_button'],\n '{%search_method%}' => $info['search_form_method'],\n '{%search_sources%}' => $info['search_form_sources'],\n '{%search_areas%}' => $info['search_areas'],\n '{%sort_areas%}' => $info['sort_areas'],\n '{%char_areas%}' => $info['char_areas'],\n ]);\n echo $info['closeform'];\n /*\n * Javascript\n */\n $search_js = \"function display(val) {\\nswitch (val) {\\n\";\n foreach ($form_elements as $type => $array1) {\n $search_js .= \"case '\".$type.\"':\\n\";\n foreach ($array1 as $what => $array2) {\n foreach ($array2 as $elements => $value) {\n if ($what == \"enabled\") {\n $search_js .= \"document.getElementById('\".$value.\"').disabled = false;\\n\";\n } else {\n if ($what == \"disabled\") {\n $search_js .= \"document.getElementById('\".$value.\"').disabled = true;\\n\";\n } else {\n if ($what == \"display\") {\n $search_js .= \"document.getElementById('\".$value.\"').style.display = 'block';\\n\";\n } else {\n if ($what == \"nodisplay\") {\n $search_js .= \"document.getElementById('\".$value.\"').style.display = 'none';\\n\";\n }\n }\n }\n }\n }\n }\n $search_js .= \"break;\\n\";\n }\n $search_js .= \"case 'all':\\n\";\n $search_js .= \"document.getElementById('datelimit').disabled = false;\\n\";\n $search_js .= \"document.getElementById('fields1').disabled = false;\\n\";\n $search_js .= \"document.getElementById('fields2').disabled = false;\\n\";\n $search_js .= \"document.getElementById('fields3').disabled = false;\\n\";\n $search_js .= \"document.getElementById('sort').disabled = false;\\n\";\n $search_js .= \"document.getElementById('order1').disabled = false;\\n\";\n $search_js .= \"document.getElementById('order2').disabled = false;\\n\";\n $search_js .= \"document.getElementById('chars').disabled = false;\\n\";\n $search_js .= \"break;}}\";\n add_to_footer(\"<script type='text/javascript'>\".jsminify($search_js).\"</script>\");\n }",
"public function index() {\n\n $this->hasPermission('EDIT_CATEGORY');\n\n $this->title = 'Filter Table';\n\n $filters = $this->getFilters();\n\n $this->content = view(config('settings.theme').'.admin.filter_content')->with('filters', $filters)->render();\n\n return $this->renderOutput();\n\n }",
"public function action_index()\r\n\t{\r\n\t\tif ( ! Auth::instance()->logged_in())\r\n\t\t\tNotices::info('event.enroll.login');\r\n\t\t\r\n\t\t$filter = Arr::get($this->request->query(), 'filter', 'current');\r\n\t\t$id = Arr::get($this->request->query(), 'id', FALSE);\r\n\t\t\t\r\n\t\tif ($filter == 'mine' AND ! Auth::instance()->logged_in())\r\n\t\t{\r\n\t\t\tSession::instance()->set('follow_login', $this->request->url());\r\n\t\t\t$this->request->redirect(Route::url('user', array('action' => 'login')));\r\n\t\t}\r\n\t\t\r\n\t\tif (Auth::instance()->logged_in() AND $this->user->characters->where('visibility', '=', 1)->count_all() == 0)\r\n\t\t{\r\n\t\t\tNotices::info('event.enroll.need_character');\r\n\t\t}\r\n\t\t\r\n\t\t// Pass events to the view class\r\n\t\t$this->view->event_data = Model_Event::filtered_list($filter, $this->user, $id);\r\n\t\t$this->view->filter_message = Kohana::message('gw', 'filter.'.$filter);\r\n\t\t$this->view->filter = $filter;\r\n\t}",
"function get_filter_form(Table $table) {\n return $table->renderFilter();\n}",
"public function show()\n {\n\n $search = request('search');\n\n if ($search) {\n $eventos = Evento::where([\n ['title', 'like', '%' . $search . '%']\n ])->get();\n } else {\n $eventos = Evento::all(); //ESTÁ PEGANDO TODOS OS EVENTOS QUE JÁ FORAM CADASTRADOS NO BANCO DE DADOS\n }\n\n return view('events.viewEvents', ['eventos' => $eventos, 'search' => $search]); //está retornando na view todos os eventos que foram cadastrados\n\n }",
"public function show(Filter $filter)\n {\n //\n }",
"public function eventsAction()\n {\n $events = $this->manager->getRepository('Event\\Doctrine\\Orm\\Event')->findBy(array(), array('date' => 'ASC'));\n\n return $this->renderView('events', array(\n 'title' => 'Zusammenfassung der Grillveranstaltungen',\n 'events' => $events,\n 'meals' => $this->createMealsList($events),\n ));\n }",
"public function actionEvents()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('events');\n\t}",
"public function addFilterFormInput(): void;",
"function showCommentFilterPanel(){\r\n\t\techo \"<div class='filterPanel'>\";\r\n\t\techo \"<form class='orderBy' action='#' method='POST'>\";\r\n\t\techo \"<div>\";\r\n\t\techo \"<label class='filterLabel'>Ordina per: </label>\";\r\n\t\techo \"<select name='filter'>\";\r\n\t\techo \"<option value='date'>Data</option>\";\r\n\t\techo \"<option value='like'>Likes</option>\";\r\n\t\techo \"<option value='dislike'>Dislikes</option>\";\r\n\t\techo \"<option value='report'>Segnalazioni</option>\";\r\n\t\techo \"</select>\";\r\n\t\techo \"<label class='filterLabel'>Crescente <input type='radio' name='order' value='asc' checked></label>\";\r\n\t\techo \"<label class='filterLabel'>Decrescente <input type='radio' name='order' value='desc'></label>\";\r\n\t\techo \"</div>\";\r\n\t\techo \"<button type='submit' class='button smallButton' name='sort'>Ordina</button>\";\r\n\t\techo \"</form>\";\r\n\t\techo \"</div>\";\r\n\t}",
"public function init()\n {\n $this\n ->setAttribs(array(\n 'id' => 'filter_form',\n 'class' => 'global_form_box',\n \t'style' => 'margin-bottom: 15px',\n 'method' => 'GET',\n ));\n //Text filter element\n $this->addElement('Text', 'search', array(\n 'label' => 'Search',\n ));\n\n //Browse By Filter Element\n $this->addElement('Select', 'show', array(\n 'label' => 'View',\n 'multiOptions' => array(\n \t'' => 'All',\n '1' => 'My Own Campaigns',\n '2' => 'My Donated Campaigns',\n ),\n 'value' => '1',\n ));\n\n\t//Type Filter\n if(Engine_Api::_ ()->getApi ( 'core', 'ynfundraising' )->checkIdeaboxPlugin ())\n\t{\n\t $this->addElement('Select', 'type', array(\n\t 'label' => 'Type',\n\t 'multiOptions' => array(\n\t '' => 'All',\n\t 'idea' => 'Idea',\n\t 'trophy' => 'Trophy',\n\t 'user' => 'User',\n\t ),\n\t 'value' => '',\n\t ));\n\t}\n\n //Campaign Search - Status Filter\n $this->addElement('Select', 'status', array(\n 'label' => 'Status',\n 'multiOptions' => array(\n '' => 'All',\n 'ongoing' => 'Ongoing',\n 'closed' => 'Closed',\n 'reached' => 'Reached',\n 'expired' => 'Expired',\n ),\n 'value' => '',\n ));\n\n $this->addElement('Hidden', 'page', array(\n 'order' => 100\n ));\n\n $this->addElement('Hidden', 'tag', array(\n \t\t'order' => 101\n ));\n\n // Element: order\n $this->addElement ( 'Hidden', 'orderby', array (\n \t\t'order' => 102,\n \t\t'value' => 'campaign_id'\n ) );\n\n // Element: direction\n $this->addElement ( 'Hidden', 'direction', array (\n \t\t'order' => 103,\n \t\t'value' => 'DESC'\n ) );\n\n $this->addElement('Button', 'submit_btn', array(\n 'label' => 'Search',\n 'type' => 'submit',\n 'ignore' => true\n ));\n }",
"public function index()\n {\n $events = Event::latest()->when(request()->q, function ($events) {\n $events = $events->where('title', 'like', '%' . request()->q . '%');\n })->paginate(10);\n\n return view('admin.event.index', compact('events'));\n }",
"function dblog_filter_form($form) {\n $filters = dblog_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Filter log messages'),\n '#collapsible' => TRUE,\n '#collapsed' => empty($_SESSION['dblog_overview_filter']),\n );\n foreach ($filters as $key => $filter) {\n $form['filters']['status'][$key] = array(\n '#title' => $filter['title'],\n '#type' => 'select',\n '#multiple' => TRUE,\n '#size' => 8,\n '#options' => $filter['options'],\n );\n if (!empty($_SESSION['dblog_overview_filter'][$key])) {\n $form['filters']['status'][$key]['#default_value'] = $_SESSION['dblog_overview_filter'][$key];\n }\n }\n\n $form['filters']['actions'] = array(\n '#type' => 'actions',\n '#attributes' => array('class' => array('container-inline')),\n );\n $form['filters']['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n );\n if (!empty($_SESSION['dblog_overview_filter'])) {\n $form['filters']['actions']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset')\n );\n }\n return $form;\n}",
"function displayFilterMenu($filterCrieria) {\n $sessionOptions = pullUniqueValues(\"mtn_application\", \"ap_session\");\n $statusOptions = pullUniqueValues(\"mtn_application\", \"ap_status\");\n $lastNameOptions = pullUniqueValues(\"mtn_application\", \"ap_lastname\");\n\n echo \"\\n\\n<p style='margin-bottom: 1cm;'> </p>\\n\";\n echo \"<form method='post' name='filterSelection'>\\n\\n\";\n\n displaySelectionMenu(\"Filter by Session:\", \"filterSession\", $sessionOptions, $filterCrieria['ap_session']);\n displaySelectionMenu(\"Filter by Status:\", \"filterStatus\", $statusOptions, $filterCrieria['ap_status']);\n displaySelectionMenu(\"Filter by Last Name:\", \"filterLastName\", $lastNameOptions, $filterCrieria['ap_lastname']);\n\n echo \"<input type='submit' name='filter_button' value='Filter'>\\n\";\n echo \"</form>\\n\\n\";\n}",
"public function show(Event $event)\n {\n echo view('event.show',['event'=>$event]);exit;\n }",
"public function index()\n {\n\n $sidebar_items = array(\n \"List Events\" => array('url' => URL::route('event.index'), 'icon' => '<i class=\"fa fa-users\"></i>'),\n );\n $FillableDropdown = new FillableDropdown();\n $active = $FillableDropdown->active($default = 2);\n $accessibility = $FillableDropdown->accessibility($default = 2);\n $operations = $FillableDropdown->eventOperations($default = 2);\n\n $authentication = \\App::make('authenticator');\n $user = $authentication->getLoggedUser();\n\n if (isset($user)) {\n\n $user_id = $user->id;\n }\n\n if (isset($user_id)) {\n\n $users = User::findOrFail($user_id);\n }\n $events = Events::orderBy('name', 'asc')->paginate(20);\n\n return view('events.event_listing_page', compact('events', 'users', 'active', 'accessibility', 'operations', 'sidebar_items'));\n\n }",
"public function index()\n {\n $filters = Filter::query()->get();\n\n return view('admin.filters.index',compact('filters'));\n }",
"function theme_nycc_rides_report_filters($form) {\r\n $output = '';\r\n foreach (element_children($form['status']) as $key) {\r\n $output .= drupal_render($form['status'][$key]);\r\n }\r\n $output .= '<div id=\"nycc-rides-report-buttons\">'. drupal_render($form['buttons']) .'</div>';\r\n return $output;\r\n}",
"public function display_event() {\n \n $periode = $this->input->post('periode');\n\n $events = $this->db->query(\"SELECT id, title\n FROM events\n WHERE DATE_FORMAT(event_date, '%Y-%m') = '\" . $periode . \"'\")->result();\n\n $html = '<select class=\"form-control\" id=\"event\" name=\"event\">';\n $html .= '<option value=\"\" disabled selected>Pilih Event</option>';\n foreach ($events as $row) :\n $html .= '<option value=\"' . $row->id . '\">' . $row->title . '</option>';\n endforeach;\n $html .= '</select>';\n\n echo $html;\n\n }",
"function display_list(){\n\t\t\t$this->load->model('admin_career_event_model');\n\t\t\t$this->gen_contents['modal_path'] \t= '/career_event/class_details';\n\t\t\t$this->gen_contents['current_date']\t= $_POST['datecurrent'];\n \n $chp_list = $this->config->item('chapter_list');\n\t\t\t$this->gen_contents['arr_list'] \t= $this->admin_career_event_model->dbGetEventListWithSearchUser($_POST,$chp_list);\n\t\t\t$this->load->view('user/career_event/display_list_event',$this->gen_contents);\n\t\t}",
"public function index()\n\t{\n // set a value in the session\n $query = CalendarEvent::with('user');\n\n // if(Input::has('search')){\n // \t$search = Input::get('search');\n // \t$query->where('title', 'like', '%' . $search . '%');\n // \t$query->orWhere('title', 'like', '%' . $search);\n // \t$query->orWhere('title', 'like', $search . '%');\n \t\n // \t$query->orWhereHas('users', function($q){\n // \t\t$search = Input::get('search');\n // \t\t$q->where('band_name', $search);\n // \t});\n // \t$query->orWhereHas('users', function($q){\n // \t\t$search = Input::get('search');\n // \t\t$q->where('genre', $search);\n // \t});\n // }\n \n\n $events = $query->get();\n\n\n\t\t\n return View::make('events.index')->with(array('events' => $events));\n\t}",
"protected function form_add_filter_dialog( $filter, &$form ) {\n\t}",
"function FilterForm()\n\t{\tob_start();\n\t\techo \"<form class='akFilterForm' method='get' action='\", $_SERVER[\"SCRIPT_NAME\"], \"'>\\n<span>Male or Female</span>\\n<select name='morf'>\\n\";\n\t\tforeach (array(\"\"=>\"all\", \"M\"=>\"Male\", \"F\"=>\"Female\") as $option=>$text)\n\t\t{\techo \"<option value='\", $option, \"'\", $option == $_GET[\"morf\"] ? \" selected='selected'\" : \"\", \">\", $text, \"</option>\\n\";\n\t\t}\n\t\techo \"</select>\\n<span>Country</span>\\n<select name='ctry' id='ctry_select' onchange='MemberFilterCountryList();'>\\n<option value=''>all</option>\";\n\t\tforeach ($this->GetCountries(\"shortname\", true) as $option=>$text)\n\t\t{\techo \"<option value='\", $option, \"'\", $option == $_GET[\"ctry\"] ? \" selected='selected'\" : \"\", \">\", $this->InputSafeString($text), \"</option>\\n\";\n\t\t}\n\t\techo \"</select><span>Name (part)</span><input type='text' name='name' value='\", $this->InputSafeString($_GET[\"name\"]), \"' />\\n<input type='submit' class='submit' value='Apply Filter' />\\n<div class='clear'></div></form><div class='clear'></div>\";\n\t\treturn ob_get_clean();\n\t}",
"function setup_my_field_in_bar( $filters ) {\n\t\t$filters['tribe-bar-event-type'] = array(\n\t\t\t'name' => 'tribe-bar-event-type',\n\t\t\t'caption' => 'Event Type',\n\t\t\t'html' => '<select name=\"tribe-bar-event-type\" id=\"tribe-bar-event-type\" multiple><option value=\"aslan\">Aslan Event</option></select>'\n\t\t);\n\n\t\treturn $filters;\n\t}",
"public function index() {\n $this->seo(array(\n \"title\" => \"All Events List\",\n \"keywords\" => \"events, new events, event management, create event, event tickets, book event tickets\",\n \"description\" => \"Display all the latest events. Filter the events by categories, location and much more. Register yourself to turn your passion into your business\",\n \"view\" => $this->getLayoutView()\n ));\n $view = $this->getActionView();\n\n $title = RequestMethods::get(\"title\", \"\");\n $category = RequestMethods::get(\"category\", \"\");\n $type = RequestMethods::get(\"type\", \"\");\n $limit = RequestMethods::get(\"limit\", 10);\n $page = RequestMethods::get(\"page\", 1);\n $where = array(\n \"title LIKE ?\" => \"%{$title}%\",\n \"category LIKE ?\" => \"%{$category}%\",\n \"type LIKE ?\" => \"%{$type}%\",\n \"live = ?\" => true\n );\n $events = Event::all($where, array(\"*\"), \"created\", \"desc\", $limit, $page);\n $count = Event::count($where);\n\n $view->set(\"events\", $events);\n $view->set(\"limit\", $limit);\n $view->set(\"page\", $page);\n $view->set(\"count\", $count);\n $view->set(\"title\", $title);\n $view->set(\"type\", $type);\n $view->set(\"category\", $category);\n }",
"public function onDisplayFilter(&$filter, $value = '', $formName = 'adminForm', $isSearchView = 0)\n\t{\n\t\tif (!in_array($filter->field_type, static::$field_types)) return;\n\n\t\t$db = Factory::getDbo();\n\t\t$_nowDate = 'UTC_TIMESTAMP()';\n\t\t$nullDate = $db->getNullDate();\n\n\t\t// Create order clause dynamically based on the field settings\n\t\t$order = $filter->parameters->get('orderby', 'alpha');\n\t\t$orderby = flexicontent_db::buildItemOrderBy(\n\t\t\t$filter->parameters,\n\t\t\t$order, $request_var = '', $config_param = '',\n\t\t\t$item_tbl_alias = 'ct', $relcat_tbl_alias = 'rel',\n\t\t\t$default_order = '', $default_order_dir = '', $sfx = '_form', $support_2nd_lvl = false\n\t\t);\n\n\t\t// WARNING: we can not use column alias in from, join, where, group by, can use in having (some DB e.g. mysql) and in order-by\n\t\t// partial SQL clauses\n\t\t$filter->filter_valuesselect = ' ct.id AS value, ct.title AS text';\n\t\t$filter->filter_valuesfrom = null; // use default\n\t\t$filter->filter_valuesjoin = ' JOIN #__content AS ct ON ct.id = fi.value_integer AND ct.state = 1 ' .\n\t\t\t' AND (ct.publish_up IS NULL OR ct.publish_up = ' . $db->Quote($nullDate) . ' OR ct.publish_up <= ' . $_nowDate . ')' .\n\t\t\t' AND (ct.publish_down IS NULL OR ct.publish_down = ' . $db->Quote($nullDate) . ' OR ct.publish_down >= ' . $_nowDate . ')';\n\t\t$filter->filter_valueswhere = null; // use default\n\t\t// full SQL clauses\n\t\t$filter->filter_groupby = ' GROUP BY fi.value_integer '; // * will be be appended with , fi.item_id\n\t\t$filter->filter_having = null; // use default\n\t\t$filter->filter_orderby = $orderby; // use field ordering setting\n\n\t\tFlexicontentFields::createFilter($filter, $value, $formName);\n\t}",
"function show_forms()\n {\n }",
"function simplenews_subscription_filter_form() {\n // Current filter selections in $session var; stored at form submission\n // Example: array('list' => 'all', 'email' => 'hotmail')\n $session = isset($_SESSION['simplenews_subscriptions_filter']) ? $_SESSION['simplenews_subscriptions_filter'] : '';\n $session = is_array($session) ? $session : _simplenews_subscription_filter_default();\n $filters = simplenews_subscription_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only subscription which'),\n '#collapsible' => FALSE,\n );\n\n // Filter values are default\n $form['filters']['list'] = array(\n '#type' => 'select',\n '#title' => $filters['list']['title'],\n '#options' => $filters['list']['options'],\n '#default_value' => $session['list'],\n );\n $form['filters']['email'] = array(\n '#type' => 'textfield',\n '#title' => $filters['email']['title'],\n '#default_value' => $session['email'],\n );\n $form['filters']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#prefix' => '<span class=\"spacer\" />',\n );\n // Add Reset button if filter is in use\n if ($session != _simplenews_subscription_filter_default()) {\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n );\n }\n\n return $form;\n}",
"function getSupportedFilters() {\n return array('event' => array(\n 'event_type_id' => array(\n 'form_field_name' => 'event_type_id',\n 'operator' => 'IN',\n ))\n );\n }",
"function getFilters() {\r\n global $filterList;\r\n foreach ($filterList as $filter) {\r\n echo getSelectionOptions($filter);\r\n }\r\n echo '<button type=\"submit\" value=\"submit\">Save Filters</button>';\r\n }",
"public function viewAllEvents();",
"function printEventsList($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template_lst');\n\t \t$groupby = get_option('fse_groupby');\n\t \t$groupby_hdr = get_option('fse_groupby_header');\n\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\tif (is_bool($a))\n\t \t\t\t\t$echo = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby':\n\t \t\t\t\tif (in_array($a, array('','d','m','y')))\n\t \t\t\t\t$groupby = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby_header':\n\t \t\t\t\t$groupby_hdr = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\n\t \t\t}\n\t \t}\n\n\t \t// Sort must be by date, the user can choos, if asc or desc...\n\t \tif (isset($filter['orderby'])) {\n\t \t\tunset($filter['orderby']);\n\t \t}\n\t \t$filter['orderby'] = array('datefrom');\n\n\t \tif (isset($filter['orderdir'])) {\n\t \t\t$dir = $filter['orderdir'];\n\t \t\tif (isset($dir[0]))\n\t \t\t$dir = $dir[0];\n\t \t\telse\n\t \t\t$dir = 'asc';\n\t \t\tunset($filter['orderdir']);\n\t \t} else {\n\t \t\t$dir = 'asc';\n\t \t}\n\t \t$filter['orderdir'] = array($dir);\n\n\t \t$ret = '';\n\n\t \t$evt = $this->getEventsExternal($args);\n\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tif ($evt !== false) {\n\t \t\t$d = $m = $y = -1;\n\t \t\tforeach($evt as $e) {\n\t \t\t\t$dn = $e->getStart('d');\n\t \t\t\t$mn = $e->getStart('m');\n\t \t\t\t$yn = $e->getStart('y');\n\n\t \t\t\tif (($groupby == 'y' && $yn != $y) ||\n\t \t\t\t($groupby == 'm' && ($yn != $y || $mn != $m)) ||\n\t \t\t\t($groupby == 'd' && ($yn != $y || $mn != $m || $dn != $d))) {\n\n\t \t\t\t\t//echo $yn.'-'.$y.':'.$mn.'-'.$m.'<br />';\n\n\t \t\t\t\tif ($d != -1) {\n\t \t\t\t\t\t$ret .= '</ul></li>';\n\t \t\t\t\t}\n\t \t\t\t\t$ret .= '<li class=\"event_header\">'.$e->getStart($groupby_hdr).'<ul class=\"events\">';\n\t \t\t\t\t$d = $dn;\n\t \t\t\t\t$m = $mn;\n\t \t\t\t\t$y = $yn;\n\t \t\t\t}\n\t \t\t\t$ret .= '<li class=\"event\" id=\"event-'.$e->eventid.'\">';\n\t \t\t\t$ret .= $this->filterContent($template, $e);\n\t \t\t\t$ret .= '</li>';\n\t \t\t}\n\t \t\tif ($d != -1) {\n\t \t\t\t$ret .= '</ul></li>';\n\t \t\t}\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.'<ul class=\"groups\">'.$ret.'</ul>'.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }",
"public function actionIndex()\n {\n $searchModel = new EventSearch([\n 'start_date' => date('Y-m-d'),\n ]);\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"private function filterEvents( $filter_string , $events ){\n\t\t$filters = explode(',' , $filter_string );\n\n\t\t$events_filtered = array();\n\t\tforeach ($events as $event) {\n\t\t\tif(isset($event['original']))\n\t\t\t\t$event_text = $event['original'];\n\t\t\telse\n\t\t\t\t$event_text = $event['summary'];\n\t\t\t$fits = FALSE;\n\t\t\tforeach( $filters as $filter ){\n\t\t\t\t$filter_without_semicolons = str_replace([' :',':'], '', $filter );\n\n\t\t\t\tif(stristr($event_text,$filter) || stristr(str_replace(' :',':',$event_text), $filter) || strtolower(substr(trim($event_text), 0, strlen($filter_without_semicolons))) === strtolower($filter_without_semicolons) ){\n\t\t\t\t\t// stripping the category from the title\n\t\t\t\t\t$prefixes = [ $filter , str_replace(':',' :',$filter) ];\n\t\t\t\t\tforeach($prefixes as $prefix){\n\t\t\t\t\t\tif (substr(strtolower($event_text), 0, strlen($prefix)) == strtolower($prefix)) {\n \t\t\t\t\t\t// $event_text = substr($event_text, strlen($prefix));\n \t\t\t\t\t\t// $event['category'] = str_replace(':','',strtolower($prefix));\n \t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// echo 'fits filter '.$filter.'<br>';\n\t\t\t\t\t// $event['summary'] = $event_text;\n\t\t\t\t\t$fits = TRUE;\n\t\t\t\t\t$analyse_summary = Event::filterType($event_text);\n\t\t\t\t\t$event['original'] = $event_text;\n\t\t\t\t\t$event['summary'] = $analyse_summary['summary'];\n\t\t\t\t\t$event['city'] = isset($analyse_summary['city'])?$analyse_summary['city']:'';\n\t\t\t\t\t$event['category'] = isset($analyse_summary['type'])?$analyse_summary['type']:'';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Adding some info to help\n\t\t\tif(!isset($event['start']['dateTime']) && isset($event['start']['date'])){\n\t\t\t\t$event['start']['dateTime'] = $event['start']['date'];\n\t\t\t}\n\t\t\t$datetime = new \\Datetime($event['start']['dateTime']);\n\t\t\t$event['start']['weekday'] = $datetime->format('N');\n\n\t\t\t// Adding the picture\n\t\t\t// $creator_email = isset($event['creator']['email'])?$event['creator']['email']:null;\n\t\t\t$organizer_id = isset($event['extendedProperties']['shared']['organizer_id'])?$event['extendedProperties']['shared']['organizer_id']:null;\n\t\t\t\n\t\t\tif(!is_null($organizer_id) && !isset($event['school'])){\n\t\t\t\t\n\t\t\t\t$school = School::findOne($organizer_id);\n\n\t\t\t\tif($school){\n\t\t\t\t\t$event['email'] = $school->email;\n\t\t\t\t\t$event['school'] = array();\n\t\t\t\t\t$event['school']['picture'] = $school->getPictureUrl();\n\t\t\t\t\t$event['school']['thumb'] = $school->getThumbUrl();\n\t\t\t\t\t$event['school']['name'] = $school->name;\n\t\t\t\t\tif(isset($school->website))\n\t\t\t\t\t\t$event['school']['url'] = $school->website;\n\t\t\t\t\telse if(isset($school->facebook))\n\t\t\t\t\t\t$event['school']['url'] = $school->facebook;\n\t\t\t\t\tif($school->email){\n\t\t\t\t\t\t$event['email'] = $school->email;\n\t\t\t\t\t}\n\t\t\t\t\tif($school->active == false){\n\t\t\t\t\t\t$fits = FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($event['extendedProperties']['shared']['disabled']) && $event['extendedProperties']['shared']['disabled'] == 1){\n\t\t\t\t$fits = FALSE;\n\t\t\t}\n\t\t\tif( $fits == TRUE ){\n\t\t\t\t$events_filtered[$event['id']] = $event;\n\t\t\t}\n\n\t\t}\n\t\treturn $events_filtered;\n\t}",
"public function viewEvents();",
"public function actionIndex()\n {\n // Set Menu Collapse\n #$session = Yii::$app->session;\n #$session->set('collapse', 'sidebar-collapse');\n // \\.Set Menu Collapse\n\n\n $searchModel = new EventSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->query->orderBy(['order_date' => SORT_DESC]);\n $dataProvider->query->andWhere([\"comp_id\" => Yii::$app->session->get('Rules')['comp_id']]);\n $dataProvider->pagination->pageSize=10;\n\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function events()\n {\n //search query\n $query = Input::get('query');\n\n if ($query == 'latest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n elseif ($query == 'oldest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'asc')->paginate(5);\n }\n else\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n return View::make('/events', ['exhibitions' => $exhibitions]);\n }",
"public function showGenreFilterList($genres) {\r\n\t\tprint \"<div class='filter-content'>\";\r\n\t\tforeach ($genres as $genre) {\r\n\t\t\tprint \"<a onclick='genreInputUpdate(this.text);'>\".$genre['genre_name'].\"</a>\";\r\n\t\t}\r\n\t\tprint \"</div>\";\r\n\t}",
"private function filters() {\n\n\n\t}",
"public function show()\n {\n return view('events::show');\n }",
"function display_event_espresso_table(){\n\tglobal $wpdb;\n\t$org_options = get_option('events_organization_settings');\n\t$event_page_id =$org_options['event_page_id'];\n\t$curdate = date(\"Y-m-d\");\n?>\n<form id=\"event_espresso_table\" name=\"event_espresso_table\" method=\"post\" action=\"<?php echo get_option('siteurl')?>/?page_id=<?php echo $event_page_id?>&e_reg=register\">\n <table width=\"100%\" border=\"0\">\n <thead align=\"left\">\n\t\t<th><?php _e('Location','event_espresso'); ?></th>\n\t\t<th><?php _e('Date','event_espresso'); ?></th>\n\t\t<th><?php _e('Times','event_espresso'); ?></th>\n\t</thead>\n\t<tbody>\n<?php\n\t\n\t$sql = \"SELECT e.* FROM \". EVENTS_DETAIL_TABLE . \" e \";\n\t$sql .= \" WHERE is_active = 'Y' \";//Makes sure event is active\n\t$sql .= \" AND event_status != 'D' \";//Makes sure event is not deleted\n\t//$sql .= \" AND event_status = 'O' \";//Un-comment to only show ongoing events\n\t\t\t\t\t\n\t//Removing this line keeps events from showing that may be expired\n\t$sql .= \" AND start_date >= '\".date ( 'Y-m-d' ).\"' \";\n\t\t\t\t\t\n\t//These lines are used to show events within a registration start and end period\n\t$sql .= \" AND e.registration_start <= '\".date ( 'Y-m-d' ).\"' \";\n\t$sql .= \" AND e.registration_end >= '\".date ( 'Y-m-d' ).\"' \";\n\t\t\t\t\t\n\t//This line orders the events by date\n\t$sql .= \" ORDER BY date(start_date), id\";\n\t\n\t$results = $wpdb->get_results($sql);\n\tif ($wpdb->num_rows > 0) {\n\t\tforeach ($results as $result){\n\t\t\t$event_id= $result->id;\n\t\t\t$event_name=stripslashes($result->event_name);\n\t\t\t$event_identifier=stripslashes($result->event_identifier);\n\t\t\t$address = $result->address;\n\t\t\t$reg_limit = $result->reg_limit;\n\t\t\t$start_date = $result->start_date;\n\t\t\t$end_date = $result->end_date;\n\t\t\t$is_active= $result->is_active;\n?>\t\t\t\n\t<tr>\n <td align=\"left\" valign=\"top\">\n <p class=\"event_title\"><?php echo $event_name?></p>\n \n <p><?php _e('Address:','event_espresso'); ?> <br />\n\t\t <?php echo $address?>\n <br />\n <?php _e('Phone:','event_espresso'); ?> <?php echo $phone?>\n </p></td>\n <td align=\"left\" valign=\"top\"><p>\n <?php echo event_date_display($start_date, 'l, M d, Y')?>\n </p></td>\n <td valign=\"top\" align=\"left\">\n <?php \n $event_times = $wpdb->get_results(\"SELECT * FROM \" . EVENTS_START_END_TABLE . \" WHERE event_id='\".$event_id.\"'\");\n foreach ($event_times as $time){\n\t\t\t\t\t$start_time = $time->start_time;\n\t\t\t\t\t$time_id = $time->id;\n ?>\n <p><label>\n <input type=\"radio\" name=\"event_id_time\" value=\"<?php echo $event_id?>|<?php echo $start_time?>|<?php echo $time_id?>\" id=\"event_id_<?php echo $event_id?>_<?php echo $time_id?>\" />\n <?php echo $start_time?>\n </label>\n </p>\n<?php \t}?>\n\t\t</td>\n </tr>\n<?php\t\n\t\t}//End for each event details\n\t\t\n\t}else{\n?>\t\t\t\n\t<tr><h3 class=\"expired_event\"><?php _e('Sorry, there are no events here.','event_espresso'); ?></h3></tr>\n<?php\t\n}\t?>\n\n </tbody>\n </table>\n <input name=\"Submit\" type=\"submit\" value=\"Register\" />\n </form>\n<?php //$myrole = event_espresso_get_current_user_role();\n//echo $myrole;?>\n<?php\n}",
"function get_form_filter() {\n\n $val_ = new OrSysvalue();\n if (!is_null($var_)) {\n foreach ($val_->filter AS $id => $value) {\n //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ;\n if ($id != 'filter_by') {\n if (!$this->filter_use[$id]) {\n $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n\n if ($val_->compare[$id] == 'BETWEEN' OR $val_->message[$id . '_II'] != '') {\n $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n }\n }\n $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_compare->get_tag();\n }\n }\n }\n\n\n /* $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_body');\n $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n $my_table->set_row(); */\n $my_table = (' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n return $my_table;\n }",
"function showPostFilterPanel(){\r\n\t\techo \"<div class='filterPanel'>\";\r\n\t\techo \"<form id='orderForm' class='orderBy' action='#' method='POST'>\";\r\n\t\techo \"<div>\";\r\n\t\techo \"<label class='filterLabel'>Ordina per: </label>\";\r\n\t\techo \"<select name='filter'>\";\r\n\t\techo \"<option value='title'>Titolo</option>\";\r\n\t\techo \"<option value='date'>Data</option>\";\r\n\t\techo \"<option value='comment'>Commenti</option>\";\r\n\t\techo \"<option value='like'>Likes</option>\";\r\n\t\techo \"<option value='dislike'>Dislikes</option>\";\r\n\t\techo \"</select>\";\r\n\t\techo \"<label class='filterLabel'>Crescente <input type='radio' name='order' value='asc' checked></label>\";\r\n\t\techo \"<label class='filterLabel'>Decrescente <input type='radio' name='order' value='desc'></label>\";\r\n\t\techo \"</div>\";\r\n\t\techo \"<button type='submit' class='button smallButton' name='sort'>Ordina</button>\";\r\n\t\techo \"</form>\";\r\n\t\techo \"</div>\";\r\n\t}",
"public function show(EventCalendar $eventCalendar)\n {\n //\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $events = $em->getRepository('AppBundle:Event')->getAllNotPrivateEvent($this->getUser(), null);\n\n $form = $this->createForm(SearchType::class, null, array(\n 'action' => $this->generateUrl('result_search'),\n 'method' => \"post\",\n 'attr' => array(\n 'id' => \"searchFormEvent\",\n )\n ));\n\n if ($this->getUser() != null){\n $reservations = $em->getRepository(Reservation::class)->getIdEventReservationByUser($this->getUser());\n $this->setReservation($events['public'], $reservations);\n $this->setReservation($events['private'], $reservations);\n }\n\n return $this->render(\n 'event/index.html.twig', array(\n 'events' => $events,\n 'events_json' => json_encode($events),\n 'formSearch' => $form->createView()\n )\n );\n }",
"function show_filter_process()\n\t\t{\n\t\t\t$this->t->set_var('filter_process_up', $this->filter_process);\n\t\t\t// now show the filter process select\n\t\t\t$this->t->set_var('filter_process_selected_all', (!$this->filter_process)? 'selected=\"selected\"' : '');\n\t\t\t$this->t->set_block($this->template_name, 'block_filter_process', 'filter_process');\n\t\t\tforeach ($this->all_processes['data'] as $process)\n\t\t\t{\n\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t'filter_process_selected'\t=> ($process['wf_p_id'] == $this->filter_process)? 'selected=\"selected\"' : '',\n\t\t\t\t\t'filter_process_value'\t\t=> $process['wf_p_id'],\n\t\t\t\t\t'filter_process_name'\t\t=> $process['wf_name'],\n\t\t\t\t\t'filter_process_version'\t=> $process['wf_version'],\n\n\t\t\t\t));\n\t\t\t\t$this->t->parse('filter_process', 'block_filter_process', true);\n\t\t\t}\n\t\t}",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function filtersummaryAction()\r\n {\r\n \t/*\r\n \t * form needs to include:\r\n \t * \r\n \t * user id\r\n \t * task category\r\n \t * client id\r\n \t * project id\r\n \t * start date\r\n \t * end date\r\n \t */\r\n $this->view->allUsers = $this->userService->getUserList();\r\n $task = new Task();\r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->clients = $this->clientService->getClients();\r\n \t $this->view->projects = new ArrayObject();\r\n $this->renderView('timesheet/filterSummary.php'); \t\r\n }",
"public function renderFilterBox($module)\n {\n $this->view->module = $module;\n $this->view->xRender($this->folder . \"list_filter\");\n XyneoApplication::setLayout($this->layout);\n }",
"function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}",
"public function get_calendar() {\n $start = date('Y-m-d H:i:s', strtotime($this->input->post('start_date')));\n $end = date('Y-m-d H:i:s', strtotime($this->input->post('end_date')));\n $filter = $this->input->post('filter');\n if ($start && $end) {\n if (isset($filter) && !empty($filter) && !in_array($filter, config_item('event_types'))) {\n return $this->send_error('INVALID_FILTER');\n }\n $this->load->model('events_model');\n $where = array('start_date >=' => $start, 'end_date <=' => $end);\n if (isset($filter) && !empty($filter)) {\n $where['type'] = $filter;\n }\n if ($events = $this->events_model->get_all($where)) {\n setlocale(LC_TIME, 'nl_NL.UTF-8');\n foreach ($events as &$event) {\n $event['readable_start_date'] = strftime('%A %d %B %G', strtotime($event['start_date']));\n $event['readable_end_date'] = strftime('%A %d %B %G', strtotime($event['end_date']));\n }\n $this->event_log();\n return $this->send_response($events);\n }\n return $this->send_error('NO_RESULTS');\n } else {\n return $this->send_error('ERROR');\n }\n }",
"function showGetEventSources() {\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t$this->render($this->getTpl('sourceList', '/account'));\n\t}",
"public function index()\n {\n if(isset($_GET['search'])){\n $model = DB::table('events')\n ->where('name', 'LIKE', '%'.$_GET['search'].'%')\n ->get();\n }else{\n $model = Model::get();\n }\n\n return view('events.index')->with(array('data'=>$model, 'controller' => 'events'));\n }",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n if ($this->formFilters)\n {\n foreach ($this->formFilters as $filterKey => $formFilter)\n {\n $operator = isset($this->operators[$filterKey]) ? $this->operators[$filterKey] : 'like';\n $filterField = isset($this->filterFields[$filterKey]) ? $this->filterFields[$filterKey] : $formFilter;\n $filterFunction = isset($this->filterTransformers[$filterKey]) ? $this->filterTransformers[$filterKey] : null;\n \n // check if the user has filled the form\n if (isset($data->{$formFilter}) AND $data->{$formFilter})\n {\n // $this->filterTransformers\n if ($filterFunction)\n {\n $fieldData = $filterFunction($data->{$formFilter});\n }\n else\n {\n $fieldData = $data->{$formFilter};\n }\n \n // creates a filter using what the user has typed\n if (stristr($operator, 'like'))\n {\n $filter = new TFilter($filterField, $operator, \"%{$fieldData}%\");\n }\n else\n {\n $filter = new TFilter($filterField, $operator, $fieldData);\n }\n \n // stores the filter in the session\n TSession::setValue($this->activeRecord.'_filter', $filter); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, $filter);\n TSession::setValue($this->activeRecord.'_'.$formFilter, $data->{$formFilter});\n }\n else\n {\n TSession::setValue($this->activeRecord.'_filter', NULL); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, NULL);\n TSession::setValue($this->activeRecord.'_'.$formFilter, '');\n }\n }\n }\n \n TSession::setValue($this->activeRecord.'_filter_data', $data);\n TSession::setValue(get_class($this).'_filter_data', $data);\n \n // fill the form with data again\n $this->form->setData($data);\n \n $param=array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }",
"public function actionIndex()\n {\n Yii::$app->cache->gc(true);\n $searchModel = new EventSearchForm();\n\n $query = Event::find()->where(['>=', 'UNIX_TIMESTAMP(end_date)', time()]);\n\n $query = $query->joinWith('user');\n\n $pagination = new Pagination([\n 'defaultPageSize' => 10,\n 'totalCount' => $query->count(),\n ]);\n\n $goa = new GoaBaseApi();\n\n if (Yii::$app->cache->get('goabase') == NULL) { //if not in cache load from api\n //list of goa parties, Type: ArrayList with Events\n $goaParties = $goa->getParties();\n Yii::$app->cache->set('goabase', $goaParties, 300);\n } else { //load from cache\n $goaParties = Yii::$app->cache->get('goabase');\n }\n // Event List ordered by date\n $eventList = $query->orderBy('start_date')->all();\n\n // Daten für die Autovervollständiung\n foreach($eventList as $eventName)\n array_push($searchModel->eventNameList, $eventName->name);\n\n //-----Add GoaParties to eventList--------\n $goaId = $query->count();\n\n //append goaparties to eventList (intern parties)\n for ($i=0 ; $i < count($goaParties) ; $i++) {\n $eventList[$goaId] = $goaParties[$i];\n ++$goaId;\n }\n\n // Sort Event List\n $eventList = $this->sortEventList($eventList);\n\n // Top Events\n $topList = $query->orderBy(['clicks' => SORT_DESC])->limit(3)->all();\n\n // New Events\n $newList = $query->orderBy(['creation_date' => SORT_DESC])->limit(3)->all();\n\n return $this->render('index', ['searchModel' => $searchModel,\n 'eventList' => $eventList,\n 'pagination' => $pagination, 'topList' => $topList, 'newList' => $newList]);\n }",
"function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}",
"function showEvent() \n {\n if (isset($_SESSION['eventid']) AND isset($_SESSION['eventguest'])) {\n // event und gast informationen\n echo \"<div class=''>\";\n echo \"<div class='rightBody'>\";\n $this->askUserForZusage($_SESSION['eventid']);\n $this->askUserForCount($_SESSION['eventid']);\n $this->showSmallGuestList();\n echo \"</div>\";\n echo \"<div class='innerBody'>\";\n echo \"<ul class='finanzNAV'>\";\n $this->eventAdministration();\n echo \"</ul>\";\n $eventname = $this->getEventname($_SESSION['eventid']);\n echo \"<h1><a href='event.php'>\" .$eventname . \"</a></h1>\";\n echo \"<h2>Willkommen \" . $this->getGuestName($_SESSION['eventguest']) . \"</h2>\";\n $this->showWelcomeMessage($_SESSION['eventid']);\n $this->showCountdowns($_SESSION['eventid']);\n $this->showBlogMessages($_SESSION['eventid']);\n echo \"</div>\";\n echo \"</div>\";\n \n }\n }",
"public function showAction(Event $event)\n {\n $deleteForm = $this->createDeleteForm($event);\n\n return $this->render('event/show.html.twig', array(\n 'event' => $event,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function showAction(Event $event)\n {\n $deleteForm = $this->createDeleteForm($event);\n\n return $this->render('event/show.html.twig', array(\n 'event' => $event,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"static function add_filters(): void {\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_group']);\r\n\r\n\t\tself::add_tab('Divisions');\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_divisions']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_name']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_notes']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_d_priority']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_roles']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_title']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_r_priority']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_voting']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_email']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_archival']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_aliases']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_alias']);\r\n\r\n\t\tself::add_tab('Layout');\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_show_emails']);\r\n\t}",
"protected function getFiltersForm(){\n $table = ORM::getTable('word');\n $name = $table->getField('name');\n $value = $table->getField('value');\n\n $pseudo = new OrmTable('pseudo_languages');\n $pseudo->addField($name);\n $pseudo->addField($value);\n $form = UI::getFormForTable($pseudo, array(), UI::LAYOUT_BLOCK);\n $form['id'] = 'word_filters';\n $form['fields']['value']['tag'] = UI::TAG_INPUT;\n unset($form['fields']['value']['title']);\n unset($form['fields']['name']['title']);\n $form['fields']['name']['attributes']['onblur'] ='Word.filterTerms()';\n $form['fields']['name']['attributes']['placeholder'] = Word::get('admin','word_name_filter');\n $form['fields']['value']['attributes']['onblur'] = 'Word.filterTerms()';\n $form['fields']['value']['attributes']['placeholder'] = Word::get('admin','word_value_filter');\n return $form;\n }",
"public function displayFilterField($form)\n\t{\n\t\t// See: https://docs.joomla.org/Talk:Checkbox_form_field_type\n\t\t?>\n\t\t<input type=\"hidden\" name=\"jform[settings][chk_filter]\" value=\"0\">\n\t\t<div class=\"control-group\">\n\t\t\t<div class=\"control-label\"><?php echo $form->getLabel('fieldname'); ?></div>\n\t\t\t<div class=\"controls\"><?php echo $form->getInput('fieldname'); ?></div>\n\t\t</div>\n\t\t<div class=\"control-group\">\t\n\t\t\t<div class=\"control-label\"><?php echo $form->getLabel('chk_filter', 'settings'); ?></div>\n\t\t\t<div class=\"controls\"><?php echo $form->getInput('chk_filter', 'settings'); ?></div>\n\t\t</div>\n\t\t<?php \n\t\techo $form->getInput('field_id');\n\t}",
"public function indexAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $events = $em->getRepository('AppBundle:Event')->findAll();\n $dql = \"SELECT e FROM AppBundle:Event e\";\n $query = $em->createQuery($dql);\n\n $queryBuilder = $em->getRepository('AppBundle:Event')->createQueryBuilder('e');\n\n if ($request->query->getAlnum('filter')) {\n $queryBuilder\n ->where('e.name LIKE :name')\n ->setParameter('name', '%' . $request->query->getAlnum('filter') . '%');\n }\n\n $query = $queryBuilder->getQuery();\n\n /**\n * @var $paginator \\Knp\\Component\\Pager\\Paginator\n */\n $paginator = $this->get('knp_paginator');\n $result = $paginator->paginate(\n $query,\n $request->query->getInt('page', 1),\n $request->query->getInt('limit', 15)\n );\n\n return $this->render('event/index.html.twig', array(\n 'events' => $result,\n ));\n }",
"public function getEvents(array $filters = array());",
"public function index()\n {\n\n $events = DB::table('events')\n ->where('event_date', '>', date('Y-m-d').' 00:00:00')\n ->orderBy('event_date', 'asc')\n ->take(8)\n ->get();\n\n return view('events.index')->withEvents($events);\n\n }"
] | [
"0.67403555",
"0.66237015",
"0.6620433",
"0.6577908",
"0.6572314",
"0.64820915",
"0.64757985",
"0.64642227",
"0.6451821",
"0.64418465",
"0.64270884",
"0.6377905",
"0.6345389",
"0.633572",
"0.633212",
"0.6311437",
"0.6264589",
"0.6210457",
"0.61994237",
"0.6182095",
"0.6170857",
"0.6170483",
"0.6170367",
"0.61598325",
"0.613182",
"0.613182",
"0.613182",
"0.6109808",
"0.60599625",
"0.6049257",
"0.6027917",
"0.60184443",
"0.6006219",
"0.59952474",
"0.59806436",
"0.5972078",
"0.59707326",
"0.595914",
"0.59523726",
"0.59489286",
"0.5945294",
"0.5940265",
"0.5922381",
"0.5922154",
"0.59105617",
"0.5905421",
"0.58805245",
"0.5878535",
"0.5871697",
"0.58628666",
"0.58611774",
"0.58322936",
"0.58126754",
"0.5810585",
"0.580434",
"0.5788349",
"0.5785105",
"0.5783823",
"0.5782682",
"0.5782057",
"0.5776472",
"0.57701075",
"0.5753711",
"0.57464254",
"0.57434523",
"0.5742779",
"0.57378095",
"0.57374114",
"0.57352954",
"0.5727894",
"0.5726254",
"0.57166517",
"0.5711467",
"0.5694166",
"0.5692173",
"0.5682024",
"0.56807005",
"0.5669447",
"0.56661403",
"0.56629246",
"0.56628877",
"0.56581813",
"0.56576496",
"0.565689",
"0.565609",
"0.5649149",
"0.5633022",
"0.5631582",
"0.5629323",
"0.5622759",
"0.5615653",
"0.559763",
"0.5597449",
"0.5597449",
"0.559502",
"0.5592947",
"0.5588603",
"0.5583747",
"0.55774647",
"0.55769706"
] | 0.7078388 | 0 |
Get the event list and output | function obj_do_cx_events_list( $events ) {
if (is_array($events) ) {
echo '<div class="event-list-grid">';
foreach ($events as $event ) {
obj_do_cx_event_item_output($event);
}
echo '</div>';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEvents();",
"public function getEvents();",
"function getEvents() {\n return [];\n }",
"public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }",
"public function viewEvents();",
"public function viewAllEvents();",
"public static function list_events()\n\t{\n\t\treturn cms_orm('CmsDatabaseEvent')->find_all(array('order' => 'module_name, event_name'));\n\t}",
"public function getEventList() {\n $response = $this->client->get(\n $this->apiUrl . \"events\");\n return $response->json();\n }",
"public function getEventInfos() {\n // today will be useful \n $today = new \\DateTime(\"today midnight\");\n \n // get all events\n $events = $this->_machine->plugin(\"DB\")->getEventsFromDB(\"AND events.active = 1\");\n \n // retrieve dates with events\n $dates = [];\n foreach ($events as $ev) {\n $from = new \\DateTimeImmutable($ev[\"time_from\"]);\n $to = new \\DateTimeImmutable($ev[\"time_to\"]);\n $date = $from;\n while ($date <= $to) {\n $dates = $this->_insertDate($dates, $date);\n $date = $date->modify(\"+1 day\");\n }\n }\n \n // retrieve events for today\n $today_events = $this->getEventsForRange(\n $today, $today\n );\n \n // retrieve events for next weekend\n $next_weekend_events = $this->getNextWeekendEvents();\n\n $result = [\n \"tot\" => count($events),\n \"dates\" => $dates,\n \"today\" => $today_events,\n \"next_weekend\" => $next_weekend_events,\n \"events\" => $events\n ];\n \n return $result;\n }",
"public function getOtherEvents();",
"public function get_event_list()\n\t{\n\treturn $this->cal['VEVENT'];\n\t}",
"public function listEvents()\n\t{\n\n\t\t$table=CaseItemModel::getInstance()->getTable();\n $pTable=ProcessModel::getInstance()->getTable();\n $piTable=ProcessItemModel::getInstance()->getTable();\n \n\t\t$status =\"status not in ('Complete','Terminated') \";\n \n\t\t$sql=\"select 'Case Item' as source,id,null as processName, processNodeId,caseId,type,subType,label,timer,timerDue,message,signalName \"\n . \" from $table \"\n . \" where $status\"\n .\" and subType in('timer','message','signal')\";\n\t\t$arr1= $this->db->select($sql);\n\n\t\t$sql=\"select 'Process Item' as source ,p.processName as processName, pi.id as id,pi.processNodeId,null as caseId,pi.type,subType,label,timer,timerDue,message,signalName \"\n . \" from $piTable pi\n join $pTable p on p.processId=pi.processId\n where subType in('timer','message','signal')\";\n \n \n\t\t$arr2= $this->db->select($sql);\n\t\t$results= array_merge($arr1,$arr2);\n\n\t\treturn $results;\n\t}",
"public function getEvents()\n {\n if ($this->input->get('start') === null || $this->input->get('end') === null) {\n $response = array(\"status\" => false, \"message\" => 'Please provide necessary data.');\n\n $this->send(400, $response);\n }\n\n $reqData = array('start' => $this->input->get('start'), 'end' => $this->input->get('end'));\n\n $events = $this->model->getEvents($reqData);\n\n $this->send(200, $events);\n }",
"public function index()\n {\n return $this->eventsToArray(Event::all());\n }",
"public function getEvents() { return $this->_events; }",
"public function indexAction()\n {\n $listToken = Mage::app()->getRequest()->getParam('t');\n $data = $this->getInputStream();\n\n $this->consumeEvents($listToken, $data);\n }",
"public function getEvents()\n {\n if (isset($this->list)) {\n return $this->list;\n } else {\n return false;\n }\n }",
"public function getEvents()\n {\n return json_decode((string) $this->response->getBody())->events;\n }",
"public function getEvent();",
"function ReadEvents()\n {\n $this->ApplicationObj()->Events=\n $this->Sql_Select_Hashes\n (\n $this->ApplicationObj()->HtmlEventsWhere(),\n array(),\n array(\"StartDate\",\"ID\")\n );\n \n $this->ApplicationObj()->Events=array_reverse($this->ApplicationObj()->Events);\n }",
"function listEventInfo() {\n\t\t$query = \"SELECT e_description, c_name, tag_name, start_datetime, end_datetime, capacity, v.name AS vname, address,o.name AS oname, v.address, v.city, v.state, v.postal_code \n\t\tFROM yam14.F_event e, yam14.F_venue v, yam14.F_category c, yam14.F_topic t, yam14.F_organizer o\n\t\tWHERE e.venue_id = v.v_id \n\t\tAND c.c_id = e.c_id \n\t\tAND t.tag_id = e.tag_id \n\t\tAND o.o_id = e.organizer_id\n\t\tAND e.e_id = $this->eid ;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->category = $row['c_name'];\n\t\t\t$this->tag = $row['tag_name'];\n\t\t\t$this->description = $row['e_description'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t$this->capacity = $row['capacity'];\n\t\t\t$this->venue = $row['vname'];\n\t\t\t$this->address = $row['address'] . \", \" . $row['city'] . \", \" . $row['state'] . \" \" . $row['postal_code'];\n\t\t\t$this->organizer = $row['oname'];\n\t\t\techo \"<hr />\";\n\t\t\techo \"<div class=\\\"panel panel-default\\\">\";\n\t\t\techo \t\"<div class=\\\"panel-heading\\\">\";\n\t\t\techo \t\"<h3 class=\\\"panel-title\\\">Event Information</h3>\";\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"<div class=\\\"panel-body\\\">\";\n\t\t\techo \"<p><b>Description: </b>$this->description</p>\";\n\t\t\techo \t\"<p><b>Category: </b>$this->category</p>\";\n\t\t\techo \t\"<p><b>Topic: </b>$this->tag</p>\";\n\t\t\techo \t\"<p><b>Start Date: </b>$this->startdate</p>\";\n\t\t\techo \t\"<p><b>Start Time: </b>$this->starttime</p>\";\n\t\t\techo \t\"<p><b>End Date: </b>$this->enddate</p>\";\n\t\t\techo \t\"<p><b>End Time: </b>$this->endtime</p>\";\n\t\t\techo \t\"<p><b>Capacity: </b>$this->capacity</p>\";\n\t\t\techo \t\"<p><b>Organizer: </b>$this->organizer</p>\";\n\t\t\techo \t\"<p><b>Location: </b>$this->venue</p>\";\n\t\t\techo \t\"<p><b>Address: </b>$this->address</p>\";\n\t\t\t\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"</div>\";\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t}",
"public function events()\n {\n return $this->events;\n }",
"public function events()\n {\n return $this->events;\n }",
"private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}",
"public function getEvents(){\n\t\t// prepares the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/event\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the reponse of the API\n\t\t$events = json_decode($output, true);\n\n\t\t// format the date\n\t\tforeach ($events as $key => $event) {\n\t\t\t$events[$key]['date'] = explode('T', $event['date'])[0];\n\t\t}\n\n\t\t// if the user is not connected or if he is a student, remove events which are not public\n\t\tif (!isset($_SESSION['status']) || $_SESSION['status'] == 'student'){\n\t\t\t$publicEvents = [];\n\t\t\t$eventNumber = sizeof($events);\n\t\t\tfor($i=0 ; $i < $eventNumber; $i++){\n\t\t\t\t$event = array_shift($events);\n\t\t\t\tif($event['is_public'] == 1){\n\t\t\t\t\tarray_push($publicEvents, $event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $publicEvents;\n\t\t}\n\n\t\t// return all events\n\t\treturn $events;\n\t}",
"public static function events();",
"public function getEvents() : array\n {\n $events = [];\n\n for ($i = 1; $i <= 2; $i++) {\n for ($j = 1; $j <= 4; $j++) {\n for ($k = 1; $k <= 10; $k++) {\n $events []= new Event('install', $i, $j);\n\n if ($k < 3 || $j == 2)\n $events []= new Event('purchase', $i, $j);\n }\n }\n }\n\n return $events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function getEvents()\n {\n return $this->events;\n }",
"public function events_markup_collect(){\n\n // Return the events markup array\n return $this->events;\n\n }",
"public function getEvents()\n\t{\n\t\treturn $this->events;\n\t}",
"private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}",
"function event()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('event', $data)\n );\n $this->output($ret);\n }",
"public function fetchEvents()\n {\n // TODO: Implement fetchEvents() method.\n }",
"public function getEvents()\n {\n $startDate = new \\DateTime(\"-1 months\");\n $endDate = new \\DateTime(\"+3 months\");\n\n $repo = EntityUtils::getRepository(\"EventLegacy\");\n\n //Use a different function for getting events for a student\n if ($this->user_context->isStudent()) {\n return $this->getStudentEvents($startDate, $endDate);\n }\n\n $eventResults = $repo->getStudentEventsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n $quickAddResults = $repo->getStudentQuickAddShiftsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n\n return ['events' => $eventResults, 'quick_add_shifts' => $quickAddResults];\n }",
"public function getTimeEventsList(){\n return $this->_get(8);\n }",
"function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}",
"public function all()\n {\n $model = new Event();\n $events = $model->readAll();\n return ['events'=>$events];\n }",
"private function getEvents(OutputInterface $output)\n {\n $response = $this->client->get('http://api.joind.in/v2.1/events',\n ['query' => [\n 'tags' => [$this->tag],\n 'startdate' => $this->startDate,\n 'enddate' => $this->endDate,\n 'verbose' => 'yes',\n ]]\n );\n\n if (!$this->events = json_decode($response->getBody())->events) {\n $output->writeln('<error>No events found.</error>');\n exit(1);\n }\n }",
"public static function get_core_events_list($detail = true) {\n global $CFG;\n\n // Disable developer debugging as deprecated events will fire warnings.\n // Setup backup variables to restore the following settings back to what they were when we are finished.\n $debuglevel = $CFG->debug;\n $debugdisplay = $CFG->debugdisplay;\n $debugdeveloper = $CFG->debugdeveloper;\n $CFG->debug = 0;\n $CFG->debugdisplay = false;\n $CFG->debugdeveloper = false;\n\n $eventinformation = array();\n $directory = $CFG->libdir . '/classes/event';\n $files = self::get_file_list($directory);\n\n // Remove exceptional events that will cause problems being displayed.\n if (isset($files['unknown_logged'])) {\n unset($files['unknown_logged']);\n }\n foreach ($files as $file => $location) {\n $functionname = '\\\\core\\\\event\\\\' . $file;\n // Check to see if this is actually a valid event.\n if (method_exists($functionname, 'get_static_info')) {\n if ($detail) {\n $ref = new \\ReflectionClass($functionname);\n if (!$ref->isAbstract() && $file != 'manager') {\n $eventinformation = self::format_data($eventinformation, $functionname);\n }\n } else {\n $eventinformation[$functionname] = $file;\n }\n }\n }\n // Now enable developer debugging as event information has been retrieved.\n $CFG->debug = $debuglevel;\n $CFG->debugdisplay = $debugdisplay;\n $CFG->debugdeveloper = $debugdeveloper;\n return $eventinformation;\n }",
"Public function getEvents()\n\t{\n\t\t$result=$this->M_calendar->getEvents();\n\t\techo json_encode($result);\n\t}",
"public function getEvents()\n {\n return $this->_events;\n }",
"function event_list(){\n\tglobal $DB;\n\t$currenttime = time();\n\t$query = \"SELECT * FROM {event} WHERE eventtype='site' ORDER By id DESC\";\n $result = $DB->get_records_sql($query);\n\treturn $result;\n}",
"public function getEventsAction() {\n\t\tdate_default_timezone_set ( 'UTC' );\n\t\t\n\t\t// Short-circuit if the client did not give us a date range.\n\t\tif (! isset ( $_GET ['start'] ) || ! isset ( $_GET ['end'] )) {\n\t\t\tdie ( \"Please provide a date range.\" );\n\t\t}\n\t\t\n\t\t// Parse the start/end parameters.\n\t\t// These are assumed to be ISO8601 strings with no time nor timezone, like \"2013-12-29\".\n\t\t// Since no timezone will be present, they will parsed as UTC.\n\t\t$range_start = Object\\Shift::parseDateTime ( $_GET ['start'] );\n\t\t$range_end = Object\\Shift::parseDateTime ( $_GET ['end'] );\n\t\t$data [] = $range_start->toString ( \\Zend_Date::ISO_8601 );\n\t\t$data [] = $range_end->toString ( \\Zend_Date::ISO_8601 );\n\t\t// Parse the timezone parameter if it is present.\n\t\t$timezone = null;\n\t\tif (isset ( $_GET ['timezone'] )) {\n\t\t\t$timezone = new DateTimeZone ( $_GET ['timezone'] );\n\t\t}\n\t\t\n\t\t// Read and parse our events JSON file into an array of event data arrays.\n\t\t$json = file_get_contents ( PIMCORE_LAYOUTS_DIRECTORY . '/assets/json/events.json' );\n\t\t$input_arrays = new Object\\Shift\\Listing (); // json_decode($json, true);\n\t\t \n\t\t// Accumulate an output array of event data arrays.\n\t\t$output_arrays = array ();\n\t\tforeach ( $input_arrays as $event ) {\n\t\t\t\n\t\t\t// Convert the input array into a useful Event object\n\t\t\t// $event2 = Object\\Shift::create($event->toArray());\n\t\t\t// $event2->setKey(Pimcore_File::getValidFilename('New Name 10'));\n\t\t\t// $event2->setParentId(53);\n\t\t\t// $event2->save();\n\t\t\t// $output_arrays['new'] = $event2 ;\n\t\t\t\n\t\t\t// $data[]= $event->getEnd()->toString(\\Zend_Date::ISO_8601);\n\t\t\t// If the event is in-bounds, add it to the output\n\t\t\tif ($event->isWithinDayRange ( $range_start, $range_end )) {\n\t\t\t\t$output_arrays [] = $event->toCalendar ();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Send JSON to the client.\n\t\t$reponse = new Reponse ();\n\t\t\n\t\t$reponse->data = $output_arrays; // $input_arrays;\n\t\t$reponse->message = \"TXT_SHIFTS_SENT\";\n\t\t$reponse->success = true;\n\t\t\n\t\t$this->render ( $reponse );\n\t\t// echo json_encode($output_arrays);\n\t}",
"public function getEvents() {\n return $this->_events;\n }",
"public static function getEvents(): array\n {\n return is_array(static::$events) ? static::$events : [static::$events];\n }",
"public function &getTransactionEvents()\n {\n $this->_generateEventLabels();\n return self::$_eventList;\n }",
"public function &getTransactionEvents()\n {\n $this->_generateEventLabels();\n return self::$_eventList;\n }",
"private function GetEventData() {\n\t\t$lEventData = array();\n\t\t$lEventData = $this->m_taskModel->GetEventData((int)$this->m_eventId);\n\t\treturn $lEventData;\n\t}",
"public function getEventNames()/*# : array */;",
"public function getEventNames(){\n return array($this->getEventName() => array($this,'handle'));\n }",
"public function getDataCollectionEventsList() {\n return $this->_get(8);\n }",
"public function getEvents()\n {\n $events = $this->getPlatformEvents();\n\n $transformedEvents = array();\n foreach($events as $event) {\n $transformedEvents[] = $this->processSingleEvent($event);\n }\n\n return $transformedEvents;\n }",
"protected function getRegisteredEvents() {\n// $events = [];\n// foreach ($this->loadMultiple() as $rules_config) {\n// $event = $rules_config->getEvent();\n// if ($event && !isset($events[$event])) {\n// $events[$event] = $event;\n// }\n// }\n// return $events;\n }",
"public function get_test_scheduled_events()\n {\n }",
"public function getAllEvents()\n\t{\n\t\t$events = App_Model_Event_Mapper::getInstance()->getAll(true, \"actionId = $this->_actionId\", 'eventNo');\n\n\t\treturn $events;\n\t}",
"function getEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function getEvent() {\n\t}",
"public function getAllEvents() {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM events\");\n\n\n\n if ($stmt->execute()) {\n $events = $stmt->get_result();\n $stmt->close();\n return $events;\n } else {\n return NULL;\n }\n }",
"public function getEvents(array $filters = array());",
"function getEvent() {\t\n\n\t//Get the event from pipe and json_decode it\n\treturn json_decode(file_get_contents('php://input'));\n}",
"function get_events()\n\t{\n\t\t$usercode=$_REQUEST['usercode'];\n\t\t\n\t\t$userdt=$this->ObjM->get_user_by_usercode($usercode);\n\t\t\n\t\tif($userdt[0]['user_type_id']=='1'){\n\t\t\t\n\t\t\t$result = $this->get_school_event($userdt);\n\t\t\t\n\t\t}\n\t\t\n\t\tif(count($result)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\t\n\t\tfor($i=0;$i<count($result);$i++){\n\t\t\t$sr_no=$i+1;\n\t\t\t$json_arr[]=array(\n\t\t\t\t'sr_no' \t=> $sr_no,\n\t\t\t\t'event_dt' \t=> $result[$i]['event_dt'],\n\t\t\t\t'event_code' => $result[$i]['event_code'],\n\t\t\t\t'event_title' \t=> $result[$i]['event_title'],\n\t\t\t\t'cover_img' \t=> $result[$i]['cover_img'],\n\t\t\t\t'validation'=>'true'\n\t\t\t);\n\t\t}\n\t\t\n\t\techo json_encode($json_arr);\n\t}",
"function geteventlist(){\r\n\t\t\t$res=$this->auth_chk();\r\n\t\t\tif(isset($res[\"trust\"])){\r\n\t\t\t\t$data =$this->model->get_event_list($this->post());\r\n\t\t\t\techo json_encode($data);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(array(\"status\" => array(\"code\" => 1,'success'=>false,'msg'=>'User have no permission')));\t\r\n\t\t\t}\t\t\r\n\t\t}",
"public function index()\n {\n return Events::all()->jsonSerialize();\n }",
"function output( $args ){\r\n\t\tglobal $EM_Location;\r\n\t\t$EM_Location_old = $EM_Location; //When looping, we can replace EM_Location global with the current event in the loop\r\n\t\t//Can be either an array for the get search or an array of EM_Location objects\r\n\t\tif( is_object(current($args)) && get_class((current($args))) == 'EM_Location' ){\r\n\t\t\t$locations = $args;\r\n\t\t}else{\r\n\t\t\t$locations = self::get( $args );\r\n\t\t}\r\n\t\t//What format shall we output this to, or use default\r\n\t\t$format = ( $args['format'] == '' ) ? get_option( 'dbem_location_list_item_format' ) : $args['format'] ;\r\n\t\t\r\n\t\t$output = \"\";\r\n\t\tif ( count($locations) > 0 ) {\r\n\t\t\tforeach ( $locations as $location ) {\r\n\t\t\t\t$EM_Location = $location;\r\n\t\t\t\t/* @var EM_Event $event */\r\n\t\t\t\t$output .= $location->output($format);\r\n\t\t\t}\r\n\t\t\t//Add headers and footers to output\r\n\t\t\tif( $format == get_option ( 'dbem_location_list_item_format' ) ){\r\n\t\t\t\t$single_event_format_header = get_option ( 'dbem_location_list_item_format_header' );\r\n\t\t\t\t$single_event_format_header = ( $single_event_format_header != '' ) ? $single_event_format_header : \"<ul class='dbem_events_list'>\";\r\n\t\t\t\t$single_event_format_footer = get_option ( 'dbem_location_list_item_format_footer' );\r\n\t\t\t\t$single_event_format_footer = ( $single_event_format_footer != '' ) ? $single_event_format_footer : \"</ul>\";\r\n\t\t\t\t$output = $single_event_format_header . $output . $single_event_format_footer;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$output = get_option ( 'dbem_no_events_message' );\r\n\t\t}\r\n\t\t//FIXME check if reference is ok when restoring object, due to changes in php5 v 4\r\n\t\t$EM_Location_old= $EM_Location;\r\n\t\treturn $output;\t\t\r\n\t}",
"public static function getSubscribedEvents();",
"public static function getSubscribedEvents();",
"private function getEvents($type)\r\n {\r\n if ($type == Stat::TYPE_INQUIRY) {\r\n $inqs = $this->container->get('jcs.ds')->getGroup('inquiry');\r\n return !empty($inqs) ? $inqs : [];\r\n }\r\n elseif ($type == Stat::TYPE_FAMILY_HELP) {\r\n $events = $this->container->getParameter('stat_events');\r\n\r\n return isset($events[$type]) ? $events[$type] : [];\r\n }\r\n }",
"public function get_events($args = [])\n {\n global $db, $system;\n /* initialize arguments */\n $user_id = !isset($args['user_id']) ? null : $args['user_id'];\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n $get_all = !isset($args['get_all']) ? false : true;\n $suggested = !isset($args['suggested']) ? false : true;\n $random = !isset($args['random']) ? false : true;\n $managed = !isset($args['managed']) ? false : true;\n $filter = !isset($args['filter']) ? \"admin\" : $args['filter'];\n $results = !isset($args['results']) ? $system['max_results_even'] : $args['results'];\n /* initialize vars */\n $events = [];\n $offset *= $results;\n /* get suggested events */\n if ($suggested) {\n $where_statement = \"\";\n /* make a list from joined events */\n $events_ids = $this->get_events_ids();\n if ($events_ids) {\n $events_list = implode(',', $events_ids);\n $where_statement .= \"AND event_id NOT IN (\" . $events_list . \") \";\n }\n $sort_statement = ($random) ? \" ORDER BY RAND() \" : \" ORDER BY event_id DESC \";\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n $get_events = $db->query(\"SELECT * FROM `events` WHERE event_privacy != 'secret' \" . $where_statement . $sort_statement . $limit_statement) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"taget\" all events who admin */\n } elseif ($managed) {\n $get_events = $db->query(sprintf(\"SELECT * FROM `events` WHERE event_admin = %s ORDER BY event_id DESC\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"viewer\" events who (going|interested|invited|admin) */\n } elseif ($user_id == null) {\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n switch ($filter) {\n case 'going':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_going = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n case 'interested':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_interested = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n case 'invited':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_invited = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n default:\n $get_events = $db->query(sprintf(\"SELECT * FROM `events` WHERE event_admin = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n }\n /* get the \"target\" events */\n } else {\n /* get the target user's privacy */\n $get_privacy = $db->query(sprintf(\"SELECT user_privacy_events FROM users WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n $privacy = $get_privacy->fetch_assoc();\n /* check the target user's privacy */\n if (!$this->check_privacy($privacy['user_privacy_events'], $user_id)) {\n return $events;\n }\n /* if the viewer not the target exclude secret groups */\n $where_statement = ($this->_data['user_id'] == $user_id) ? \"\" : \"AND `events`.event_privacy != 'secret'\";\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE (events_members.is_going = '1' OR events_members.is_interested = '1') AND events_members.user_id = %s \" . $where_statement . \" ORDER BY event_id DESC \" . $limit_statement, secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n }\n if ($get_events->num_rows > 0) {\n while ($event = $get_events->fetch_assoc()) {\n $event['event_picture'] = get_picture($event['event_cover'], 'event');\n /* check if the viewer joined the event */\n $event['i_joined'] = $this->check_event_membership($this->_data['user_id'], $event['event_id']);;\n $events[] = $event;\n }\n }\n return $events;\n }",
"function printEventsList($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template_lst');\n\t \t$groupby = get_option('fse_groupby');\n\t \t$groupby_hdr = get_option('fse_groupby_header');\n\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\tif (is_bool($a))\n\t \t\t\t\t$echo = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby':\n\t \t\t\t\tif (in_array($a, array('','d','m','y')))\n\t \t\t\t\t$groupby = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby_header':\n\t \t\t\t\t$groupby_hdr = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\n\t \t\t}\n\t \t}\n\n\t \t// Sort must be by date, the user can choos, if asc or desc...\n\t \tif (isset($filter['orderby'])) {\n\t \t\tunset($filter['orderby']);\n\t \t}\n\t \t$filter['orderby'] = array('datefrom');\n\n\t \tif (isset($filter['orderdir'])) {\n\t \t\t$dir = $filter['orderdir'];\n\t \t\tif (isset($dir[0]))\n\t \t\t$dir = $dir[0];\n\t \t\telse\n\t \t\t$dir = 'asc';\n\t \t\tunset($filter['orderdir']);\n\t \t} else {\n\t \t\t$dir = 'asc';\n\t \t}\n\t \t$filter['orderdir'] = array($dir);\n\n\t \t$ret = '';\n\n\t \t$evt = $this->getEventsExternal($args);\n\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tif ($evt !== false) {\n\t \t\t$d = $m = $y = -1;\n\t \t\tforeach($evt as $e) {\n\t \t\t\t$dn = $e->getStart('d');\n\t \t\t\t$mn = $e->getStart('m');\n\t \t\t\t$yn = $e->getStart('y');\n\n\t \t\t\tif (($groupby == 'y' && $yn != $y) ||\n\t \t\t\t($groupby == 'm' && ($yn != $y || $mn != $m)) ||\n\t \t\t\t($groupby == 'd' && ($yn != $y || $mn != $m || $dn != $d))) {\n\n\t \t\t\t\t//echo $yn.'-'.$y.':'.$mn.'-'.$m.'<br />';\n\n\t \t\t\t\tif ($d != -1) {\n\t \t\t\t\t\t$ret .= '</ul></li>';\n\t \t\t\t\t}\n\t \t\t\t\t$ret .= '<li class=\"event_header\">'.$e->getStart($groupby_hdr).'<ul class=\"events\">';\n\t \t\t\t\t$d = $dn;\n\t \t\t\t\t$m = $mn;\n\t \t\t\t\t$y = $yn;\n\t \t\t\t}\n\t \t\t\t$ret .= '<li class=\"event\" id=\"event-'.$e->eventid.'\">';\n\t \t\t\t$ret .= $this->filterContent($template, $e);\n\t \t\t\t$ret .= '</li>';\n\t \t\t}\n\t \t\tif ($d != -1) {\n\t \t\t\t$ret .= '</ul></li>';\n\t \t\t}\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.'<ul class=\"groups\">'.$ret.'</ul>'.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }",
"private function getEntries(OutputInterface $output)\n {\n foreach ($this->events as $event) {\n // Event comments.\n $response = $this->client->get($event->comments_uri, ['query' => ['resultsperpage' => 1000]])->getBody();\n $event->event_comments = json_decode($response)->comments;\n\n // Talk comments.\n $response = $this->client->get($event->all_talk_comments_uri, ['query' => ['resultsperpage' => 1000]])->getBody();\n $event->talk_comments = json_decode($response)->comments;\n\n $event->comments = array_merge($event->event_comments, $event->talk_comments);\n\n // Exclude hosts.\n $hosts = $this->hosts;\n $event->entries = array_filter($event->comments, function ($comment) use ($hosts) {\n return !in_array($comment->user_display_name, $hosts);\n });\n\n $this->io->section($event->name);\n\n $elements = [];\n foreach ($event->entries as $comment) {\n $elements[] = vsprintf('%s - %s', [\n $comment->user_display_name,\n substr(str_replace(PHP_EOL, ' ', $comment->comment ?: '<< no comment >>'), 0, 200),\n ]);\n }\n\n $this->io->listing($elements);\n\n $this->entries = array_merge($this->entries, $event->entries);\n }\n }",
"public function indexAction()\n {\n /* $em = $this->getDoctrine()->getManager();\n\n $events = $em->getRepository('EventBundle:Event')->findAll();\n\n return array(\n 'events' => $events,\n );*/\n return array();\n }",
"public function getSubscribedEvents();",
"public function getEventDefinitions()\n\t{\n\t\t$output = '';\n\n\t\t$reader = $this->getReader();\n\n\t\tforeach ($this->getClassesToScan() as $class)\n\t\t{\n\t\t\tforeach ($class->getMethods() as $method)\n\t\t\t{\n\t\t\t\tforeach ($reader->getMethodAnnotations($method) as $annotation)\n\t\t\t\t{\n\t\t\t\t\t$output .= $this->buildListener($class->name, $method->name, $annotation->events);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn trim($output);\n\t}",
"function eventoni_get_events_by_id()\n{\n\t$event_ids = $_POST['event_ids'];\n\n\t// Aufsplitten des Strings in ein Array mit den Events\n\t$event_ids = explode('-',$event_ids);\n\n\t// Holen der Informationen zu den Events\n\t$data = eventoni_fetch('',true,$event_ids);\n\n\t// Rückgabe der Informationen zu den Events in XML\n\techo $data['xml'];\n\tdie();\n}",
"function showEvents() {\r\n\r\n\t// Lets import some globals, shall we?\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\tglobal $TIMEMARK;\r\n\t$delta = $TIMEMARK -259200;\r\n\t\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\r\n\t// Load all events.\r\n\t$EVENTS_DS = $DB->query(\"SELECT * FROM events WHERE starttime >= '\" . $delta . \"' ORDER BY starttime ASC\");\r\n\r\n\t// .. right?\r\n\tif ($EVENTS_DS->numRows() >= 1) {\r\n\r\n\t\t// Lets keep in mind: We have events.\r\n\t\t$haveEvents = true;\r\n\r\n\t\twhile ($event = $EVENTS_DS->fetchRow()) {\r\n\r\n\t\t\t// get the date.\r\n\t\t\t$date = date(\"d.m.y\", $event[starttime]);\r\n\r\n\t\t\t// open up a new table for each day.\r\n\t\t\tif ($date != $previousdate) {\r\n\r\n\t\t\t\t$workday = date(\"l\", $event[starttime]);\r\n\r\n\t\t\t\tif ($beenhere) {\r\n\t\t\t\t\t$html .= $temp->flush();\r\n\t\t\t\t\t$html .= \"<br>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$beenhere = true;\r\n\r\n\t\t\t\t// We need an additional row if we are allowed to delete events.\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp = new table(8, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$temp = new table(7, true);\r\n\t\t\t\t}\r\n\t\t\t\t$temp->addHeader(\">> Events for \" . $workday . \", the \" . $date);\r\n\t\t\t\t$previousdate = $date;\r\n\r\n\t\t\t\t$temp->addRow(\"#060622\");\r\n\t\t\t\t$temp->addCol(\"ID\");\r\n\t\t\t\t$temp->addCol(\"Starttime\");\r\n\t\t\t\t$temp->addCol(\"Starts in / Runs for\");\r\n\t\t\t\t$temp->addCol(\"Mission Type\");\r\n\t\t\t\t$temp->addCol(\"Short Description\");\r\n\t\t\t\t$temp->addCol(\"System\");\r\n\t\t\t\t$temp->addCol(\"Security\");\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp->addCol(\"Delete\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add Event to the current database.\r\n\t\t\t$temp->addRow();\r\n\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=showevent&id=\" . $event[id] . \"\\\">\" . str_pad($event[id], 4, \"0\", STR_PAD_LEFT) . \"</a>\");\r\n\t\t\t$temp->addCol(date(\"d.m.y H:i\", $event[starttime]));\r\n\r\n\t\t\t$delta = $TIMEMARK - $event[starttime];\r\n\t\t\tif ($TIMEMARK > $event[starttime]) {\r\n\t\t\t\t// Event underway.\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#00ff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t} else {\r\n\t\t\t\t// Event not started yet.\r\n\t\t\t\t$delta = $delta * -1;\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#ffff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t}\r\n\r\n\t\t\t$temp->addCol($event[type]);\r\n\t\t\t$temp->addCol($event[sdesc]);\r\n\t\t\t$temp->addCol($event[system]);\r\n\t\t\t$temp->addCol($event[security]);\r\n\t\t\t\r\n\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=deleteevent&id=$event[id]\\\">delete event</a>\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Lets recall, did we have events scheduled?\r\n\tif ($haveEvents) {\r\n\t\t// We do!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2>\" . $html . $temp->flush();\r\n\t} else {\r\n\t\t// We dont!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>\";\r\n\t}\r\n\t// Return what we got.\r\n\treturn ($html);\r\n\r\n}",
"public function getEvents()\n {\n //\n\n return Event::all();\n }",
"public function listAction()\r\n\t{\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\t\t$this -> view -> business = $business = Engine_Api::_() -> core() -> getSubject();\r\n\t\t$this -> view -> form = $form = new Ynbusinesspages_Form_Event_Search;\r\n\t\t$val = $this -> _getAllParams();\r\n\t\t// Populate form data\r\n\t\tif (!$form -> isValid($val))\r\n\t\t{\r\n\t\t\t$form -> populate($defaultValues);\r\n\t\t\t$this -> view -> formValues = $values = array();\r\n\t\t\t$this -> view -> message = \"The search value is not valid !\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$values = $form -> getValues();\r\n\t\t$values['business_id'] = $business -> getIdentity();\r\n\t\t// Prepare data\r\n\t\t$this -> view -> formValues = $values = array_merge($values, $_GET);\r\n\t\t\r\n\t\t// Check create event authorization\r\n\t\t$this -> view -> canCreate = $business -> isAllowed('event_create');\r\n\t\t//Get data\r\n\t\t$this -> view -> paginator = $paginator = Engine_Api::_()->getDbTable('mappings', 'ynbusinesspages') -> getEventsPaginator($values);\r\n\t\t$paginator -> setCurrentPageNumber($this -> _getParam('page'));\r\n\t}",
"public function getevents()\n\t{\n\t$query = mysql_query(\"SELECT * from events ORDER BY eventid DESC\");\n $data_result = array();\n\t\t\tif($query)\n\t\t\t{\n\t\t\t\twhile ($row = mysql_fetch_array($query)) {\n\t\t\t\t\tarray_push($data_result, $row);\n\t\t\t\t}\n\t\t\t\treturn $data_result;\n\t\t\t\n\t\t\t\t\n\t\t\t} \n\t\t\n\t\telse\n\t\t{\n\t\t\t\n\t\t\treturn false;\n\t\t}\t\n \n\t}",
"function get_all_events(){\n global $database_ged;\n $events = array();\n $sql = \"SELECT id FROM nagios_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":nagios\");\n }\n $result = null;\n $sql = \"SELECT id FROM snmptrap_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":snmptrap\");\n }\n\n return $events;\n}",
"public function run()\n {\n $events = [\n [\n \"Bitcorn Harvest #3\",\n \"2,625,000 Bitcorn - What a lovely day in Autumn it will be!\",\n \"https://bitcorn.org/storage/events/fNg2Fz6NmAPe2JCr7f15ikr3ADJJsozGny0moJqC.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2018-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #4\",\n \"2,625,000 Bitcorn - Last harvest at this level. Halvening soon!\",\n \"https://bitcorn.org/storage/events/EGcAKsTaubN9nFqsCTUQOvSuSQPDAvt4vC4VkuOF.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-01-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #5\",\n \"1,312,500 Bitcorn - Harvesting has become back breaking work...\",\n \"https://bitcorn.org/storage/events/Wjmuakz7IvVHce4jBUbvIviG4ObTqWv4sR6TfN6Q.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-04-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #6\",\n \"1,312,500 Bitcorn - Remember 2018? Pepperidge Farms remembers...\",\n \"https://bitcorn.org/storage/events/ABZtytBwKBj0YvmqcvORZ9iZsIe9MUSuTXWd6CKC.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-07-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #7\",\n \"1,312,500 Bitcorn - Spooktacular harvest everyone! See you soon in 2020...\",\n \"https://bitcorn.org/storage/events/a9JmkLquKviuAC7emrkfe9IY0PUtZuVeu0Uzycld.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #8\",\n \"1,312,500 Bitcorn - BURRRR... I thought the future would be warmer!\",\n \"https://bitcorn.org/storage/events/14xL5Ta2roxBRtFi0uis9Qzzy3gHsktnx56lzk3o.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-01-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #9\",\n \"787,500 Bitcorn - Ooph! Someone check the BITCORNSILO we're running low!?\",\n \"https://bitcorn.org/storage/events/uAJ2L3c6azRYyTyI5FANZj4Nl4JiTrGmGrx8QRZo.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-04-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #10\",\n \"787,500 Bitcorn - If this keeps up we're going to run out of corn!\",\n \"https://bitcorn.org/storage/events/ksxx5ho2VLUYtZZjTbhmvB0ufYbnWVMnVI2VULrI.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-07-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #11\",\n \"787,500 Bitcorn - Autumn corn tastes better with 11 herbs and spices.\",\n \"https://bitcorn.org/storage/events/ka3t2sCKOMCmWQMgd891dXxd83Ket5If8tpJF6fN.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #12\",\n \"787,500 Bitcorn - Final halvening is now on the horizon. This is fine...\",\n \"https://bitcorn.org/storage/events/3wRU6wNaUqVP6proNvYwqAMVL70cPSyn0w34rN1n.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-01-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #13\",\n \"525,000 Bitcorn - It's a good thing that my coop is alpha... #SQUADGOALS\",\n \"https://bitcorn.org/storage/events/eh3evSat3inAoQ4dSRnba0ffUoIVR8Au24xwY4Cj.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-04-10 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #14\",\n \"525,000 Bitcorn - Extreme heat and over-farming is taking its toll...\",\n \"https://bitcorn.org/storage/events/qgGOigYkbkjOMR5kGVpytXZGE0blXddsHd18wIV5.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-07-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #15\",\n \"525,000 Bitcorn - Denial begins to set in about who will win #BRAGGING rights.\",\n \"https://bitcorn.org/storage/events/7CyP2gfcWq1Lr37IxLnD2xEQAN5Jv9VjmyPtViVa.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #16\",\n \"525,000 Bitcorn - The roots of all BITCORN CROPS are tapped dry. Sad!\",\n \"https://bitcorn.org/storage/events/knIRPINIE4RZyr0DEIx46q5y5nvyaEZNgX6rPkf0.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2022-01-01 00:00:00\"\n ]\n ];\n\n foreach($events as $event)\n {\n Event::create([\n 'name' => $event[0],\n 'description' => $event[1],\n 'image_url' => $event[2],\n 'event_url' => $event[3],\n 'scheduled_at' => $event[4],\n ]);\n }\n }",
"function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }",
"public function index(): array\n {\n// Co::create(function () {\n// echo date('Y-m-d H:i:s');\n// Co::sleep(5);\n// Log::info('swoft go');\n// });\n \\Swoft::trigger('event.demosss');\n return ['item0', 'item1'];\n }",
"public function getSystemEvents()\n {\n return $this->systemEvents;\n }",
"public function indexAction() {\n $this->view->events = $this->_events->getEventsAdmin($this->_getParam('page'));\n }",
"private static function EventList ()\n {\n return array (\n \"a\" => array (),\n \"button\" => array (\n \"onblur\", \"onclick\", \"ondblclick\",\n \"onfocus\", \"onmousedown\", \"onmousemove\",\n \"onmouseout\", \"onmouseover\", \"onmouseup\",\n \"onkeydown\", \"onkeypress\", \"onkeyup\",\n ),\n );\n }",
"public function get_all_events()\n {\n // get today date for check past events or not\n $todayData = date(\"m/d/Y\");\n // get option from database\n $past_events_option = get_option('past_events');\n // preparing sql query\n $sql = \"SELECT * FROM $this->tableName \";\n if ($past_events_option != 'yes') {\n $sql .= \"WHERE `date` >= \" . $todayData;\n }\n global $wpdb;\n $allevents = $wpdb->get_results($sql);\n return $allevents;\n }",
"public function getDataCollectionEventSummariesList() {\n return $this->_get(3);\n }",
"public function getEvents()\n {\n $events = $this->getEventsArray();\n\n $transformedEvents = array();\n foreach($events as $event) {\n $transformedEvents[] = $this->processSingleEvent($event);\n }\n\n return $transformedEvents;\n }",
"public function getEvent()\n {\n // get event\n $this\n ->get('/event')\n ->assertStatus(200);\n }",
"function printEvents($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template');\n\t \t$showend = get_option('fse_show_enddate');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\t$echo = ($a == true ? true : false);\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'alwaysshowenddate':\n\t \t\t\t\t$showend = ($a == true ? true : false);\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\t \t\t}\n\t \t}\n\n\t \t$ret = '';\n\t \t$evt = $this->getEventsExternal($args);\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tforeach($evt as $e) {\n\t \t\t$ret .= $this->filterContent($template, $e);\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.$ret.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }",
"public function getEvents()\n {\n return $this->eventListeners;\n }",
"public function getPendingEvents(): array;",
"public static function getList(&$params)\n {\n // Get current date\n $curdate = JFactory::getDate('now', new DateTimeZone($params->get('timezone_events')))->format('Y-m-d');\n\n // Connect to database and build the query\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n // Select all from both tabels\n $query->select(array('a.*', 'b.*'));\n $query->from($db->quoteName('#__events', 'a'));\n\t // Inner join on event_type\n\t $query->join('INNER', $db->quoteName('#__events_types', 'b') . ' ON (' . $db->quoteName('a.event_type') . ' = ' . $db->quoteName('b.event_type') . ')');\n // Get events between start and enddate\n $query->where($db->quote($curdate) . \"BETWEEN\" . $db->quoteName('start_date') . \"AND\" . $db->quoteName('end_date'));\n // Limit on how many results\n $query->setLimit($params->get('max_events'));\n // Order ascending\n $query->order('a.start_date ASC');\n\n $db->setQuery($query);\n $events = $db->loadObjectList();\n\n return $events;\n }"
] | [
"0.75446177",
"0.75446177",
"0.69783545",
"0.68900436",
"0.68223184",
"0.6792754",
"0.6733685",
"0.6697508",
"0.6671387",
"0.66636574",
"0.66521245",
"0.6602853",
"0.65057135",
"0.649367",
"0.64738405",
"0.6468673",
"0.64546865",
"0.6447733",
"0.64385986",
"0.6423811",
"0.6384217",
"0.6341523",
"0.6341523",
"0.6334368",
"0.63274914",
"0.63144916",
"0.6310252",
"0.63016045",
"0.63016045",
"0.63016045",
"0.63016045",
"0.63016045",
"0.63016045",
"0.63016045",
"0.63016045",
"0.6272695",
"0.6267733",
"0.6260836",
"0.6260373",
"0.6241014",
"0.62380016",
"0.6231147",
"0.6230766",
"0.62036437",
"0.620227",
"0.6192296",
"0.619115",
"0.618002",
"0.6170552",
"0.61398965",
"0.61386955",
"0.6118981",
"0.61171645",
"0.61171645",
"0.61087364",
"0.6097542",
"0.6092547",
"0.6069345",
"0.60590965",
"0.6013756",
"0.600976",
"0.6001564",
"0.5999864",
"0.59930235",
"0.59818935",
"0.5967022",
"0.5954325",
"0.59519994",
"0.5929893",
"0.59287494",
"0.59219617",
"0.5920884",
"0.5920884",
"0.5904057",
"0.58938897",
"0.58908206",
"0.5887142",
"0.58865064",
"0.5884935",
"0.588364",
"0.58829236",
"0.58779395",
"0.5875769",
"0.58732355",
"0.5869971",
"0.58694327",
"0.58670527",
"0.5860246",
"0.5853784",
"0.5851439",
"0.5847627",
"0.5846485",
"0.5830809",
"0.5827283",
"0.5822557",
"0.5816777",
"0.5814397",
"0.58120036",
"0.5809185",
"0.58046097"
] | 0.6841274 | 4 |
Return true if the action should be runned false if not. | public function isRunnable(array $params) {
return !empty($params["changelogPath"]) && $params["changelogPath"] !== false && $this->fs->exists($params["changelogPath"]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function shouldExecute()\n {\n return !$this->job->isDryRun() || $this->get('executeInPreview');\n }",
"public function hasActions();",
"public function getShouldExecute() : bool\n {\n }",
"public function isAction()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n // Check if action is set and exists\n if ($_POST['action'] == $arg || $_GET['action'] == $arg)\n {\n // quit here\n return true;\n }\n }\n\n return false;\n }",
"function hasAction()\n {\n return !is_null($this->_action);\n }",
"public function has_async_action() {\n\t\treturn false;\n\t}",
"public function triggered()\n {\n Log::debug('user_action always returns true.');\n\n return true;\n }",
"public function isExecuted() {}",
"public function has_valid_action(): bool {\n\t\treturn is_string( $this->get_action() )\n\t\t&& \\mb_strlen( $this->get_action() ) > 0;\n\t}",
"public function hasAction(string $name): bool;",
"public function isExecuted() : bool {\n return $this->isExecuted;\n }",
"public function isExecutable() {\n return $this->state->canChange('executed');\n }",
"public function canFlag()\n {\n return in_array('flag', $this->actions);\n }",
"public function ableToExecute()\n {\n $log = $this->getCommandLog();\n if ($log) {\n return $log->last_succeed_time >= $log->started_at || $log->ended_at >= $log->started_at;\n }\n return true;\n }",
"public function isExpectsToExecute() {\n return $this->state->getCode() == TaskState::ExpectsToExecute;\n }",
"function isExecuted() ;",
"public function commandShouldRun(): bool\n {\n return $this->commandShouldRun;\n }",
"public function isExecuted() {\n return $this->state->getCode() == TaskState::Executed;\n }",
"public function isActionRequest()\n\t{\n\t\t$this->_checkRequestType();\n\t\treturn $this->_isActionRequest;\n\t}",
"public function hasPendingActions()\r\n {\r\n }",
"public function shouldRun() : bool\n {\n global $post;\n $postType = get_post_type($post);\n return $postType === 'product' || $postType === 'solution';\n }",
"protected function beforeDoAction() {\n return true;\n }",
"function isAllowedAction($action) {\n\t\t\treturn true;\n\t\t}",
"public abstract function should_execute();",
"private function canRun()\n {\n if (!$this->apiConfig->isAutoInvoiceEnabled()) {\n return false;\n }\n if (!$this->apiConfig->isEnabled()) {\n return false;\n }\n\n return true;\n }",
"protected function shouldRun()\n {\n return false === (bool) $this->configurationManager->getConfigurationValueByPath('FE/pageUnavailable_force');\n }",
"private function shouldExecute(BotAction $action, bool $isGroupAdmin): bool\n {\n return $this->bots->isValidHandler($action->handler)\n && $action->notOnAnyCooldown()\n && $this->hasPermissionToTrigger($action, $isGroupAdmin);\n }",
"public function should_run()\n\t{\n\t\treturn $this->config['delete_pms_last_gc'] < time() - $this->config['delete_pms_gc'];\n\t}",
"public function automated() : bool;",
"public function isExpectsToExecutable() {\n return $this->state->canChange('expectsToExecute');\n }",
"public function canExecute($action, $user){\n return $user != null && (Security::is_dairy($user) || $user->is_veterinary());\n }",
"public function isScheduledAction( $actionName ) {\n\t\t$actions = as_get_scheduled_actions( [\n\t\t\t'hook' => $actionName,\n\t\t\t'status' => \\ActionScheduler_Store::STATUS_PENDING,\n\t\t\t'per_page' => 1\n\t\t]);\n\t\treturn ! empty( $actions );\n\t}",
"protected function isAllowed() {\n\t\treturn $this->allowedActions == array('*') ||\n\t\t\t\tin_array($this->_request->params['action'], array_map('strtolower', $this->allowedActions));\n\t}",
"public function canApply(): bool;",
"public function beforeAction($action)\n {\n // which are triggered on the [[EVENT_BEFORE_ACTION]] event, e.g. PageCache or AccessControl\n\n if (!parent::beforeAction($action)) {\n return false;\n }\n\n // other custom code here\n\n return true; // or false to not run the action\n }",
"public function isActionClosure()\n {\n return $this->isActionClosure;\n }",
"protected function _canRun()\r\n\t{\r\n\t\t$start\t= strtotime($this->_scheduleStart);\r\n\t\t$stop\t= strtotime($this->_scheduleStop);\r\n\t\t$now\t= time();\r\n\t\t\r\n\t\tif($now > $start && $now < $stop) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected function mustTakeAction(string $eventName): bool\n {\n }",
"protected function isAllowedAction($action)\n {\n return true;\n }",
"function allowAction() {\r\n $now = time();\r\n if ($this->check)\r\n $FT = $this->getFileCreationTime($this->controlFile);\r\n if ($FT) {\r\n $nextExec = $FT + ($this->minDelay * 60) - $now;\r\n if ($nextExec < 0) {\r\n $handle = fopen($this->controlFile, \"w\");\r\n if (!$handle)\r\n return false;\r\n else {\r\n if (!fwrite($handle, $now))\r\n return false;\r\n else {\r\n fclose($handle);\r\n $this->lastExec = $now;\r\n $this->nextExec = $now + ($this->minDelay * 60);\r\n $this->secToExec = $this->minDelay * 60;\r\n return true;\r\n }\r\n }\r\n } else {\r\n $this->lastExec = $FT;\r\n $this->nextExec = $FT + $nextExec;\r\n $this->secToExec = $nextExec;\r\n return false;\r\n }\r\n } else\r\n return false;\r\n }",
"public function beforeAction($action)\n {\n if (parent::beforeAction($action)) {\n return true; // or false if needed\n } else {\n return false;\n }\n }",
"public function isAction($action)\n {\n if (!$this->MultiStepForm->isWhitelist($action)) {\n return false;\n }\n\n return parent::isAction($action);\n }",
"private function canRun()\n {\n $confEnabled = $this->config()->get('cdn_rewrite');\n $devEnabled = ((!Director::isDev()) || ($this->config()->get('enable_in_dev')));\n return ($confEnabled && $devEnabled);\n }",
"final protected static function canRun() : bool\n\t{\n\t\t$bCanRun = false;\n\n\t\t/*<!-- build:debug -->*/\n\t\t$bCanRun = parent::canRun();\n\n\t\tif ($bCanRun) {\n\t\t\t// Only when debugmode is set\n\t\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\t\t\t$bCanRun = $aeSettings->getDebugMode();\n\t\t}\n\t\t/*<!-- endbuild -->*/\n\n\t\treturn $bCanRun;\n\t}",
"private static function action_allowed( $action ) {\n\t\tif ( in_array( $action, self::allowed_actions() ) ) {\n\t\t\t$class = route::action_class( $action );\n\t\t\tif ( self::check_interface( $class ) && self::check_parent_class( $class ) ) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t}\n\n\t}",
"function test_init_action_is_run() {\n\t}",
"public function shouldExecute()\n\t{\n\t\t// date range check\n\t\tif( strtotime($this->start_date) > utc_time() || strtotime($this->end_date) < utc_time() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// time range check, for the current day-of-week\n\t\t$dow_abbrevs = [null, 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];\n\t\t$dow_int = utc_date()->format('N');\t// 1 = mon, 7 = sun\n\t\t$dow = $dow_abbrevs[$dow_int];\n\t}",
"public function authorizedTest()\n {\n return $this->accepted && $this->test_mode;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"function shouldExecute()\n {\n return Dice::roll(100, 100);\n }",
"public static function is_running_from_async_action_scheduler() {\n\t\tif ( function_exists( '\\wc_is_running_from_async_action_scheduler' ) ) {\n\t\t\treturn \\wc_is_running_from_async_action_scheduler();\n\t\t}\n\n\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\treturn isset( $_REQUEST['action'] ) && 'as_async_request_queue_runner' === $_REQUEST['action'];\n\t}",
"public function should_run() {\n\t\treturn (\n\t\t\tdefined( 'WP_DEBUG' )\n\t\t\t&&\n\t\t\tWP_DEBUG\n\t\t\t&&\n\t\t\tisset( $_GET['origination'] ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.NoNonceVerification\n\t\t);\n\t}",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function should_execute()\n {\n }",
"public function hasChildActions() {}",
"public function manageNotFoundExecutableAction()\n {\n $responses = $this->triggerEvent(__FUNCTION__ . '.normalAction');\n return !$responses->stopped() && $this->flowEvaluator->attemptResume();\n }",
"public function beforeAction($action)\n {\n // which are triggered on the [[EVENT_BEFORE_ACTION]] event, e.g. PageCache or AccessControl\n\n if (!parent::beforeAction($action)) {\n return false;\n }\n\n if(Yii::$app->workers->isGuest) {\n $this->redirect(['/workers']);\n }\n\n // other custom code here\n\n return true; // or false to not run the action\n }",
"protected function _checkIsForcedFormKeyAction()\n {\n return in_array($this->getRequest()->getActionName(), $this->_forcedFormKeyActions);\n }",
"public function hasExcecuted()\n {\n return $this->executed;\n }",
"public function preExecuteCheck()\n {\n return true;\n }",
"public function getDefaultHasAction()\n {\n return 1;\n }",
"public function getDefaultHasAction()\n {\n return 1;\n }",
"public function getDefaultHasAction()\n {\n return 1;\n }",
"function isActionAllowed($controller_id = null, $action_id = null, $event_id = null, $model_id = null, $group_id = null)\n {\n\t\t$actionAllowed = parent::isActionAllowed($controller_id, $action_id, $event_id, $model_id, $group_id);\n\n\t\t$hikeStatus = EventNames::model()->getStatusHike($event_id);\n\t\t$rolPlayer = DeelnemersEvent::model()->getRolOfPlayer($event_id, Yii::app()->user->id);\n\t\treturn $actionAllowed;\n\t}",
"public function isPlaying()\n {\n return \\doing_action($this->tag);\n }",
"final protected static function canRun() : bool\n\t{\n\t\t$bCanRun = parent::canRun();\n\n\t\tif ($bCanRun) {\n\n\t\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t\t$filename = trim($aeSession->get('filename', ''));\n\n\t\t\tif ($filename !== '') {\n\t\t\t\t// Don't run add_icons for PDF exportation\n\t\t\t\t// (will give errors with decktape)\n\t\t\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t\t\t$ext = $aeFiles->getExtension($filename);\n\t\t\t\t$bCanRun = !(in_array($ext, array('pdf', 'reveal.pdf', 'remark.pdf')));\n\t\t\t}\n\t\t}\n\n\t\treturn $bCanRun;\n\t}",
"public function isActionAllowed($action){\r\n if(in_array($action,$this->_allowedActions)){\r\n return true;\r\n }\r\n return false;\r\n }",
"public function produced(): bool;",
"function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function is_submit()\r\n {\r\n if( $this->taintedInputs->isAutogenerated()){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n }",
"public function authorize()\n {\n $job = Job::findOrFail($this->route('id'));\n\n return $job->state_id == State::FINISHED;\n }",
"public function actionShouldRun($shouldRun = -1)\n {\n \tif ((int)$shouldRun < 0) {\n \t\techo 'The $shouldRun argument must be an positive non-zero integer'.\"\\n\";\n \t\treturn 1;\n \t}\n \treturn 0;\n }",
"function runPlugin(&$controller)\n {\n if(!isset($this->controllerActions[$controller->name])){\n return false;\n }\n\n $actions = !is_array($this->controllerActions[$controller->name]) ? array($this->controllerActions[$controller->name]) : $this->controllerActions[$controller->name];\n\n if(!in_array('all',$actions) && !in_array($controller->action,$actions)) {\n return false;\n }\n\n return true;\n }",
"public function canSetTasks()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && $this->settings->MODULES['REW_ACTION_PLANS']\n && ($this->auth->isSuperAdmin()\n || $this->isSelf());\n }",
"public function should_run()\n\t{\n\t\treturn (time() - (int) $this->config['titania_last_cleanup']) > (3600 * 6);\n\t}",
"function isOverExecuted()\n {\n if ($this->start_time+$this->max_execution_time<time()) return true;\n else return false;\n }",
"public function isValid()\n {\n if(is_null($this->profileId) || is_null($this->action)) {\n return false;\n }\n\n return true;\n }",
"function has_action($hook_name, $callback = \\false)\n {\n }",
"public function isButtonValidBrokenSetupMultiplePrimaryActionsGivenExpectFalse() {}",
"public function actionExist ($actionName) {\n\t\treturn method_exists($this, 'process'.$actionName);\n\t}",
"public function exempt($action): bool;",
"public function passes(): bool {\r\n return $this -> execute();\r\n }",
"private function Should_Run_Task() {\n\t\t$rules = $this->Get_Business_Rules();\n\t\t\n\t\t$time = time();\n\t\t$today = date('Y-m-d', $time);\n\t\t$named_day = date('l', $time);\n\t\t\n\t\t// Cheating.. If the rule is set to NULL we're cheating\n\t\t// and not creating a business rule for it, so just run it.\n\t\tif(is_null($this->business_rule_name))\n\t\t{\n\t\t\t$this->Get_Server()->log->Write(\"Developer was lazy and didn't create a business rule! Running task anyways..\");\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\tif(! isset($rules[$this->business_rule_name]))\n\t\t{\n\t\t\t$this->Get_Server()->log->Write(\"Can't find business rule name: {$this->business_rule_name}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$days = $rules[$this->business_rule_name];\n\n\t\t//[#44294] check 'day_special' rule (overrides day of week & holidays)\n\t\tif(isset($days['Special Days']))\n\t\t{\n\t\t\t$special_days = explode(',', $days['Special Days']);\t\n\t\t\tforeach($special_days as $special_day)\n\t\t\t{\n\t\t\t\tswitch($special_day)\n\t\t\t\t{\n\t\t\t\t\tcase 'last of month':\t\t\t\t\t\t\n\t\t\t\t\t\tif(date('t', $time) == date('j', $time))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Get_Server()->log->Write(\"Running task for special day 'last of month'\");\n\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (strtolower($days[$named_day]) == 'yes') \n\t\t{\n\t\t\tif (strtolower($days['Holidays']) == 'no') \n\t\t\t{\n\t\t\t\t$holidays = Fetch_Holiday_List();\n\t\t\t\t$check_day = strtotime(\"+1 day\", $today);\n\t\t\t\tif (in_array($check_day, $holidays)) \n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function execute()\n {\n return true;\n }",
"public function isIntended()\n {\n return $this->isGet() || $this->isPost();\n }",
"public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }",
"protected function _isAllowed()\n {\n return $this->_getAclHelper()->isActionAllowed($this->_aclSection);\n }",
"public function has($name)\n {\n return isset($this->actions[$name]);\n }",
"protected function _shouldRender()\n {\n return (!$this->getFrontController()->getParam('noViewRenderer')\n && !$this->_neverRender\n && !$this->_noRender\n && (null !== $this->_actionController)\n && $this->getRequest()->isDispatched()\n && !$this->getResponse()->isRedirect()\n );\n }",
"public function isActionMapped($action = null) {\n\t\tif (empty($action)) {\n\t\t\t$action = $this->_action;\n\t\t}\n\n\t\ttry {\n\t\t\t$test = $this->config('actions.' . $action);\n\t\t\tif (empty($test)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $this->action($action)->config('enabled');\n\t\t} catch (Exception $e) {\n\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isApplied();",
"public function canActOnTarget($action,$target) {\n // owner of target -> always yes, except for verification\n // all other situatons -> check role action targets\n // - matching globals -> yes\n // - specifics\n // + gets messy\n // - otherwise -> no\n\n if (is_string($action)) {\n global $ACTIONS;\n $action = $ACTIONS[$action];\n }\n\n // system admin -> always yes\n if ($this->flag_is_system_admin) {\n return true;\n }\n\n// util_prePrintR($action);\n// util_prePrintR($target);\n\n // owner of target -> always yes, except for verification\n if ($target->user_id == $this->user_id) {\n if ($action->name != 'verify') { return true; }\n }\n\n\n // view & list is controlled by flags on the object rather than explicit permissions / access records\n if (($action->name == 'view') || ($action->name == 'list')) {\n if (array_key_exists('flag_active',$target->fieldValues)) {\n if ($target->flag_active) {\n return true;\n }\n } elseif (array_key_exists('flag_workflow_published',$target->fieldValues)) {\n if (($target->flag_workflow_published) && (($target->flag_workflow_validated))) {\n return true;\n }\n }\n }\n\n // all other situatons -> check role action targets\n $this->cacheRoleActionTargets();\n\n // - matching globals -> yes\n $target_global_type = Role_Action_Target::getGlobalTargetTypeForObject($target);\n if (in_array($target_global_type,array_keys($this->cached_role_action_targets_hash_by_target_type_by_id))) {\n foreach ($this->cached_role_action_targets_hash_by_target_type_by_id[$target_global_type] as $glob_rat) {\n if ($glob_rat->action_id == $action->action_id) {\n return true;\n }\n }\n }\n\n// util_prePrintR($this->cached_role_action_targets_hash_by_target_type_by_id);\n\n // - specifics\n // + gets messy\n\n // if the allowed target types do not contain the specific type of the target in question, then no need to go further\n\n // get a list of all the specific ids to check. This gets a bit messy as we have to climb or include a hierarchy depending on what exactly the target is\n\n// util_prePrintR($target);\n\n $ids_to_check = array();\n\n $target_class = get_class($target);\n switch ($target_class) {\n case 'Authoritative_Plant':\n $ids_to_check = array($target->authoritative_plant_id);\n break;\n case 'Authoritative_Plant_Extra':\n // can act on this if can act on the plant\n return $this->canActOnTarget($action,$target->getAuthoritativePlant());\n break;\n case 'Metadata_Structure':\n // can edit this if can edit itself or any parent\n $ids_to_check = Db_Linked::arrayOfAttrValues($target->getLineage(),'metadata_structure_id');\n break;\n case 'Metadata_Term_Set':\n // can edit if can edit any structure that uses this term set\n $structures = Metadata_Structure::getAllFromDb(['metadata_term_set_id'=>$target->metadata_term_set_id],$this->dbConnection);\n $ids_to_check = array();\n foreach ($structures as $s) {\n $ids_to_check = array_merge($ids_to_check,Db_Linked::arrayOfAttrValues($s->getLineage(),'metadata_structure_id'));\n }\n break;\n case 'Metadata_Term_Value':\n // can edit if can edit any structure that uses the term set for which this is a value\n return $this->canActOnTarget($action,Metadata_Term_Set::getOneFromDb(['metadata_term_set_id'=>$target->metadata_term_set_id],$this->dbConnection));\n break;\n case 'Metadata_Reference':\n // can edit if can edit anything to which this refers\n return $this->canActOnTarget($action,$target->getReferrent());\n break;\n case 'Notebook':\n $ids_to_check = array($target->notebook_id);\n break;\n case 'Notebook_Page':\n // can act on if can act on the notebook that contains this page\n return $this->canActOnTarget($action,$target->getNotebook());\n break;\n case 'Notebook_Page_Field':\n // can act on if can act on the notebook that contains the notebook page that this page field\n return $this->canActOnTarget($action,$target->getNotebookPage()->getNotebook());\n break;\n case 'Specimen':\n $ids_to_check = array($target->specimen_id);\n break;\n case 'Specimen_Image':\n // can act on if can act on the specimen\n return $this->canActOnTarget($action,$target->getSpecimen());\n break;\n default:\n break;\n }\n\n// util_prePrintR($ids_to_check);\n// util_prePrintR($this->cached_role_action_targets_hash_by_target_type_by_id);\n\n $target_specific_type = Role_Action_Target::getSpecificTargetTypeForObject($target);\n if (! in_array($target_specific_type,array_keys($this->cached_role_action_targets_hash_by_target_type_by_id))) {\n return false;\n }\n\n foreach ($this->cached_role_action_targets_hash_by_target_type_by_id[$target_specific_type] as $spec_rat) {\n if (($spec_rat->action_id == $action->action_id) && (in_array($spec_rat->target_id,$ids_to_check))) {\n if ($action->name == 'view') {\n $actual_target = $spec_rat->getTargets()[0];\n if (array_key_exists('flag_workflow_published',$actual_target->fieldValues)) {\n return $actual_target->flag_workflow_published && $actual_target->flag_workflow_validated;\n }\n }\n return true;\n }\n }\n\n return false;\n }",
"public function beforeAction($action)\n {\n \\Yii::trace($action->id, __CLASS__ . \"::\" . __FUNCTION__);\n if (!parent::beforeAction($action)) return false;\n return true;\n }",
"public function isAction($action)\n\t{\n\t\treturn strpos($this->getAction(TRUE), $action) !== FALSE;\n\t}"
] | [
"0.7589109",
"0.7481878",
"0.7410246",
"0.73359376",
"0.7289572",
"0.7228687",
"0.7101281",
"0.7097566",
"0.70013845",
"0.70006734",
"0.6990252",
"0.69859177",
"0.69463724",
"0.68819815",
"0.68428653",
"0.6783247",
"0.6782791",
"0.676211",
"0.673929",
"0.6722324",
"0.6685747",
"0.6684558",
"0.6636437",
"0.66206074",
"0.6591473",
"0.65756077",
"0.6549511",
"0.6542807",
"0.6526923",
"0.65140736",
"0.6497911",
"0.649745",
"0.64935005",
"0.648507",
"0.64847225",
"0.6467366",
"0.64579475",
"0.64424026",
"0.642976",
"0.64094186",
"0.6402762",
"0.64026713",
"0.6400624",
"0.63708633",
"0.6355966",
"0.63559246",
"0.63537335",
"0.63497853",
"0.63445884",
"0.6339753",
"0.63341635",
"0.6323909",
"0.6317199",
"0.6317199",
"0.6317199",
"0.6317199",
"0.6317199",
"0.6317199",
"0.6317199",
"0.6317199",
"0.6317199",
"0.63129294",
"0.629858",
"0.62929046",
"0.62644583",
"0.6263041",
"0.62612176",
"0.625879",
"0.625879",
"0.625879",
"0.6251031",
"0.6202247",
"0.61884826",
"0.61848134",
"0.6178744",
"0.61568165",
"0.6145626",
"0.61413944",
"0.61385345",
"0.6130467",
"0.6125067",
"0.61237204",
"0.6121207",
"0.612038",
"0.61200565",
"0.6114759",
"0.6114614",
"0.61097294",
"0.61095124",
"0.61014116",
"0.60913885",
"0.6076957",
"0.6070094",
"0.60639817",
"0.60629416",
"0.6062129",
"0.6058994",
"0.6056641",
"0.6053345",
"0.6051924",
"0.6033818"
] | 0.0 | -1 |
Returns requirements for running this Action. | public static function getRequirements() {
return array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRequirements() {\n\t\treturn $this->requirements;\n\t}",
"public function getRequirements()\n {\n return $this->requirements;\n }",
"public function getRequirements() {\n return $this->requirements;\n }",
"abstract public function getRequirements();",
"public function minimum_requirements() {\n\t\treturn array(\n\t\t\tarray( $this, 'check_minimum_requirements' ),\n\t\t);\n\t}",
"public function getAllRequirements();",
"public static function get_requirements(): array {\n\t\treturn [ 'story_post_type' ];\n\t}",
"public static function get_requirements(): array {\n\t\treturn [ 'story_post_type' ];\n\t}",
"public function requirementsMet() : bool;",
"public function __invoke()\n {\n return [\n 'require' => self::getDevRequirements(),\n 'require-dev' => self::getRequirements()\n ];\n }",
"public function requirements()\n\t{\n\t\t$data['title'] = 'Requirements';\n\t\t$data['requirementsdata'] = $this->getrequirement();\n\t\t$data['facilityall'] = $this->getallfacility();\n\t\t$data['unittype'] = $this->getunit();\n\t\t$data['ratereferrence'] = $this->getratereferrence();\n\t\t$this->template\n\t\t\t->set_layout('student_template')\n\t\t\t->build('requirements',$data);\n\t}",
"protected function required(): array\n {\n return $this->required;\n }",
"public static function getRequirementsOptions()\n {\n return self::$requirementsOptions;\n }",
"public static function getRequirementsOptions()\n {\n return self::$requirementsOptions;\n }",
"public static function getRequirementsOptions()\n {\n return self::$requirementsOptions;\n }",
"public static function getRequirementsOptions()\n {\n return self::$requirementsOptions;\n }",
"public function check_minimum_requirements() {\n\t\t$meets_requirements = true;\n\t\t$errors = array();\n\n\t\tif ( ! GFCommon::has_akismet() ) {\n\t\t\t$meets_requirements = false;\n\t\t\t$errors[] = esc_html__( 'The Akismet plugin is either inactive or not installed.', 'gravityformsakismet' );\n\t\t}\n\n\t\tif ( ! $this->is_enabled_global() ) {\n\t\t\t$meets_requirements = false;\n\t\t\t$errors[] = esc_html__( 'To use this add-on, please visit the Forms -> Settings page to enable Akismet integration', 'gravityformsakismet' );\n\t\t}\n\n\t\treturn $meets_requirements\n\t\t\t? array( 'meets_requirements' => true )\n\t\t\t: array(\n\t\t\t\t'meets_requirements' => false,\n\t\t\t\t'errors' => $errors,\n\t\t\t);\n\t}",
"protected static function getRequirements() {\r\n\t\treturn array('`id`' => array ('type' => 'int', 'boundary' => '>0'));\r\n\t}",
"public function getActionRequiredParameters()\r\n {\r\n return array();\r\n }",
"public function requires() : array\n {\n return [TRUE, [[FW::FWCONTEXT, FW::DEVELROLE]]]; // login not required\n }",
"public function checkRequirements()\n {\n }",
"public function requires()\n {\n $requires = array();\n\n foreach ($this->_tests as $test) {\n $requires = array_merge($requires, $test->requires());\n }\n\n return $requires;\n }",
"public function getRequiredPermissions()\n {\n return $this->requiredPermissions;\n }",
"public function loadRequirements()\n {\n }",
"public function getRequiredParameters();",
"public function getRequiredParameters();",
"public function getChecksNeedRequest();",
"public static function are_requirements_met() {\n return true;\n }",
"public function requirements()\n\t{\n\t\treturn $this->hasMany('App\\PropertyRequirement');\n\t}",
"public function getRequired()\n\t\t{\n\t\t\treturn $this->required;\n\t\t}",
"public function getRequired() {\n return $this->_required;\n }",
"public function isRequired() {\n return $this->requirement->required;\n }",
"function plugin_requirements_checker() {\n\t\tstatic $requirements_checker = null;\n\n\t\tif ( null === $requirements_checker ) {\n\t\t\t$requirements_checker = $this->requirements_met();\n\t\t}\n\n\t\treturn $requirements_checker;\n\t}",
"public function requirements()\n {\n return $this->hasMany(Requirement::class)->select('id','course_id', 'requirement');\n }",
"public function requirements()\r\n {\r\n $phpSupportInfo = $this->requirements->checkPHPversion(\r\n config('trueinstaller.core.minPhpVersion')\r\n );\r\n $requirements = $this->requirements->check(\r\n config('trueinstaller.requirements')\r\n );\r\n\r\n return view('trueinstaller.requirements', compact('requirements', 'phpSupportInfo'));\r\n }",
"public function rules()\n {\n $required = [];\n \n foreach ($this->survey->questions AS $question) {\n if ($question->is_required && $question->is_active) {\n $required['question-' . $question->id] = 'required';\n }\n }\n \n return $required;\n }",
"protected function getRequired()\n {\n return $this->required;\n }",
"public function requires()\n {\n return array('vacation', 'regex');\n }",
"function requirement_get_requirements() {\n $low = lang_get('priority_low');\n $medium = lang_get('priority_medium');\n $high = lang_get('priority_high');\n $priorities_arr = array($low, $medium, $high, '');\n return $priorities_arr;\n}",
"public static function meets_requirements() {\n\n\t\t// We have met all requirements\n\t\treturn true;\n\t}",
"public function requirements($name = null)\n {\n $requirements = [\n 'cacheFolderExists' => !$this->getDefaultOption('cache_dir') || is_dir($this->getOption('cache_dir')),\n 'cacheFolderIsWritable' => !$this->getDefaultOption('cache_dir') || is_writable($this->getOption('cache_dir')),\n ];\n\n if ($name) {\n if (!isset($requirements[$name])) {\n throw new InvalidArgumentException($name . ' is not in the requirements list (' . implode(', ', array_keys($requirements)) . ')', 19);\n }\n\n return $requirements[$name];\n }\n\n return $requirements;\n }",
"public function requires();",
"public function getRequired()\n {\n return $this->required;\n }",
"public function meets_requirements() {\r\n\r\n\t\t// Do checks for required classes / functions or similar.\r\n\t\t// Add detailed messages to $this->activation_errors array.\r\n\t\treturn true;\r\n\t}",
"static public function getRequiredPermissions(): array\n {\n return static::$required_permissions;\n }",
"public function getPreReqs()\n {\n return $this->preReqs;\n }",
"public function getRequired() {\n return $this->required;\n }",
"abstract protected function getRequirement(): string;",
"public function __decode_requires ($requirements) {\r\n $list = array();\r\n if ($requirements == '') return $list;\r\n \r\n // Bust up the requirements by the primary separator.\r\n $requirements = explode('|', $requirements);\r\n\r\n // Sub-divide each requirement to find the name_id and quantity.\r\n foreach ($requirements as $value) {\r\n $list[] = Requirement::from($value);\r\n }\r\n\r\n return $list;\r\n }",
"private function setRequirements()\n {\n if (! $this->iataClassification == self::IATA_NONE) {\n $this->setBatteryDecRequired();\n }\n\n // Set the appropriate sticker for chemistry\n if ($this->isLiIonClass()) {\n $this->setStickerLiIonRequired();\n } else if ($this->isLiMetalClass()) {\n $this->setStickerLimetalRequired();\n }\n\n // Lithium metal batteries on their own require additional stickers\n if ($this->isLiMetalOnlyClass()) {\n $this->setStickerForbiddenRequired();\n $this->setStickerCargoOnlyRequired();\n }\n\n // Large batteries require class 9 hazard stickers\n if ($this->isHazardClass()) {\n $this->setStickerHazardRequired();\n }\n }",
"public function getRequiredPermissions()\n\t{\n\t\treturn array();\n\t}",
"public function getDecisionRequirementsKey()\n {\n return $this->decisionRequirementsKey;\n }",
"protected function required(): array\n {\n return [\n 'id',\n 'email',\n 'role',\n 'scopes',\n 'status',\n 'createdDate',\n 'updatedDate',\n ];\n }",
"public function minimum_requirements() {\n\n\t\treturn array( 'php' => array( 'version' => '5.5' ) );\n\n\t}",
"public function getRequiredPermissions()\r\n\t{\r\n\t\treturn array();\r\n\t}",
"public function requirements($phase) {\n $requirements = [];\n\n // Test WinCache.\n $wincache_enabled = \\Drupal\\wincachedrupal\\WincacheWrapper::wincachedrupal_enabled();\n\n $wincache_version = phpversion('wincache');\n\n $link = Link::fromTextAndUrl('Official WinCache Extension Documentation',\n Url::fromUri('http://php.net/manual/en/book.wincache.php'))->toString();\n\n $wincache_description = $this->t(\n 'The wincachedrupal module needs the wincache extension<br/>see: @link.',\n ['@link' => $link]\n );\n\n $requirements['wincache'] = [\n 'title' => $this->t('WinCache version'),\n 'value' => $wincache_enabled ? $wincache_version : $this->t('Not available'),\n 'severity' => $wincache_enabled ? REQUIREMENT_OK : REQUIREMENT_ERROR,\n 'description' => $wincache_description,\n ];\n\n $comenabled = extension_loaded('com_dotnet');\n if (!$comenabled) {\n $requirements['wincache_comenabled'] = [\n 'title' => $this->t('WinCache com_dotnet enabled'),\n 'value' => $this->t('No'),\n 'severity' => REQUIREMENT_WARNING,\n 'description' => $this->t('.Net performance optimizations not available. The COM DOTNET extension is not loaded. Add extension=com_dotnet.dll to your php.ini file.'),\n ];\n }\n\n // The first step is to enable COM, then make the NetPhp binary available.\n if ($comenabled) {\n\n $netphp = \\Drupal::service('netphp');\n\n $netphp_support = $netphp->hasNetPhpSupport();\n $netphp_version = FALSE;\n if ($netphp_support === TRUE) {\n $netphp_version = $netphp->getRuntime()->GetStringVersion() . ' | ' . $netphp->getRuntime()->GetRuntimeVersion()->GetJson();\n }\n $requirements['wincache_netphp'] = [\n 'title' => $this->t('WinCache NetPhp version'),\n 'value' => $netphp_support === TRUE ? $this->t('The NetPhp service is up and running.') : $this->t('.Net based performance optimizations are not available. Either the NetPhp to start or you have not deployed it yet. See the Readme.md file for setup instructions.'),\n 'severity' => $netphp_support === TRUE ? REQUIREMENT_OK : REQUIREMENT_WARNING,\n 'description' => $netphp_support === TRUE ? $netphp_version : $netphp_support,\n ];\n\n // Asset optimizations need the AjaxMin library.\n $ajaxmin_support = $netphp->hasAjaxMinSupport();\n $requirements['wincache_ajaxmin'] = [\n 'title' => $this->t('Wincache AjaxMin asset optimization'),\n 'value' => $ajaxmin_support === TRUE ? $this->t('Asset optimization enabled using the AjaxMin library.') : $this->t('AjaxMin assset optimizations not available.'),\n 'severity' => $ajaxmin_support === TRUE ? REQUIREMENT_OK : REQUIREMENT_WARNING,\n 'description' => $ajaxmin_support === TRUE ? NULL : $ajaxmin_support,\n ];\n }\n\n if ($wincache_enabled) {\n\n $formatter = \\Drupal::service('date.formatter');\n\n $ucache_meminfo = \\Drupal\\wincachedrupal\\WincacheWrapper::wincachedrupal_ucache_meminfo();\n $cache = \\Drupal\\wincachedrupal\\WincacheWrapper::wincachedrupal_ucache_info();\n\n $requirements['wincache_ucache'] = [\n 'title' => $this->t('WinCache user cache'),\n 'value' => $this->t('Enabled. Memory total: @total. Used @used%.', [\n '@total' => format_size($ucache_meminfo['memory_total']),\n '@used' => round(100 - (($ucache_meminfo['memory_free'] / $ucache_meminfo['memory_total']) * 100), 2),\n ]),\n 'severity' => REQUIREMENT_OK,\n ];\n\n $requirements['wincache_ucache']['description'] = $this->t('WinCache has been running for @duration. Currently caching @num_entries entries. Hit rate @hitrate%.',\n [\n '@duration' => $formatter->formatInterval($cache['total_cache_uptime']),\n '@num_entries' => $cache['total_item_count'],\n '@hitrate' => round(($cache['total_hit_count'] / ($cache['total_hit_count'] + $cache['total_miss_count'])) * 100, 2) ,\n ]\n );\n }\n\n if ($phase == 'runtime' && $wincache_enabled) {\n\n $options = ini_get_all('wincache', TRUE);\n /*\n * 1.3.7.2 What's new:\n * If you disable the WinCache opcache in the php.ini\n * (wincache.ocenabled=0), you should no longer see a shared memory\n * mapping for the opcache. Also, you won't be able to turn it on in\n * either a .user.ini or in a php script.\n */\n if (version_compare($wincache_version, '1.3.7.2', '<')) {\n if ($options['wincache.ocenabled']['local_value'] == 0) {\n $ocachesize = $options['wincache.ocachesize']['local_value'];\n $requirements['wincache_oc_size'] = [\n 'title' => $this->t('Wincache opcode cache size'),\n 'value' => $this->t('Opcode caching is disabled and current cache size is @sizeMb', ['@size' => $ocachesize]),\n 'severity' => ($ocachesize > 15) ? REQUIREMENT_ERROR : REQUIREMENT_OK,\n 'description' => $this->t('When opcode caching is disabled, reduce memory pressure on the server by setting wincache.ocachesize to the minimum value allowed (15Mb).'),\n ];\n }\n }\n /*\n * Zend OPCACHE is UNSTABLE on Windows and.... no one cares.\n * Is this a windows server?\n * Probably yes, because this is the WincacheDriver!\n */\n $is_windows = strncasecmp(PHP_OS, 'WIN', 3) == 0;\n if ($is_windows) {\n if (version_compare(PHP_VERSION, '7.0.0') < 0) {\n /*\n * Make sure that in versions prior to PHP 7 wincache\n * is in charge of Opcode Caching.\n */\n if (function_exists('wincache_ocache_meminfo')) {\n $opcode_ok = $options['wincache.ocenabled']['local_value'] == 1;\n $requirements['wincache_oc'] = [\n 'title' => $this->t('Wincache Opcode cache'),\n 'value' => $opcode_ok ? $this->t('Opcode cache is being handled by Wincache.') : $this->t('The Wincache Opcode cache should be enabled. Do not rely on ZEND_OPCACHE, it is unstable on windows platforms for PHP < 7.'),\n 'severity' => $opcode_ok ? REQUIREMENT_OK : REQUIREMENT_ERROR,\n ];\n }\n }\n /*\n * Why is there a wincache.apppoolid setting?\n * A: For debugging purposes only. It should never be explicitly set\n * in production environments.\n * Q: Has WinCache been tested with custom application pool identities?\n * e.g. NetworkService, LocalSystem, LocalService, or \"Custom account\"\n * in the App Pool | Advanced Settings | Application Pool Identity\n * dialog of inetmgr.exe\n * A: No, it has not. It's very possible that it won't work for\n * anything other than ApplicationPoolIdentity.\n * Q: What happens when wincache.apppoolid is not set?\n * A: When IIS launches php-cgi.exe, it adds an environment variable\n * (APP_POOL_ID), and that's what wincache will use if the apppoolid\n * setting is not set. The variable will contain the account name under\n * the IIS APPPOOL domain to use for the app pool.\n */\n $apppool_ok = empty($options['wincache.apppoolid']['local_value']);\n if (!$apppool_ok) {\n $requirements['wincache_apppoolid'] = [\n 'title' => $this->t('Wincache wincache.apppoolid ini setting'),\n 'value' => $this->t('wincache.apppoolid should never be used in production environments!'),\n 'severity' => REQUIREMENT_WARNING,\n ];\n }\n }\n }\n\n return $requirements;\n }",
"public function getRequiredConfirmations()\n {\n return $this->required_confirmations;\n }",
"public function check_requirements() {\n\t\tforeach ( $this->requirements as $entry_name => $entry ) {\n\t\t\t$value = ini_get( $entry_name );\n\t\t\t$this->ini_entries[ $entry_name ] = array(\n\t\t\t\t'value' => $value,\n\t\t\t\t'required_value' => $entry['value'],\n\t\t\t\t'good' => true,\n\t\t\t);\n\n\t\t\tif ( $this->raw_value( $value, $entry['type'] ) < $this->raw_value( $entry['value'], $entry['type'] ) ) {\n\t\t\t\t$this->ini_entries[ $entry_name ]['good'] = false;\n\t\t\t\t$this->check_passed = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->check_passed;\n\t}",
"public function getEventRequiredParameters()\r\n {\r\n return array();\r\n }",
"public function getOpenRequirements() {\n\t\t// get all existing requirements\n\t\t$existingPackages = $this->getExistingRequirements();\n\t\t\n\t\t// check for open requirements\n\t\t$openRequirements = array();\n\t\tforeach ($this->requirements as $requirement) {\n\t\t\tif (isset($existingPackages[$requirement['name']])) {\n\t\t\t\t// package does already exist\n\t\t\t\t// maybe an update is necessary\n\t\t\t\tif (!isset($requirement['minversion']) || Package::compareVersion($existingPackages[$requirement['name']]['packageVersion'], $requirement['minversion']) >= 0) {\n\t\t\t\t\t// package does already exist in needed version\n\t\t\t\t\t// skip installation of requirement \n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$requirement['packageID'] = $existingPackages[$requirement['name']]['packageID'];\n\t\t\t\t$requirement['action'] = 'update';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// package does not exist\n\t\t\t\t// new installation is necessary\n\t\t\t\t$requirement['packageID'] = 0;\n\t\t\t\t$requirement['action'] = 'install';\n\t\t\t}\n\t\t\t\n\t\t\t$openRequirements[$requirement['name']] = $requirement;\n\t\t}\n\t\t\n\t\treturn $openRequirements;\n\t}",
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function required();",
"public function required();",
"public function required();",
"public function getEventRequiredParameters()\n {\n return array(\n 'task_id',\n );\n }",
"public function getRequestedMaturity()\n {\n return $this->requestedMaturity;\n }",
"public function getArgumentRequiredCount(): int\n {\n return $this->requiredCount;\n }",
"public function rules()\n {\n if($this->atts['apply'] == 'job')\n return [\n 'cv' => 'required|mimes:doc,pdf,docx',\n 'full_name' =>'required',\n 'email' =>'required|email',\n 'contact' => 'required' \n ];\n return [ \n 'full_name' =>'required',\n 'email' =>'required|email',\n 'contact' => 'required' \n ];\n\n }",
"public function rules()\n {\n return [\n 'title' => 'required|string|min:3|max:99',\n 'priority' => sprintf('required|in:%s', implode(',', Task::getPriorities())),\n 'notes' => 'string|nullable|max:999',\n 'expires_at' => 'required|date_format:Y-m-d|after_or_equal:today',\n 'tasklist_id' => 'required|integer|exists:tasklists,id'\n ];\n }",
"public function getMandatory();",
"public function getMustSupport() {\n return $this->mustSupport;\n }",
"public function rules()\n {\n return [\n 'stage_id',\n 'task_name'=>'required',\n 'task_link'=>'nullable',\n 'task_type',\n 'is_teamwork'=>'required',\n\n 'key_range'=>'numeric|nullable',\n 'start_date'=>'required|date',\n 'end_date'=>'required|date|after_or_equal:start_date',\n ];\n }",
"public function rules()\n {\n return [\n 'name' => 'required',\n 'description' => 'required',\n 'target_amount' => 'integer|min:1',\n 'deadline' => 'after:now',\n 'discord_id' => 'required|discord_id'\n ];\n }",
"public function getRequiredOptions(): array\n {\n return ['constraints'];\n }",
"public function getRequiredAttributes()\n {\n return $this->requiredAttributes;\n }",
"public function rules()\n {\n return [\n 'name' => 'required',\n 'date_requested' => 'required|date',\n 'requirement_text' => 'required',\n 'source_pg' => 'required',\n 'source_par' => 'required',\n 'client_pg' => 'required',\n 'client_par' => 'required',\n 'deliv_name' => 'required',\n 'deliv_id' => 'required'\n ];\n }",
"public function rules()\n {\n return [\n 'title' => ['required', 'max:35'],\n 'mount' => ['required', 'max:20'],\n 'prefecture' => ['required', Rule::in(array_keys(Prefecture::Enum()))],\n 'schedule' => ['required', 'max:5000'],\n 'date' => ['required', 'date_format:Y-n-j', 'after_or_equal:tomorrow'],\n 'capacity' => ['required', 'numeric', 'regex:/^[1-9][0-9]?$/'],\n 'deadline' => ['required', 'date_format:Y-n-j', 'before:date'],\n 'requirement' => ['nullable', 'max:5000'],\n 'belongings' => ['nullable', 'max:5000'],\n 'notes' => ['nullable', 'max:5000'],\n ];\n }",
"public function rules() {\n\t\t$id = $this->ingnoreId();\n\t\treturn [ \n\t\t\t'item_id' => 'required:requests,item_id,'.$id,\n\t\t\t'test_category_id' => 'required:requests,test_category_id,'.$id,\n\t\t\t'quantity_ordered' => 'required:requests,quantity_ordered,'.$id,\n\t\t];\n\t}",
"public function rules()\n {\n return [\n 'modelName' => 'required',\n 'fields' => 'required',\n 'commandType' => 'required'\n ];\n }",
"public static function getRequiredParams();",
"public function requirements_met() {\n\n\t\tif ( ! $this->is_php_version_ready() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->is_wp_version_ready() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->is_wp_multisite_ready() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->plugin_compatibility() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if ( ! $this->required_theme_version() ) {\n\t\t\t// return false;\n\t\t// }\n\n\t\treturn true;\n\t}",
"public function rules()\n {\n return [\n 'title' => 'required',\n 'environment_id' => 'required|numeric',\n 'repository_id' => 'required|numeric',\n 'repository_branch' => 'required',\n 'commands' => 'regex:/deploy;/'\n ];\n }",
"public function getPrerequisites(): array\n {\n return [\n DatabaseUpdatedPrerequisite::class\n ];\n }",
"public function getRequiredCapability(): string;",
"public function executeAction()\n {\n $valid = $this->hasRequiredParameters($this->requiredParams);\n if ($valid instanceof Frapi_Error) {\n return $valid;\n }\n \n return $this->toArray();\n }",
"public function getRequireStatus()\n {\n return $this->requireStatus;\n }",
"public function getPrerequisites(): array\n {\n return [];\n }",
"public function getPrerequisites(): array\n {\n return [];\n }",
"public function rules()\n {\n $task = $this->route('task');\n\n return [\n 'title' => 'required|string|max:255',\n 'description' => 'required|string',\n 'priority' => ['required', Rule::in([Task::PRIORITY_NONE, Task::PRIORITY_LOW, Task::PRIORITY_NORMAL, Task::PRIORITY_HIGH, Task::PRIORITY_IMMEDIATE])],\n 'start_date' => 'required|date|after_or_equal:'.$task->project->start_date,\n 'end_date' => 'required|date|after_or_equal:start_date|before_or_equal:'.$task->project->end_date,\n 'project_id' => 'required|integer|exists:projects,id',\n 'status' => ['required', Rule::in(Task::STATUS_TODO, Task::STATUS_IN_PROGRESS, Task::STATUS_COMPLETED), new TaskDependenciesRule($task)],\n 'version_id' => 'nullable|exists:versions,id',\n 'assignee_id' => ['nullable', 'exists:users,id', new UserFromProjectRule($task->project)]\n ];\n }",
"public function check_requirements() {\n global $wp_version;\n\n $installed_php_version = phpversion();\n $installed_wp_version = $wp_version;\n $required_php_version = '5.2.4';\n $required_wp_version = '3.5.2';\n $installed_php_is_compatible = version_compare( $installed_php_version, $required_php_version, '>=' );\n $installed_wp_is_compatible = version_compare( $installed_wp_version, $required_wp_version, '>=' );\n\n $notices = array();\n $template = __( '<p>LaterPay: Your server <strong>does not</strong> meet the minimum requirement of %s version %s or higher. You are running %s version %s.</p>', 'laterpay' );\n\n // check PHP compatibility\n if ( ! $installed_php_is_compatible ) {\n $notices[] = sprintf( $template, 'PHP', $required_php_version, 'PHP', $installed_php_version );\n }\n\n // check WordPress compatibility\n if ( ! $installed_wp_is_compatible ) {\n $notices[] = sprintf( $template, 'Wordpress', $required_wp_version, 'Wordpress', $installed_wp_version );\n }\n\n // deactivate plugin, if requirements are not fulfilled\n if ( count( $notices ) > 0 ) {\n // suppress 'Plugin activated' notice\n unset( $_GET['activate'] );\n deactivate_plugins( $this->config->plugin_base_name );\n $notices[] = __( 'The LaterPay plugin could not be installed. Please fix the reported issues and try again.', 'laterpay' );\n }\n\n return $notices;\n }",
"public function getRequiredFields()\n {\n return $this->requiredFields;\n }",
"abstract protected function getRequiredRequestParameters();",
"public function getRequire() {\n $content = $this->readFile();\n if (array_key_exists('require', $content)) {\n return $content['require'];\n }\n return [];\n }",
"protected function getArguments()\n {\n return array(\n array('action', InputOption::VALUE_REQUIRED, 'Bootstrap setup script')\n );\n }",
"public function getRequiredFields(){\n if(empty($this->tableFields)){\n $this->getTableInfo();\n }\n return $this->requiredFields;\n }",
"public function getRequired(): bool\n {\n\t\treturn $this->required;\n\t}",
"public function rules()\n {\n return [\n 'user' => 'required',\n 'command' => 'required',\n 'cron' => ['required_if:frequency,custom', new Cron()],\n 'frequency' =>\n 'required|in:everyMinute,everyFiveMinutes,everyTenMinutes,hourly,daily,weekly,monthly,custom'\n ];\n }",
"function __requirements(){\n\nglobal $__settings, $error, $software;\n\n\t//If there are some shorfalls then pass it to $error and return false\n\tif(sversion_compare($__settings['ver'], '5.5.2.1', '<')){\n\t\t$error[] = 'You cannot upgrade to '.$software['ver'].' unless you have upgraded to 5.5.2.1';\n\t\treturn false;\n\t}\n\t\n\treturn true;\n\n}",
"public function setRequirements($requirements) {\n $this->requirements = $requirements;\n return $this;\n }",
"public function getValueSetRequirementsCount()\n {\n return $this->count(self::VALUE_SET_REQUIREMENTS);\n }"
] | [
"0.7894959",
"0.7878293",
"0.7849802",
"0.77669126",
"0.71365976",
"0.7003118",
"0.6928247",
"0.6928247",
"0.65077627",
"0.646628",
"0.64326686",
"0.6355253",
"0.629222",
"0.629222",
"0.629222",
"0.629222",
"0.62566215",
"0.6255724",
"0.6107295",
"0.61017555",
"0.6070575",
"0.60688704",
"0.6035076",
"0.6020541",
"0.5960158",
"0.5960158",
"0.59470755",
"0.59117085",
"0.5905211",
"0.5881972",
"0.58555734",
"0.5844473",
"0.58424973",
"0.58341473",
"0.58341455",
"0.5833722",
"0.5823262",
"0.5819265",
"0.5812922",
"0.5795777",
"0.579441",
"0.5779349",
"0.57780063",
"0.5776254",
"0.57599807",
"0.5745894",
"0.5745323",
"0.5736165",
"0.56913334",
"0.56825686",
"0.56633794",
"0.5636321",
"0.56325847",
"0.56189233",
"0.5615679",
"0.5578702",
"0.5575112",
"0.5566833",
"0.5562614",
"0.5540869",
"0.5532372",
"0.5513124",
"0.5513124",
"0.5513124",
"0.5513094",
"0.5505018",
"0.5504913",
"0.54827523",
"0.5458844",
"0.545141",
"0.5447726",
"0.54421353",
"0.544053",
"0.5425136",
"0.5424656",
"0.5418136",
"0.54061687",
"0.5405116",
"0.54017615",
"0.53847605",
"0.5371378",
"0.5368593",
"0.53668493",
"0.5366133",
"0.53656435",
"0.5364481",
"0.53637105",
"0.53637105",
"0.53634036",
"0.53622764",
"0.5359709",
"0.53594375",
"0.53500164",
"0.5341763",
"0.53322303",
"0.5331947",
"0.5330976",
"0.5326511",
"0.5320736",
"0.53098124"
] | 0.7545743 | 4 |
Displays a particular model. | public function actionView($id)
{
$this->render($this->path_view.'view',array(
'model'=>$this->loadModel($id),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView($id) {\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\t$this->render('view', array(\n\t\t\t'model'\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $model,\n\t\t));\n\t}",
"public function actionView()\n {\n $id = Yii::$app->user->id;\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView($id)\n{\n$this->render('view',array(\n'model'=>$this->loadModel($id),\n));\n}",
"public function actionShow()\r\n\t{\r\n\t\t$this->render('show',array('model'=>$this->loadcontent()));\r\n\t}",
"public function show()\n {\n return $this->model;\n }",
"public function actionView($id) {\n\t\t$this->render('view', array(\n\t\t\t'model' => $this->loadModel($id),\n\t\t));\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function actionView($id) {\n\t\t$model = $this->loadModel($id);\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView($id) {\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id)\n\t{\n\t\t$this->render ( 'view', array (\n\t\t\t\t'model' => $this->loadModel ( $id )\n\t\t) );\n\t}",
"public function actionView()\r\n {\r\n $this->_userAutehntication();\r\n /*\r\n * Check if id was submitted via GET method \r\n */\r\n if(!isset($_GET['id']))\r\n $this->_sendResponse(500, 'Error: Parameter <b>id</b> is missing' );\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Find respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']);\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Mode <b>view</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($model)) {\r\n $this->_sendResponse(404, 'No Post found with id '.$_GET['id']);\r\n } else {\r\n $this->_sendResponse(200, $this->_getEncodedData($_GET['model'], $model->attributes));\r\n }\r\n }",
"public function actionView($id)\r\n {\r\n $this->render('view', array(\r\n 'model' => $this->loadModel($id),\r\n ));\r\n }",
"public function actionView($id)\n\t{ \n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n //'model' => $this->findModel(Yii::$app->user->id),\n ]);\n }",
"public function actionView($id)\n\t{\n\n\t $this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n {\n $this->render('view', [\n 'model' => $this->loadModel($id),\n ]);\n }",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}"
] | [
"0.75535107",
"0.7553186",
"0.7542682",
"0.7540008",
"0.74330246",
"0.74330246",
"0.74330246",
"0.74330246",
"0.74330246",
"0.73394006",
"0.7160726",
"0.71322334",
"0.712746",
"0.70615447",
"0.7022298",
"0.6983485",
"0.69753826",
"0.6958109",
"0.6945592",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6916909",
"0.6910746",
"0.69090086",
"0.69004697",
"0.688112",
"0.688112",
"0.688112",
"0.6875093",
"0.68739605",
"0.6873016",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299",
"0.6868299"
] | 0.0 | -1 |
Creates a new model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate()
{
//if(!Yii::app()->user->checkAccess(Params::DEFAULT_CREATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}
$model=new PPJadwaldokterM;
$listHari = array( 'Senin'=> 'Senin',
'Selasa'=> 'Selasa',
'Rabu'=> 'Rabu',
'Kamis'=> 'Kamis',
'Jumat'=> 'Jumat',
'Sabtu'=> 'Sabtu',
'Minggu'=> 'Minggu',
);
// Uncomment the following line if AJAX validation is needed
if(isset($_POST['PPJadwaldokterM']))
{
$model->attributes=$_POST['PPJadwaldokterM'];
$model->jadwaldokter_buka = $model->jadwaldokter_mulai.' S/d '.$model->jadwaldokter_tutup;
if($model->save()){
Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');
$this->redirect(array('admin','id'=>$model->jadwaldokter_id,'sukses'=>1));
}
}
$this->render($this->path_view.'create',array(
'model'=>$model,
'listHari'=>$listHari
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}",
"public function actionCreate()\n\t{\n\t\t$model = $this->loadModel();\n\n\t\tif(isset($_POST[get_class($model)]))\n\t\t{\n $model = $this->_prepareModel($model);\n if (Yii::app()->getRequest()->isAjaxRequest) {\n if($model->save())\n echo json_encode($model);\n else\n echo json_encode(array('modelName' => get_class($model),'errors' => $model->getErrors()));\n\n Yii::app()->end();\n }\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }",
"public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new RefJkel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create() {\n\t\t$model = new $this->model_class;\n\t\t$model->status = 3;\n\t\t$model->author_id = Session::get('wildfire_user_cookie');\n\t\t$model->url = time();\n\t\tif(Request::get(\"title\")) $model->title = Request::get(\"title\");\n\t\telse $model->title = \"Enter Your Title Here\";\n\t\t$this->redirect_to(\"/admin/content/edit/\".$model->save()->id.\"/\");\n\t}",
"public function actionCreate() {\n $model = new Foro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Admin();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->setModelByConditions();\n\n if (Yii::$app->request->isPost &&\n $this->model->load(Yii::$app->request->post()) &&\n $this->setAdditionAttributes() &&\n $this->model->save()) {\n\n if ($this->viewCreated) {\n $redirectParams = [\n $this->urlPrefix.'view',\n 'id' => $this->model->getId(),\n ];\n } else {\n $redirectParams = [\n $this->urlPrefix.'index',\n ];\n }\n\n return $this->redirect($redirectParams);\n }\n\n return $this->render('create',\n ArrayHelper::merge(\n [\n 'model' => $this->model,\n ],\n $this->getAdditionFields()\n )\n );\n }",
"public function actionCreate()\n {\n $model = new Crm();\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 }",
"public function actionCreate() {\n $model = new $this->defaultModel;\n\n $isPjax = Yii::$app->request->isPjax;\n if (!$isPjax) {\n $this->performAjaxValidation($model);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($isPjax) {\n return $this->actionAjaxModalNameList(['selected_id' => $model->id]);\n } else {\n return $this->redirect('index');\n } \n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n 'isModal' => true,\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'isModal' => false,\n ]);\n }\n }\n }",
"public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Post;\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save())\n\t\t{\n\t\t\treturn $this->redirect(['site/index']);\n\t\t}\n\t\t\n\t\techo $this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}",
"public function actionCreate()\n {\n $models = $this->loadModelsByPid();\n\n $this->performAjaxValidationTabular($models);\n\n $success = $this->doAction($models);\n $newPid = current($models)->pid;\n\n if($success)\n {\n if(isset($_POST['apply']))\n {\n $this->redirectAction($newPid);\n }\n $this->redirectAction();\n }\n\n if($success !== null && $newPid)\n {\n $this->redirectAction($newPid);\n }\n\n $this->render($this->view['create'], array(\n 'models' => $models,\n 'model' => reset($models),\n 'languages' => Language::getList(),\n ));\n }",
"public function actionCreate()\n\n {\n\n $model = new Orders();\n\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\t\n\n\t\t\tYii::$app->session->setFlash('orders', 'Orders has been added successfully');\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }",
"public function actionCreate()\n {\n $model = new Keep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new MintaData();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Photo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public\n function actionCreate()\n {\n $model = new Phforum();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->isCreateView = true;\n $modelClass = $this->_getModelClass();\n $model = new $modelClass;\n return $this->_renderView($model);\n }",
"public function actionCreate()\n {\n $model = new JetShopDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect([\"site/register\"]);\n /*$this->render('/site/register', [\n 'model' => $model,\n ]);*/\n }\n }",
"public function actionCreate()\n {\n $model = new Major();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n $this->success(Yii::t('flash', 'major.save_success'));\n } else {\n $this->error(Yii::t('flash', 'major.save_error'));\n }\n return $this->redirect(['index']);\n } \n return $this->render('create', [\n 'model' => $model,\n ]);\n \n }",
"public function actionCreate()\n {\n $model = new Mylive();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->live_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new House();\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 }",
"public function actionCreate()\n {\n $model = new Rents();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->layout = 'headbar';\n $model = new ContactOne();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $dataProvider = new ActiveDataProvider([\n 'query' => ContactOne::find(),\n 'pagination' => [\n 'pageSize' => 20,\n ],\n ]);\n //return $this->redirect(['view', 'id' => $model->id]);\n\n return $this->render('view',[\n 'dataProvider' => $dataProvider,\n ]);\n\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Talabalar();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Survey();\n\n Yii::$app->gon->send('saveSurveyUrl', '/survey/save-new');\n Yii::$app->gon->send('afterSaveSurveyRedirectUrl', \\Yii::$app->request->referrer);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $user = User::findOne(['username' => $model->username ]) ;\n return $this->redirect(['site/view','id' => $user->id]);\n } else {\n return $this->render('knpr/create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Admin();\n\n /*if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }*/\n \n if (Yii::$app->request->post() && $model->validate()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n }",
"public function actionCreate()\n {\n $model = new Book();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n \tif (Yii::$app->request->getIsAjax()) {\n \t\treturn $this->renderPartial('create', [\n \t\t\t'model' => $model,\n \t\t]);\n \t}\n \telse {\n\t return $this->render('create', [\n\t 'model' => $model,\n\t ]);\n \t}\n }\n }",
"public function actionCreate()\n {\n $model = new Article();\n if(!empty($_GET['kind'])) $model->kind=$_GET['kind'];\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Actividad();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate(){\n $model = new Category();\n// d($model);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->category_id]);\n } else {\n// d($_POST);\n return $this->render('create', ['model' => $model,]);\n }\n }",
"public function actionCreate()\n {\n $model = new ActivityDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new VehicleApply();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate() {\n $model = new TabelleRelease();\n\n if ($model->loadAll(Yii::$app->request->post())) {\n if ($model->saveAll()) {\n\n return $this->redirect(['update', 'id' => $model->id, 'mySuccess' => 2]);\n } else {\n $this->success = -1; // -1->insert Fehler\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Student();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Status();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Customers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Products();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Template();\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 }",
"public function actionCreate()\n {\n $model = new UserFeeMaster();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$this->paymentUMoney($model);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'userid' => Yii::$app->user->id,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Takwim();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Comment;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Comment']))\n\t\t{\n $model->attributes=$_POST['Comment'];\n\t\t\n \n if($model->save()){\n $dataProvider=new CActiveDataProvider('Comment');\n\t\t\t$this->redirect(array('index'),array(\n 'dataProvider'=>$dataProvider,\n 'updated'=>'1',\n 'message'=>\"Comentario introducido\"\n ));\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Nomina();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new SasaranEs4();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()){\n flash('success','Data Sasaran Eselon IV Berhasil Disimpan');\n return $this->redirect(['index']);\n }\n \n flash('error','Data Sasaran Eselon IV Gagal Disimpan');\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new News();\n $author = Yii::$app->user->identity->username;\n\n if ($model->load(Yii::$app->request->post())){\n $model->setAuthor($author);\n if($model->save()){\n return $this->redirect('index');\n }\n }\n else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Amphur();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->amphurId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\tif (isset(Yii::app()->user->isAdmin) && Yii::app()->user->isAdmin){\n\t\t\t$this->layout = \"admin\";\n\t\t}\n\t\t\n\t\t$model=new Articles;\n\t\tif(isset($_POST['Articles']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Articles'];\n\t\t\tif (isset(Yii::app()->user->isAdmin) && Yii::app()->user->isAdmin){\n\t\t\t\t$model->status = 0;\n\t\t\t}\n\t\t\t$model->user_id = Yii::app()->user->id;\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tif (Yii::app()->user->isAdmin){\n\t\t\t\t\t$this->redirect(array('admin')); //,'id'=>$model->id));\n\t\t\t\t}else{\n\t\t\t\t\t$this->redirect(array('list')); //,'id'=>$model->id));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$this->render('create',array('model'=>$model));\n\t}",
"public function actionCreate()\n {\n $model = new Uprawnienia();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'konto_id' => $model->konto_id, 'podkategoria_id' => $model->podkategoria_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model=new User('admin');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }",
"public function actionCreate()\n {\n $model = new Contact();\n $model->user_id = $this->user->id;\n $model->scenario = 'form';\n\n if (Yii::$app->request->isPost && ($postData = Yii::$app->request->post()) && $model->load($postData)) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id,\n ]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate() {\n Login::UserAuth('Customers', 'Create');\n $model = new Customers;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Customers'])) {\n $_POST['Customers'] = CI_Security::ChkPost($_POST['Customers']);\n $model->attributes = $_POST['Customers'];\n $model->password = md5($model->password);\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->cid));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new Kareer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Debtor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$locationModel = Location::find()->where(['location_id' => $model->location->id])->one();\n $locationModel = new Location();\n $locationModel->load(Yii::$app->request->post());\n $locationModel->save();\n $model->link('location', $locationModel);\n\n //$nameModel = Name::find()->where(['name_id' => $this->name->id])->one();\n $nameModel = new Name();\n $nameModel->load(Yii::$app->request->post());\n $nameModel->save();\n $model->link('name', $nameModel);\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }\n }",
"public function actionCreate()\n {\n $model = new Persyaratan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_persyaratan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Route();\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t$model->save();\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionCreate()\n\t{\n $this->layout='admin';\n \n\t\t$model=new Bet;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Bet']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Bet'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate() {\n\t\t$model = new Building();\n\n\t\tif ( $model->load( Yii::$app->request->post() ) && $model->save() ) {\n\t\t\treturn $this->redirect( [ 'index', 'id' => $model->id ] );\n\t\t} else {\n\t\t\treturn $this->render( 'create', [\n\t\t\t\t'model' => $model,\n\t\t\t] );\n\t\t}\n\t}",
"public function actionCreate()\n {\n $model = new Service();\n if($model->load(Yii::$app->request->post()) ){\n $model->created_by=Yii::$app->user->id;\n $model->created_at=time();\n if ( $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate() {\n\t\t$model = new Proyecto;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this -> performAjaxValidation($model);\n\n\t\tif (isset($_POST['Proyecto'])) {\n\t\t\t$model -> attributes = $_POST['Proyecto'];\n\t\t\t$model -> Usuario_id = Yii::app() -> user -> id;\n\t\t\tif ($model -> save())\n\t\t\t\t$this -> redirect(array('view', 'id' => $model -> id));\n\t\t}\n\n\t\t$this -> render('create', array('model' => $model, ));\n\t}",
"public function actionCreate()\n {\n $model = new Programador();\n //Yii::$app->request->post() wrapper de Yii para obtener datos seguros enviados por POST\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new File();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Product();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /*\r\n * Get an instance of the respective model\r\n */\r\n case 'posts': \r\n $model = new Post; \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Mode <b>create</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /*\r\n * Assign POST values to attributes \r\n */ \r\n foreach($_POST as $var=>$value) {\r\n /*\r\n * Check if the model have this attribute\r\n */ \r\n if($model->hasAttribute($var)) {\r\n $model->$var = $value;\r\n } else {\r\n /* Error : model don't have this attribute */\r\n $this->_sendResponse(500, sprintf('Parameter <b>%s</b> is not allowed for model <b>%s</b>', $var, $_GET['model']) );\r\n }\r\n }\r\n /*\r\n * save the model\r\n */ \r\n if($model->save()) { \r\n $this->_sendResponse(200, $this->_getEncodedData($_GET['model'], $model->attributes) );\r\n } else {\r\n /*\r\n * Errors occurred\r\n */\r\n $message = \"<h1>Error</h1>\";\r\n $message .= sprintf(\"Couldn't create model <b>%s</b>\", $_GET['model']);\r\n $message .= \"<ul>\";\r\n foreach($model->errors as $attribute=>$attribute_errors) {\r\n $message .= \"<li>Attribute: $attribute</li>\";\r\n $message .= \"<ul>\";\r\n foreach($attribute_errors as $attr_error) {\r\n $message .= \"<li>$attr_error</li>\";\r\n } \r\n $message .= \"</ul>\";\r\n }\r\n $message .= \"</ul>\";\r\n $this->_sendResponse(500, $message );\r\n }\r\n\r\n var_dump($_REQUEST);\r\n }",
"public function actionCreate() {\n $model = new TimeBooks();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Contact;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Contact'])) {\n $model->attributes = $_POST['Contact'];\n if ($model->save()) {\n $this->redirect(array('view','id' => $model->id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new EnglishNanorep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Detallecarrito();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'codProducto' => $model->codProducto, 'idCarrito' => $model->idCarrito]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Trees();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model=new UserAddForm();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['UserAddForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['UserAddForm'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->data->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Cuenta();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Slaves();\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 }",
"public function actionCreate() {\n $model = new MissionCarers;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['MissionCarers'])) {\n $model->attributes = $_POST['MissionCarers'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new StandartOne();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n //if (Yii::app()->user->checkAccess('AgendaCitasCedi_SolicitudCitaEntregaMercancia_Crear')) {\n $model=new SolicitudCitaEntregaMercancia;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['SolicitudCitaEntregaMercancia']))\n\t\t{\n\t\t\t$model->attributes=$_POST['SolicitudCitaEntregaMercancia'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->IdNumeroSolicitud));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t)); /*} else {\n $this->render('//site/error', array(\n 'code' => '101',\n 'message' => Yii::app()->params ['accessError']\n ));\n }*/\n\t\t\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new Barangmasuk;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Barangmasuk']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Barangmasuk'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Producto();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_prodcto]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new TbDadosmes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Ddiet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Category();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function creating($model)\n\t{\n\t}",
"public function actionCreate()\n {\n $model = new CourseSite();\n\n if ($model->load(Yii::$app->request->post())){\n if($model->createCourseSite($model->course)){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model=new User('create');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('/site/index'));\n }\n\n //Yii::app()->user->setFlash('success', Yii::t('user', '<strong>Congratulations!</strong> You have been successfully registered on our website! <a href=\"/\">Go to main page.</a>'));\n $this->render('create', compact('model'));\n }",
"public function actionCreate() {\r\n\t\t$model = new Follow ();\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'create', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}",
"public function actionCreate()\n {\n $model = new Content();\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 }",
"public function actionCreate()\n {\n $model = new Peticiones();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Menu();\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->validate()){\n $model->save(false);\n return $this->redirect(['index']);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\r\n {\r\n $model = new Tax;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['index', 'added' => 'yes']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionCreate()\n {\n $model = new Data();\n $oldModel = $model->attributes;\n\n $model->discount = 0;\n $model->activation_date = date('Y-m-d');\n\n if ($model->load(Yii::$app->request->post()) /*&& $model->save()*/) {\n\n $check = self::check($model);\n\n if($check && $model->save()){\n $newModel = $model->attributes;\n (new History())->setRow(Yii::$app->controller, $oldModel, $newModel, 'Создан клиент '.$newModel['user_name']);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n else{\n // сформируем номер новой карты клиента\n $next_card = Data::find()->max('card') + 1;\n $model->card = $next_card;\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }"
] | [
"0.79611313",
"0.79000247",
"0.78687686",
"0.75944376",
"0.75330836",
"0.74855393",
"0.7461119",
"0.7461119",
"0.7461119",
"0.7461119",
"0.7448935",
"0.74430025",
"0.74393713",
"0.74307716",
"0.74092305",
"0.7408396",
"0.7384483",
"0.73768485",
"0.7333238",
"0.7333016",
"0.7305014",
"0.7266088",
"0.7256554",
"0.7246151",
"0.7240074",
"0.7219553",
"0.72103083",
"0.7207039",
"0.72027034",
"0.71990466",
"0.7190031",
"0.71795887",
"0.7178496",
"0.71777654",
"0.71723264",
"0.7171185",
"0.7168037",
"0.7166517",
"0.7158479",
"0.71504015",
"0.7143622",
"0.7137446",
"0.7092962",
"0.7084762",
"0.70801",
"0.70757973",
"0.70678055",
"0.70678055",
"0.7067472",
"0.70641595",
"0.7062934",
"0.70628893",
"0.7061302",
"0.70597035",
"0.7059426",
"0.70591724",
"0.70516926",
"0.70381343",
"0.7023516",
"0.7016755",
"0.7013404",
"0.7013105",
"0.7011832",
"0.7010669",
"0.7010178",
"0.70091337",
"0.6998711",
"0.6992553",
"0.6992082",
"0.6988103",
"0.69853383",
"0.6984925",
"0.69686913",
"0.6964183",
"0.6946878",
"0.6940434",
"0.69399595",
"0.69396746",
"0.69384736",
"0.6938182",
"0.6937701",
"0.69354725",
"0.69328076",
"0.693225",
"0.69308895",
"0.69267493",
"0.69228876",
"0.69210005",
"0.6920174",
"0.69198334",
"0.6918655",
"0.69103307",
"0.690009",
"0.6888446",
"0.68831265",
"0.68775487",
"0.68723536",
"0.68675226",
"0.68609864",
"0.6853585",
"0.6852476"
] | 0.0 | -1 |
Updates a particular model. If update is successful, the browser will be redirected to the 'view' page. | public function actionUpdate($id)
{
//if(!Yii::app()->user->checkAccess(Params::DEFAULT_UPDATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}
$model=$this->loadModel($id);
$listHari = array( 'Senin'=> 'Senin',
'Selasa'=> 'Selasa',
'Rabu'=> 'Rabu',
'Kamis'=> 'Kamis',
'Jumat'=> 'Jumat',
'Sabtu'=> 'Sabtu',
'Minggu'=> 'Minggu',
);
// Uncomment the following line if AJAX validation is needed
if(isset($_POST['PPJadwaldokterM']))
{
$model->attributes=$_POST['PPJadwaldokterM'];
$model->jadwaldokter_buka = $model->jadwaldokter_mulai.' S/d '.$model->jadwaldokter_tutup;
if($model->save()){
Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');
$this->redirect(array('admin','id'=>$model->jadwaldokter_id,'sukses'=>1));
}
}
$this->render($this->path_view.'update',array(
'model'=>$model,
'listHari'=>$listHari
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'update', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\t\t//print_r(\"update mode\");exit;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n // return $this->redirect(['view', 'id' => $model->id]);\r\n\t\t return $this->redirect(['index']);\r\n }\r\n\r\n return $this->renderAjax('update', [\r\n 'model' => $model,\r\n ]);\r\n }",
"public function actionUpdate($id)\n {\n\n // p($id);die;\n $model = $this->findModel($id);\n // p($model);die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n //var_dump($model);\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }",
"public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }",
"public function updating($model)\n\t{\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()))\n {\n if($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n var_dump($model->errors); die;\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n $this->layout=\"main\";\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view','id' => $model->weid \n\t\t\t] );\n\t\t} else {\n\t\t\treturn $this->render ( 'update', [ \n\t\t\t\t\t'model' => $model \n\t\t\t] );\n\t\t}\n\t}",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n { \n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->No_]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect('/content-menu');\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->U_ID]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n\n {\n \n $model = new Main();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n\n }\n \n \n\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ( $model->load(Yii::$app->request->post()) && $model->save() ) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->getRequest()->post(),'') && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n }\n\n return $this->render('update', ['model' => $model]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public\n function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }"
] | [
"0.79061323",
"0.77129716",
"0.76959306",
"0.7601889",
"0.7600844",
"0.7488874",
"0.7481669",
"0.747756",
"0.74704474",
"0.74602824",
"0.7458783",
"0.7458539",
"0.7458539",
"0.74576205",
"0.74522936",
"0.74473876",
"0.744536",
"0.74405336",
"0.74304587",
"0.74178094",
"0.7416726",
"0.7399597",
"0.739484",
"0.7384434",
"0.73796266",
"0.73729575",
"0.73617715",
"0.7361472",
"0.7361472",
"0.7361472",
"0.7361472",
"0.7361472",
"0.7361472",
"0.7361472",
"0.73461056",
"0.73461056",
"0.7335965",
"0.73337555",
"0.7333603",
"0.73302174",
"0.73280805",
"0.7327568",
"0.7323479",
"0.731966",
"0.731966",
"0.7318026",
"0.7318026",
"0.7318026",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049",
"0.7314049"
] | 0.0 | -1 |
Deletes a particular model. If deletion is successful, the browser will be redirected to the 'admin' page. | public function actionDelete($id)
{
if(Yii::app()->request->isPostRequest)
{
// we only allow deletion via POST request
//if(!Yii::app()->user->checkAccess(Params::DEFAULT_DELETE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}
$this->loadModel($id)->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if(!isset($_GET['ajax']))
$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
}
else
throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>delete</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /* Find the model */\r\n if(is_null($model)) {\r\n // Error : model not found\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }\r\n\r\n /* Delete the model */\r\n $response = $model->delete();\r\n if($response>0)\r\n $this->_sendResponse(200, sprintf(\"Model <b>%s</b> with ID <b>%s</b> has been deleted.\",$_GET['model'], $_GET['id']) );\r\n else\r\n $this->_sendResponse(500, sprintf(\"Error: Couldn't delete model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }",
"public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }",
"public function actionDelete() {\n $model = new \\UsersModel();\n $login = $this->getParam('login');\n\n if ( $model->delete($login) ) {\n $this->flashMessage('Odstraněno', self::FLASH_GREEN);\n } else {\n $this->flashMessage('Záznam nelze odstranit', self::FLASH_RED);\n }\n\n $this->redirect('default');\n }",
"public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}",
"public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}",
"public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->delete();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete()\n {\n if(isset($_POST['id'])){\n $id = $_POST['id'];\n $this->findModel($id)->delete();\n echo \"success\";\n }\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->is_delete = 1;\n\n if($model->save())\n {\n return $this->redirect(['admin']);\n }\n }",
"public function delete($model);",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }",
"public function actionDelete($id)\n { \n\t\t$model = $this->findModel($id); \n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n \n return $this->redirect(['index']);\n }",
"public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }",
"public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\tif($model->deleted){\n\t\t\t$model->delete();\n\t\t}else{\n\t\t\t$model->scenario = 'delete';\n\t\t\t$model->deleted = 1;\n\t\t\t$model->update();\n\t\t}\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\tif ($model) {\n\t\t\t$model->delete();\n\t\t}\n\n // if AJAX request (triggered by deletion via list grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}",
"public function deleting($model)\n\t{\n\t}",
"public function actionDelete() {\n\t\tif (isset($_POST) && $_POST['isAjaxRequest'] == 1) {\n\t\t\t$response = array('status' => '1');\n\t\t\t$model = $this->loadModel($_POST['id']);\n\t\t\t$model->is_deleted = 1;\n\t\t\tif ($model->save()) {\n\t\t\t\techo CJSON::encode($response);\n\t\t\t} else {\n\t\t\t\t$response = array('status' => '0', 'error' => $model->getErrors());\n\t\t\t\techo CJSON::encode($response);\n\t\t\t}\n\t\t}\n\t}",
"public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\n\t\t$model->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!Helper::get('ajax')) {\n $this->redirect(Helper::post('returnUrl') ? Helper::post('returnUrl') : array('admin'));\n }\n }",
"function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}",
"public function actionDelete($id) {\r\n $this->loadModel($id)->delete();\r\n\r\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n if (!isset($_GET['ajax']))\r\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n }",
"public function actionDelete($id) {\r\n $this->loadModel($id)->delete();\r\n\r\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n if (!isset($_GET['ajax']))\r\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n }",
"public function actionDelete($id)\n\t{\n\t\t//$this->loadModel($id)->delete();\n $model=$this->loadModel($id);\n $model->IdEstadoSolicitudCita = 3;\n $model->save();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n {\n\t$model = static::findModel($id);\n\n\t$this->processData($model, 'delete');\n\n\t$model->delete();\n\n \treturn $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n\t\t$this -> loadModel($id) -> delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif (!isset($_GET['ajax']))\n\t\t\t$this -> redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n {\n $model=$this->findModel ( $id );\n\t\t$model->is_delete=1;\n\t\t$model->save ();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n\t{\n if(file_exists(dirname(Fircms::$basePath).DIRECTORY_SEPARATOR.$this->loadModel($id)->path))\n unlink(dirname(Fircms::$basePath).DIRECTORY_SEPARATOR.$this->loadModel($id)->path);\n \n $this->loadModel($id)->delete();\n \n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $model->IsDelete=1;\n $model->save();\n Yii::$app->session->setFlash('success', \"Your message to display.\");\n return $this->redirect(['index']);\n }",
"public function delete(Model $model);",
"public function delete(Model $model);",
"public function actionDelete($id) {\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif (!isset($_GET['ajax'])) {\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\n\t}",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }",
"public function actionDelete($id)\r\n {\r\n $this->loadModel($id)->delete();\r\n\r\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n if (!isset($_GET['ajax']))\r\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n }",
"public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\tif (!($model = $this->loadModel()))\n\t\t\t\treturn;\n\t\t\t$model->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\t\t\\Yii::$app->session->setFlash('updated',\\Yii::t('admin', 'Данные успешно удалены'));\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id) {\n\t\t$model = $this->loadModel($id);\n\t\t$model->is_deleted = 1;\n\t\t$model->save();\n\t\t\n\t\t$this->redirect(array(\"/\".$model->type));\n\t}",
"public function actionDelete()\n\t{\n\t\t$id = intval( Yii::app()->getRequest()->getParam('id') );\n\n\t\tif (!Yii::app()->getRequest()->getIsAjaxRequest() || empty($id))\n\t\t\tthrow new CHttpException(404);\n\n\t\t$model = MainRoom::model()->findByPk($id);\n\t\tif (is_null($model))\n\t\t\tthrow new CHttpException(404);\n\n\t\t$model->status = MainRoom::STATUS_DELETED;\n\t\t$model->save(false);\n\t\tdie ( CJSON::encode( array('success'=>true) ) );\n\n\t}",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $this->checkPermissionByModelsUserId($model->user_id);\n $model->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n\t{\n\t\tif(Yii::app()->user->user_type==4){\n\t\t\t$this->layout='teacher';\n\t\t}\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t\t\n\t}",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id)\n {\n $this->loadModel($id)->delete();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_REQUEST['returnUrl']) ? $_REQUEST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}"
] | [
"0.75141525",
"0.75074947",
"0.74224156",
"0.7376121",
"0.73703206",
"0.7281982",
"0.7234119",
"0.72131765",
"0.71906054",
"0.71853113",
"0.7169009",
"0.7166612",
"0.7162838",
"0.7125431",
"0.70979434",
"0.70088696",
"0.70082563",
"0.7008243",
"0.69863313",
"0.6968707",
"0.69507736",
"0.69487834",
"0.6941624",
"0.69338286",
"0.69338286",
"0.69336206",
"0.6923742",
"0.69077545",
"0.6903346",
"0.69007474",
"0.6888509",
"0.68826467",
"0.68826467",
"0.68826467",
"0.68826467",
"0.68741953",
"0.6866062",
"0.6866062",
"0.6864103",
"0.6862701",
"0.6862701",
"0.6861334",
"0.6855066",
"0.68498486",
"0.68467987",
"0.683604",
"0.6835455",
"0.6835455",
"0.68295765",
"0.6824875",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.68200433",
"0.68179655",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025",
"0.6816025"
] | 0.0 | -1 |
Returns the data model based on the primary key given in the GET variable. If the data model is not found, an HTTP exception will be raised. | public function loadModel($id)
{
$model=PPJadwaldokterM::model()->findByPk($id);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
return $model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Residencebaseinfo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=LicenceApplication::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=emprestimo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Dataset::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public static function Get($key) {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$primary = $model->index('primary');\r\n\t\tif (is_null($primary)) {\r\n\t\t\tthrow new Exception(\"The schema for {$cls} does not identify a primary key\");\r\n\t\t}\r\n\t\tif (!is_array($key)) {\r\n\t\t\tif (count($primary['fields']) > 1) {\r\n\t\t\t\tthrow new Exception(\"The schema for {$cls} has more than one field in its primary key\");\r\n\t\t\t}\r\n\t\t\t$key = array(\r\n\t\t\t\t$primary['fields'][0] => $key\r\n\t\t\t);\r\n\t\t}\r\n\t\tforeach ($primary['fields'] as $field) {\r\n\t\t\tif (!isset($key[$field])) {\r\n\t\t\t\tthrow new Exception(\"No value provided for the {$field} field in the primary key for \" . get_called_class());\r\n\t\t\t}\r\n\t\t\t$model->where(\"{$field} = ?\", $key[$field]);\r\n\t\t}\r\n\t\t//$src = Dbi_Source::GetModelSource($model);\r\n\t\t$result = $model->select();\r\n\t\tif ($result->count()) {\r\n\t\t\tif ($result->count() > 1) {\r\n\t\t\t\tthrow new Exception(\"{$cls} returned multiple records for primary key {$id}\");\r\n\t\t\t}\r\n\t\t\t$record = $result[0];\r\n\t\t} else {\r\n\t\t\t$record = new Dbi_Record($model, null);\r\n\t\t\t$record->setArray($key, false);\r\n\t\t}\r\n\t\treturn $record;\r\n\t}",
"public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Project::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=DiasLetivos::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Report::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Invoice::model()->findByPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Alocacao::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Klient::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Information::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t{\n\t\t\t\t$condition='';\n\t\t\t\t$this->_model=Chat::model()->findByPk($_GET['id'], $condition);\n\t\t\t}\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n {\n if ($this->_model === null) {\n if (isset($_GET['id'])) {\n if (Yii::app()->user->isGuest)\n //$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;\n $condition = '';\n else\n $condition = '';\n $this->_model = Object::model()->with(array('author','files'))->findByPk($_GET['id']);\n }\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function __get($key)\n\t{\n\t\t// See if we are requesting a foreign key\n\t\tif (isset($this->_data[$key.'_id']))\n\t\t{\n\t\t\tif (isset($this->_lazy[$key])) // See if we've lazy loaded it\n\t\t\t{\n\t\t\t\t$model = AutoModeler::factory($key);\n\t\t\t\t$model->process_load($this->_lazy[$key]);\n\t\t\t\t$model->process_load_state();\n\t\t\t\treturn $model;\n\t\t\t}\n\n\t\t\t// Get the row from the foreign table\n\t\t\treturn AutoModeler::factory($key, $this->_data[$key.'_id']);\n\t\t}\n\t\telse if (isset($this->_data[$key]))\n\t\t\treturn $this->_data[$key];\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=RR_TipoHorario::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=TBantuanData::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Consultor::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Programa::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=RequestFuel::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('rdt','The requested page does not exist.'));\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Respuestas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Clap::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Recargas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Tshirt::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id){\n\t\t$model=Contact::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=KqxsBac::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Column::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Patient::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id){\n\t\t\n\t\t$model=XhTitle::model()->findByPk($id);\n\t\t\n\t\tif($model===null)\n\t\t\t\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\n\t\treturn $model;\n\t\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Results::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Materia::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Coordocs::model()->findByPk($id+0);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Employe::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Alumno::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Quote3::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = TblServer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id) {\n $model = TblServer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=DeedMaster::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Ios::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Study::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Kzone::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pooja::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=StudentDocument::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,Yii::t('app','The requested page does not exist.'));\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Persona::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Entry::model()->with('entryAnswers')->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function getModelByPrimaryKey($action = null, $keyValue = null)\n {\n $keyName = $this->model->getKeyName();\n\n if ($keyValue == '_') {\n if ($this->request()->has(\"data.primaryKey.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.primaryKey.{$keyName}\");\n } elseif ($this->request()->has(\"data.old.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.old.{$keyName}\");\n } elseif ($this->request()->has('data.items')) {\n $items = $this->request()->input('data.items');\n if (Arr::has($items, $keyName)) {\n $keyValue = Arr::get($items, $keyName);\n } else {\n $first = Arr::first($items);\n if (Arr::has($first, $keyName)) {\n $keyValue = Arr::get($first, $keyName);\n }\n }\n }\n }\n\n $data = [$keyName => $keyValue];\n\n $r = $this->validateData($data, null, 'primaryKey', $action, [$keyName => ['includeUniqueRules' => false]]);\n if ($r !== true) {\n return $r;\n }\n\n $modelClass = get_class($this->model);\n if ($model = $modelClass::find($data[$keyName])) {\n return $model;\n }\n\n return CrudJsonResponse::error(CrudHttpErrors::TARGET_DATA_MODEL_NOT_FOUND, null, [\n 'action' => 'primaryKey',\n 'parent_action' => $action,\n 'target' => $data,\n ]);\n }",
"public function loadModel()\n {\n if ($this->_model === null)\n {\n if (isset($_GET['id']))\n $this->_model = User::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=ARTICULOS::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Package::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Knowledgecatalogue::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=User::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n {\n $model=Domain::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=ElBezQuests::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Basic_definition::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PPDokrekammedisM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Repository::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=RKPengirimanrmT::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Sale::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Korzet::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'A keresett tartalom nem található.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=DProcessoDisciplinar::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Fddemandreceipt::model()->findByPk((int) $id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Stone::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Store::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PegawaiM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Solicitudes::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Docingresados::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'El enlace o direccion solicitado no existe');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Quotes::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The Requested Page Does Not Exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pagosconceptos::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public abstract function find($primary_key, $model);",
"public function loadModel($id)\n\t{\n\t\t$model=CerDoc::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=JobSummary::model()->findByPk($id);\n \n \n \n \n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model = InfoSpares::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}",
"public function loadModel($id)\n {\n $model=Seat::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id){\r\r\n\r\r\n\t $model=OrdenConsumo::model()->findByPk($id);\r\r\n\r\r\n\t if($model===null)\r\r\n\t throw new CHttpException(404,'The requested page does not exist.');\r\r\n\t return $model;\r\r\n\r\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pegawai::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Image::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Image::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Customer::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Cooperativepartner::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model=Services::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Gejala::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel()\n\t{\n\t\tif( $this->_model===null )\n\t\t{\n\t\t\t$itemName = $this->getItemName();\n\t\t\t\n\t\t\tif( $itemName!==null )\n\t\t\t{\n\t\t\t\t$this->_model = $this->_authorizer->authManager->getAuthItem($itemName);\n\t\t\t\t$this->_model = $this->_authorizer->attachAuthItemBehavior($this->_model);\n\t\t\t}\n\n\t\t\tif( $this->_model===null )\n\t\t\t\tthrow new CHttpException(404, Rights::t('core', 'The requested page does not exist.'));\n\t\t}\n\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Topik::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Roomclosure::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=CollectionShop::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model=Product::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=CitasReservada::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Ncr::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Student::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('common','The requested page does not exist.'));\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model = Exam::model()->findByPk($id);\n\t\tif ($model === null)\n\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"protected function getModel($key)\n {\n\n if (isset($this->models[$key]))\n return $this->models[$key];\n else\n return null;\n\n }",
"public function loadModel($id) {\n $model = Carrer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Talonario::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pedido::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pedido::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Task::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Item::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Question::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}"
] | [
"0.6997261",
"0.69638866",
"0.68569964",
"0.6705791",
"0.6649421",
"0.66426146",
"0.66365725",
"0.66270196",
"0.66238034",
"0.6618576",
"0.6614784",
"0.6612998",
"0.6559414",
"0.65578026",
"0.6541776",
"0.65416086",
"0.6534812",
"0.6534454",
"0.65291643",
"0.6528117",
"0.6524174",
"0.6489056",
"0.64860797",
"0.6480161",
"0.6478223",
"0.64498556",
"0.6442869",
"0.6438515",
"0.6432895",
"0.643243",
"0.6430236",
"0.6428728",
"0.6428414",
"0.6413958",
"0.6413646",
"0.6408426",
"0.6396366",
"0.6396366",
"0.6393872",
"0.6393349",
"0.6392682",
"0.6388049",
"0.63805395",
"0.63793623",
"0.6378086",
"0.637688",
"0.63754743",
"0.6372571",
"0.6372514",
"0.6371726",
"0.63716537",
"0.6371086",
"0.63664174",
"0.6365037",
"0.63632226",
"0.63621706",
"0.63617843",
"0.63602537",
"0.63582873",
"0.63559985",
"0.6345393",
"0.6337163",
"0.6336907",
"0.6333856",
"0.6331965",
"0.63309526",
"0.63295704",
"0.6329301",
"0.63282764",
"0.6322994",
"0.63217723",
"0.6320708",
"0.631866",
"0.63159806",
"0.63110465",
"0.6310321",
"0.63091594",
"0.63086355",
"0.63086355",
"0.6308356",
"0.63058424",
"0.63022786",
"0.63017946",
"0.63004315",
"0.629797",
"0.6297109",
"0.62957144",
"0.6295081",
"0.62931174",
"0.6292541",
"0.6290902",
"0.62903637",
"0.62896484",
"0.6289392",
"0.62831974",
"0.62822974",
"0.62822974",
"0.6281285",
"0.62803316",
"0.6277214"
] | 0.64302963 | 30 |
Performs the AJAX validation. | protected function performAjaxValidation($model)
{
if(isset($_POST['ajax']) && $_POST['ajax']==='rdjadwaldokter-m-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ajaxValidationAction()\n {\n if($this->_request->getPost('ajax_submit',false, Request::FILTER_INT))\n $result = 'ok_ajax';\n else\n $result = 'ok';\n $messages = array();\n\n if(!$this->validate())\n {\n $this->collectValidateErrors(); \n foreach($this->_view->getFormErrors() as $k => $v)\n {\n $messages['__data'.$k] = $v;\n }\n $result = 'error';\n }\n $tpl = '';\n if($result == 'error')\n {\n $tpl = $this->fetchElementTemplate('messages_summary');\n }\n $this->_view->sendJson( array('result'=>$result, 'messages'=>$messages, 'tpl'=>$tpl) );\n }",
"public function ajaxValidation()\n {\n if (!Yii::$app->request->isPost)\n return;\n\n if (!Yii::$app->request->isAjax)\n return;\n\n //Bu, PJAX formalarda uchun kerak\n //shu holatda, postValidation ishlaydi\n if (Yii::$app->request->isPjax)\n return;\n\n if (!$this->load(Yii::$app->request->post())) {\n throw new NotFoundHttpException();\n }\n\n $response = Yii::$app->response;\n $response->format = Response::FORMAT_JSON;\n $result = ActiveForm::validate($this);\n if ($result !== null) {\n $response->data = $result;\n }\n\n Yii::$app->end();\n }",
"protected function performAjaxValidation($model)\n\t{\n \n\t//\tif(isset($_REQUEST['ajax']) && $_REQUEST['ajax']==='admission-form')\n\t//\t{\n // echo \"Bismillah Hir Rahmanur Rahim\";\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t//\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n \n\t//\tif(isset($_REQUEST['ajax']) && $_REQUEST['ajax']==='admission-form')\n\t//\t{\n // echo \"Bismillah Hir Rahmanur Rahim\";\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t//\t}\n\t}",
"public function validate()\n {\n // Tipo de validación\n $type = $this->request->get('type');\n $type = ($type == 'email') ? 'email' : 'username';\n \n Core::getService('account.validate')->$type($this->request->get('value'));\n $status = 'taken';\n \n if (Core_Error::isPassed())\n {\n $status = 'ok'; \n }\n \n $this->call(\"var obj = $('#\" . $this->request->get('obj') . \"'); signup.show_status(obj, '{$status}');\");\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='docingresados-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='entry-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='respuestas-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='departamento-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'listing-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='doheader-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dodetail-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif (isset ( $_POST ['ajax'] ) && $_POST ['ajax'] === 'whitelist-form')\n\t\t{\n\t\t\techo CActiveForm::validate ( $model );\n\t\t\tYii::app ()->end ();\n\t\t}\n\t}",
"public function ajax_email(){\n\t\t//loading the form validation library\n\t\t$this->load->library('form_validation');\n\t\t//validation rules\n\t\t$this->form_validation->set_rules('em', 'Email', 'valid_email');\n\t\t//check the validation throws any errors\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t//echoing the respond to the div that specified in the javascript\n\t\t\techo 'Invalid Email';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//echoing the respond to the div that specified in the javascript\n\t\t\techo 'Valid';\n\t\t}\n\t}",
"public function performAjaxValidation($model)\r\n {\r\n if (isset($_POST['ajax']))\r\n Y::end(CActiveForm::validate($model));\r\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='request-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pagosconceptos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='domain-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='page-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='page-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='page-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model){\r\r\n\r\r\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='facturas-form'){\r\r\n\t\t\techo CActiveForm::validate($model);\r\r\n\t\t\tYii::app()->end();\r\r\n\t\t}\r\r\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='points-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'alocacao-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='donantes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'consultor-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='announce-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='premium-ad-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'incoming-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pedido-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pedido-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='recargas-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'pago-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='residencebaseinfo-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pago-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pago-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'qircomentario-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='citas-reservada-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='talonario-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='materia-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'starGreetings-greeting-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"function admin_validate_data_ajax(){\n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\tif($this->RequestHandler->isAjax()){\n\t\t\t$errors_msg = null;\n\t\t\t$data = $this->data;\n\t\t\tif(isset($this->data['Vendor']['id'])){\n\t\t\t\t$data['Vendor']['id'] = DECRYPT_DATA($data['Vendor']['id']);\n\t\t\t}\n\t\t\t\n\t\t\t$errors = $this->Vendor->validate_data($data);\n\t\t\t\n\t\t\tif ( is_array ($this->data) ){\n\t\t\t\tforeach ($this->data['Vendor'] as $key => $value ){\n\t\t\t\t\tif( array_key_exists ( $key, $errors) ){\n\t\t\t\t\t\tforeach ( $errors [ $key ] as $k => $v ){\n\t\t\t\t\t\t\t$errors_msg .= \"error|$key|$v\";\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$errors_msg .= \"ok|$key\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t\techo $errors_msg;die();\n\t\t}\t\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='solicitudes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'registration-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'inmueble-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='request-fuel-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='gejala-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='invoice-penjualan-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='stone-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'beneficiario-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax']==='nota-fiscal-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='Review-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='object-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dias-letivos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'live-in-mission-carers-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='posting-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dprocesso-disciplinar-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_GET['layout'])){\n\t\t\t$this->layout = $_GET['layout'];\n\t\t}\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='users-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='indicadores-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='mentor-post-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"function clientContactValidateAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$contact_email = $request['cemail'];\n\t\t\t$prev_email = $request['pemail'];\n\t\t\t$edit = $request['edit'];\n\t\t\t$client_obj = new Ep_User_Client();\n\t\t\techo $client_obj->checkContact($contact_email,$edit,$prev_email);\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='el-bez-quests-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pedidos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='spam-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='vacancies-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='estudiante-evaluacion-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='basic-definition-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='film-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='results-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='roomclosure-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'planos-alimentares-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function runValidate()\n {\n Validate::run($this->request);\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'donneur-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"function admin_validate_edit_cms_ajax(){\r\r\n\t\t\r\r\n\t\t$this->layout = \"\";\r\r\n\t\t$this->autoRender = false;\r\r\n\t\tif($this->RequestHandler->isAjax()){\r\r\n\t\t\t$errors_msg = null;\r\r\n\t\t\tApp::import('Model','CmsPage');\r\r\n\t\t\t$this->CmsPage = new CmsPage();\r\r\n\t\t\t\r\r\n\t\t\t$data = $this->data;\r\r\n\t\t\tif(isset($data['CmsPage']['id'])){\r\r\n\t\t\t\t$data['CmsPage']['id'] = DECRYPT_DATA($data['CmsPage']['id']);\r\r\n\t\t\t}\r\r\n\t\t\t$errors = $this->CmsPage->valid_edit_cms($data);\r\r\n\t\t\tif ( is_array ( $this->data ) ){\r\r\n\t\t\t\tforeach ($this->data['CmsPage'] as $key => $value ){\r\r\n\t\t\t\t\tif( array_key_exists ( $key, $errors) ){\r\r\n\t\t\t\t\t\tforeach ( $errors [ $key ] as $k => $v ){\r\r\n\t\t\t\t\t\t\t$errors_msg .= \"error|$key|$v\";\r\r\n\t\t\t\t\t\t}\t\r\r\n\t\t\t\t\t}else {\r\r\n\t\t\t\t\t\t$errors_msg .= \"ok|$key\\n\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\techo $errors_msg;\r\r\n\t\t\tdie();\r\r\n\t\t}\t\r\r\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='providers-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"function ajax_validate_save_post()\n {\n }",
"protected function performAjaxValidation($model) {\n //echo 'si cae';exit;\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'schedule-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n\t\tif (\n\t\t\tisset($_POST['ajax']) && \n\t\t\t$_POST['ajax']==='user-form'\n\t\t) {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n\t\tif (isset($_POST['ajax']) && $_POST['ajax'] === 'zona-educativa-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax'] === 'classes-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='share-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='publisher-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'list-contact-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n\t\tif (isset($_POST['ajax']) && $_POST['ajax'] === 'terms-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='content-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'cotizador-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'nube-factura-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='purchase-header-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='penjaminpasien-m-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'unidad-resp-ticket-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'pid-approval-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'aviso-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='articulos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='employee-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'fddemandreceipt-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='gzterimabahanmakan-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='contractor-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='campaign-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'recruit-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'carrer-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'plantel-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='temples-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}"
] | [
"0.79766375",
"0.7535804",
"0.6860131",
"0.6860131",
"0.6833871",
"0.6784885",
"0.6775202",
"0.67711323",
"0.6764112",
"0.6737663",
"0.67355454",
"0.6724824",
"0.67199975",
"0.6704958",
"0.66932213",
"0.6688998",
"0.66856104",
"0.6685253",
"0.6685253",
"0.6685253",
"0.6684122",
"0.66835374",
"0.667292",
"0.66677856",
"0.66630244",
"0.6655108",
"0.66525847",
"0.66509473",
"0.6648977",
"0.6648977",
"0.66484463",
"0.664732",
"0.664309",
"0.66414714",
"0.66414714",
"0.6641052",
"0.6640937",
"0.66408783",
"0.66408616",
"0.6637236",
"0.66364473",
"0.66305506",
"0.6629554",
"0.662805",
"0.66273016",
"0.66254425",
"0.6623703",
"0.6623457",
"0.6622179",
"0.6619359",
"0.66117007",
"0.66110605",
"0.6610798",
"0.6607507",
"0.6606362",
"0.660558",
"0.6603507",
"0.6601762",
"0.6601645",
"0.66008556",
"0.6600299",
"0.6599498",
"0.6597717",
"0.6597152",
"0.65953803",
"0.6594512",
"0.6594301",
"0.65940595",
"0.6589112",
"0.65874445",
"0.6587396",
"0.6586238",
"0.6585987",
"0.6585833",
"0.65855193",
"0.65854985",
"0.65795213",
"0.65791273",
"0.6579109",
"0.6577812",
"0.65758437",
"0.65751547",
"0.6573167",
"0.6572345",
"0.6571965",
"0.65713406",
"0.6571003",
"0.6570696",
"0.6569799",
"0.65693045",
"0.65690905",
"0.65669453",
"0.65652615",
"0.6564998",
"0.6564873",
"0.65645194",
"0.6564518",
"0.65632385",
"0.65625596",
"0.6561483",
"0.65613127"
] | 0.0 | -1 |
Initializes the manager, removing expired locks | public function __construct() {
$lockPath = $this->getLockPath();
$this->lockPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_Flow.lock';
$this->lockFlagPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_FlowIsLocked';
$this->removeExpiredLock();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init()\n {\n if ($this->autoRelease) {\n $locks = &$this->_locks;\n register_shutdown_function(function () use (&$locks) {\n foreach ($locks as $lock) {\n $this->release($lock);\n }\n });\n }\n }",
"public function clear_all_locks();",
"public function init()\n {\n $manager = $this->getCacheManager();\n Ezy_Cache_Manager::setInstance($manager);\n\n if(isset($_GET['CLEAR_CACHE']) && $_GET['allowme'] == 1){\n $cache = Ezy_Cache_Manager::getInstance()->getCache($_GET['CLEAR_CACHE']);\n $cache->clean(Zend_Cache::CLEANING_MODE_ALL);\n }\n \n return $manager;\n }",
"protected function initEventsManager()\n {\n $this->di->setShared('eventsManager', function () {\n $em = new EventsManager;\n $em->enablePriorities(true);\n\n return $em;\n });\n }",
"function __destruct() {\n\t\tif (count($this->locks) > 0) {\n\t\t\tif (DEBUG > 0) {\n\t\t\t\tforeach ($this->locks as $id=>$fp) {\n\t\t\t\t\t$this->unlock($id);\n\t\t\t\t}\n\t\t\t\twriteLog(\"these locks have not been unlocked:\".print_r($this->locks, true),KATA_ERROR);\n\t\t\t}\n\t\t}\n\t}",
"protected function initialize() {\n $cacheFile = $this->getCacheFile();\n\n if ($cacheFile->isLocked()) {\n $cacheFile->waitForUnlock();\n }\n\n if (!$cacheFile->exists()) {\n $this->reset();\n return;\n }\n\n $serializedIndex = $cacheFile->read();\n $this->index = unserialize($serializedIndex);\n }",
"private function deleteExpiredLocks()\n {\n $sql = \"DELETE FROM {$this->config->dbTablePrefix}keyword_lock\n WHERE\n `lock_time` < NOW()-3600\";\n\n $this->model->dba->query($sql); \n }",
"protected function initCaches() {}",
"private function _init()\n {\n if (!$this->_isInitialized()) {\n $this->synchronize();\n }\n }",
"private function resetAll()\n {\n $this->resetJobManager();\n self::clearCurrentJob(null);\n RetailcrmLogger::output('CLI command lock was cleared.');\n }",
"public static function reset_caches() {\n self::$instance = null;\n }",
"public function testParallelLockExpired(): void\n {\n $testLifeTime = 2;\n \\Closure::bind(function (Cache $class) use ($testLifeTime) {\n $class->defaultLifetime = $testLifeTime;\n }, null, $this->cacheInstance1)($this->cacheInstance1);\n\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, 0));\n $this->assertTrue($this->cacheInstance2->lock($identifier1, $testLifeTime + 1));\n\n $this->cacheInstance2->unlock($identifier1);\n }",
"public static function initCache()\n {\n// $cache->delete('config');\n }",
"private function init()\n {\n // get sync status object\n $this->currentStatus = $this->getObject();\n\n // if sum of last processed ids is then we can assume that we are doing \n // a new sync. So we want to clear old data files so we can make new ones.\n // if ($this->currentStatus->getLastCustomerId() == 0 \n // && $this->currentStatus->getLastOrderId() == 0\n // && $this->currentStatus->getLastSubscriptionId() == 0\n // )\n // Mage::helper('marketingsoftware/DataWriter')->clearDataFiles();\n\n // store start time for this event\n $this->startTime = microtime(true);\n }",
"public static function setUnlocked()\n {\n self::$locked = false;\n }",
"protected function initializeObjectManager() {}",
"private function lock_cleanup() {\n\t\tif (\n\t\t\t$this->lock !== NULL\n\t\t\t&& $this->lock->is_expired()\n\t\t) {\n\t\t\t$this->lock = NULL;\n\t\t}\n\t\t$this->write();\n\t}",
"protected function initializeCache() {}",
"protected function initializeCache() {}",
"protected function __construct()\n\t{\n\t\tassert( '!( self::$current instanceof self )' );\n\n\t\t// register manager in session\n\t\t$_SESSION[self::stubName] = $this;\n\t}",
"protected function initStorageObjects() {\n\t\t$this->durationtiming = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}",
"function __construct() {\n $this->_cache = [];\n }",
"public function init()\n {\n parent::init();\n $this->_cache = new \\Memcache;\n $this->_cache->connect();\n }",
"protected function initStorageObjects()\n {\n $this->states = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"public function __destruct()\n {\n foreach ($this->acquiredLocks as $key => $true) {\n $this->release($key);\n }\n }",
"public function __construct() {\n\t\t\t$this->clients = new \\SplObjectStorage;\n\t\t}",
"private function _reinit()\n {\n $this->compressed_list = array();\n $this->central_dir_list = array();\n $this->end_of_central = array();\n $this->info = array();\n $this->error = array();\n }",
"public function __construct()\n {\n $this->roles = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->helpers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"protected static function reset()\n {\n self::$dbm = null;\n }",
"public function __construct()\n {\n $this->users = Cache::remember('admin.users', now()->addHours(1),\n function () {\n return UserResource::collection(User::all())->toJson();\n });\n }",
"private function __construct()\n\t{\n\t\t$this->_loadCacheObj();\n\t\treturn;\n\t}",
"private function refreshLockInformation()\n {\n $result = self::$db->fetchOne(\n 'SELECT lock, locktime FROM jukebox.playlists WHERE playlistid=$1',\n [$this->getID()]\n );\n $this->lock = empty($result['lock']) ? null : MyRadio_User::getInstance($result['lock']);\n $this->locktime = (int) $result['locktime'];\n }",
"public function __destruct()\n\t{\n\t\t//\n\t\t// Check file.\n\t\t//\n\t\tif( file_exists( $this->mLockFile ) )\n\t\t\t@unlink( $this->mLockFile );\n\t\t\n\t\t//\n\t\t// Reset member.\n\t\t//\n\t\t$this->mLockFile = NULL;\n\n\t}",
"protected function _initTransactionRegistry() {\n $collection = Mage::getResourceModel('globalthinking_inventory/stock_transaction_collection')->clear();\n Mage::register(self::REGISTRY_TXN_KEY,$collection);\n }",
"public function __construct()\n {\n $this->sicBlocks = [];\n $this->cachedInstances = [];\n }",
"public function __construct()\n\t{\n\t\t$this->clients = new \\SplObjectStorage();\n\t}",
"protected function initializeWorkspacesCachingFramework() {}",
"public function __construct()\n {\n $this->sharedInstances = [];\n }",
"protected function doInitialize()\n {\n // Has NEW objects added through add(). Remember them.\n $newObjects = [];\n if ($this->isDirty) {\n $newObjects = $this->collection->toArray();\n }\n $this->collection->clear();\n $this->manager->getUnitOfWork()->loadCollection($this);\n $this->takeSnapshot();\n // Reattach NEW objects added through add(), if any.\n if ($newObjects) {\n foreach ($newObjects as $obj) {\n $this->collection->add($obj);\n }\n $this->isDirty = true;\n }\n }",
"public function init()\n {\n parent::init();\n\n $this->deleted = 0;\n }",
"protected function _initializeTokens() {\n\t\t$this->_previousToken = $this->_session->key;\n\t\t\n\t\t$newKey = sha1 ( microtime () . mt_rand () );\n\t\t\n\t\t$this->_session->key = $newKey;\n\t\tif ($this->_expiryTime > 0)\n\t\t\t$this->_session->setExpirationSeconds ( $this->_expiryTime );\n\t\t\n\t\t$this->_token = $newKey;\n\t}",
"public function Initialize()\n\t\t{\n\t\t\t$this->intId = PersonWithLock::IdDefault;\n\t\t\t$this->strFirstName = PersonWithLock::FirstNameDefault;\n\t\t\t$this->strLastName = PersonWithLock::LastNameDefault;\n\t\t\t$this->strSysTimestamp = PersonWithLock::SysTimestampDefault;\n\t\t}",
"public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n PoolManager::getInstance()->register(MysqlPool::class, Config::getInstance()->getConf('MYSQL.POOL_MAX_NUM'));\n PoolManager::getInstance()->register(RedisPool::class, Config::getInstance()->getConf('REDIS.POOL_MAX_NUM'));\n }",
"public function testParallelUnlockNoExpiration(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n $identifier2 = \\uniqid('lock_name_2_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, -1));\n $this->assertTrue($this->cacheInstance2->lock($identifier2, -1));\n\n $this->assertFalse($this->cacheInstance2->unlock($identifier1));\n $this->assertTrue($this->cacheInstance2->unlock($identifier2));\n\n $this->assertTrue($this->cacheInstance2->isLocked($identifier1));\n $this->assertFalse($this->cacheInstance2->isLocked($identifier2));\n }",
"protected function initStorageObjects()\n {\n $this->allowedParties = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->ignoringCommunityUsers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"public function lock() {}",
"public function __destruct()\n {\n if ($this->isLocked()) {\n $this->unlock();\n }\n }",
"public function __construct()\n {\n $this->initContrexxCaching();\n $this->initOPCaching();\n $this->initUserCaching();\n $this->getActivatedCacheEngines();\n }",
"protected function initStorageObjects()\n {\n $this->events = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('batch_job_lock');\n\t\t$this->setPhpName('BatchJobLock');\n\t\t$this->setClassname('BatchJobLock');\n\t\t$this->setPackage('Core');\n\t\t$this->setUseIdGenerator(false);\n\t\t// columns\n\t\t$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n\t\t$this->addColumn('JOB_TYPE', 'JobType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('JOB_SUB_TYPE', 'JobSubType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OBJECT_ID', 'ObjectId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('OBJECT_TYPE', 'ObjectType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('ESTIMATED_EFFORT', 'EstimatedEffort', 'BIGINT', false, null, null);\n\t\t$this->addColumn('STATUS', 'Status', 'INTEGER', false, null, null);\n\t\t$this->addColumn('START_AT', 'StartAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('PRIORITY', 'Priority', 'TINYINT', false, null, null);\n\t\t$this->addColumn('URGENCY', 'Urgency', 'TINYINT', false, null, null);\n\t\t$this->addColumn('ENTRY_ID', 'EntryId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('PARTNER_ID', 'PartnerId', 'INTEGER', false, null, 0);\n\t\t$this->addColumn('SCHEDULER_ID', 'SchedulerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('WORKER_ID', 'WorkerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('BATCH_INDEX', 'BatchIndex', 'INTEGER', false, null, null);\n\t\t$this->addColumn('EXPIRATION', 'Expiration', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('EXECUTION_ATTEMPTS', 'ExecutionAttempts', 'TINYINT', false, null, null);\n\t\t$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, null);\n\t\t$this->addColumn('DC', 'Dc', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('BATCH_JOB_ID', 'BatchJobId', 'INTEGER', 'batch_job_sep', 'ID', false, null, null);\n\t\t$this->addColumn('CUSTOM_DATA', 'CustomData', 'LONGVARCHAR', false, null, null);\n\t\t// validators\n\t}",
"public function initCheckInformations()\n\t{\n\t\t$this->collCheckInformations = array();\n\t}",
"public function init() {\n\n $listingtype_id = $this->_getParam('listingtype_id', null);\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereviewpaidlisting')) {\n //FOR UPDATE EXPIRATION\n if ((Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereviewpaidlisting.task.updateexpiredlistings') + 900) <= time()) {\n Engine_Api::_()->sitereviewpaidlisting()->updateExpiredListings($listingtype_id);\n }\n }\n }",
"function __construct(MonitorManager $manager, array $data)\n\t{\n\t\t$this->manager = $manager;\n\t\t$this->name = $data['name'];\n\t\t$this->link = $data['link'];\n\t\t$this->interval = $data['interval'];\n\t\t$attempt = 0;\n\t\t$this->shouldExit = false;\n\t\t$this->shouldAlarm = true;\n\t\t$this->logger = new Logger('service_logger');\n\t}",
"protected function removeExpiredCacheEntries() {}",
"public function run()\n\t{\n\t\tDB::table('locks')->delete();\n\n\t\t$locks = [\n\t\t\t[\n\t\t\t\t'lock' \t\t\t=> 0,\n\t\t\t\t'created_at'\t=> new DateTime,\n\t\t\t\t'updated_at'\t=> new DateTime,\n\t\t\t]\n\t\t\t\n\t\t];\n\n\t\tDB::table('locks')->insert($locks);\n\t}",
"protected function runForgetMutexChecks()\r\n {\r\n if ($this->cache->has('eyewitness_scheduler_forget_mutex')) {\r\n foreach(json_decode($this->cache->pull('eyewitness_scheduler_forget_mutex'), true) as $mutex) {\r\n if (! $event = $this->findEventMutex($mutex)) {\r\n continue;\r\n }\r\n\r\n $event->forgetMutex();\r\n }\r\n }\r\n }",
"protected function initStorageObjects()\n {\n $this->item = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"protected function _initDatabaseManager()\n {\n // implement in application. Get DatabaseManager\n }",
"public function keyPoolRefill();",
"protected function createAllCaches() {}",
"public function reset(): void\n {\n $this->_add = new SplObjectStorage();\n $this->_delete = new SplObjectStorage();\n }",
"public static function reset()\n {\n if (self::$_instance != null) {\n self::$_instance->_wrapperRegistry = array();\n }\n self::$_instance = null;\n }",
"function manager_admin_init(){\t \n\n\t\t\n\n\t\t\t\n\t}",
"public function __construct()\n {\n $this->setLockedSince(new \\DateTime(\"0000-00-00 00:00:00\"));\n $this->setCreated(new \\DateTime());\n $this->setModified(new \\DateTime());\n $this->setLastError(new \\DateTime(\"0000-00-00 00:00:00\"));\n $this->hasError = false;\n $this->isActive = true;\n $this->lastRunTime = 0;\n $this->notifyOnError = true;\n }",
"public function acquire() {}",
"public function __construct()\n {\n $this->timestamp = time();\n $this->permissionClauseCache = [];\n }",
"protected function initStorageObjects()\n {\n $this->event = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"static function init(){\n\t\t\t\t\t\t\n\t\t//creating table to store information if the crm is down\n\t\tregister_activation_hook(CRMGRAVITYFILE, array(get_class(), 'create_offline_table'));\n\t\t\t\t\n\t}",
"public function init() {\n\t\t$this->cacheDir = $this->chatBot->vars[\"cachefolder\"];\n\n\t\t//Making sure that the cache folder exists\n\t\tif (!dir($this->cacheDir)) {\n\t\t\tmkdir($this->cacheDir, 0777);\n\t\t}\n\t}",
"protected static function init_cache(){\n if(static::$_cache === false){ \n $tmp = [];\n static::$_cache =& $tmp;\n unset($tmp);\n }\n }",
"public function reset()\n {\n // don't start a new session to remove something that isn't there\n $this->lazyStart();\n $this->_store = array();\n }",
"public function __construct()\n {\n Cache::forget('laralum_permissions');\n }",
"protected function init()\n {\n $this->memcache = new MemcacheDB();\n $driverConfig = $this->config->get('cache.memcache');\n $this->memcache->connect(\n $driverConfig['host'],\n $driverConfig['port']\n );\n }",
"public function __construct()\n\t{\n\t\t$this->clear();\n\t}",
"protected function initStorageObjects() {\n\t\t$this->subForums = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->threads = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groupsWithReadAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groupsWithWriteAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groupsWithModificationAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->usersWithReadAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->usersWithWriteAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->usersWithModificationAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}",
"public function reset()\n {\n $this->values[self::_ACQUIRE] = array();\n }",
"public static function reinit() {\n\t\tself::$instance = NULL;\n\t\tself::init();\n\t}",
"public function initializeObject()\n {\n $operationsAndFinalOperationNames = static::buildOperationsAndFinalOperationNames($this->objectManager);\n $this->operations = $operationsAndFinalOperationNames[0];\n $this->finalOperationNames = $operationsAndFinalOperationNames[1];\n }",
"public function removeAllTasks() {\n\t\t$this->tasks = new Tx_Extbase_Persistence_ObjectStorage();\n\t}",
"public function gc()\n {\n $expired = $this->find('toGc')->all();\n foreach ($expired as $block) {\n $this->unblock($block->get('id'));\n }\n }",
"public function __construct(){\n\t\t\n\t\t$this->dataMgr = createNewDataManager();\n\t\t$this->player = null;\n\t}",
"protected function _initialize()\n {\n $this->_setupRoles();\n $this->_setupResources();\n $this->_setupPrivileges();\n $this->_saveAcl();\n }",
"function reset_caches() {\n \n $this->ext->reset_caches();\n \n }",
"public function acquireSharedLock() {}",
"public function __construct() {\n\t\t$this->birthInfo = new Tx_Extbase_Persistence_ObjectStorage();\n\t}",
"public function reinit()\n {\n }",
"public function init()\n\t{\n\t\t$this->_loadResources();\n\t\t$this->_loadRoles();\n\t\t$this->_loadPrivileges();\n\t\t\n\t\t// cleanup\n\t\t$this->_temp['roles'] = array();\n\t\t$this->_temp['resources'] = array();\n\t\t\n\t\treturn $this;\n\t}",
"public function __construct()\n\t{\n\t\t$this->observers = array();\n\t\t$this->authenticated = false;\n\t}",
"public function init() {\n $this->store->init();\n }",
"function getLocks();",
"public static function init_mgr()\n {\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Last-Modified: ' . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n header('Cache-Control: no-store, no-cache, must-revalidate');\n header('Cache-Control: post-check=0, pre-check=0', false);\n header('Pragma: no-cache');\n header('X-UA-Compatible: IE=edge;FF=3;OtherUA=4');\n }",
"protected function initStorageObjects()\n {\n $this->newsletter = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->offer = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"protected function locking()\n {\n foreach ($this->all() as $name => $element) {\n $element->lock();\n }\n }",
"public function clear(): void\n {\n if ( ! $this->isLocked())\n {\n $this->keys = $this->values = [];\n }\n }",
"public function dropListCache()\n {\n $this->statusLists = null;\n return $this;\n }",
"public function init()\n\t{\n\t\t$this->_app = classes_like_registry::getApp();\n\t\t$this->_area = classes_like_registry::getArea();\n\t\t\n\t\tif ( empty( $this->_app ) OR empty( $this->_area ) )\n\t\t{\n\t\t\ttrigger_error( \"Missing area or app variable in \" . __CLASS__ . '::' . __FUNCTION__, E_USER_WARNING );\n\t\t}\n\t\t\n\t\t/* Fetch cache class */\n\t\t$this->likeCache = classes_like_cache::getInstance();\n\t\t\n\t\t/* Set a default cache expiration of 24 hours */\n\t\t$this->likeCache->setExpiration( 86400 );\n\t}",
"public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n self::loadConf();\n PoolManager::getInstance()->register(MysqlPool::class, Config::getInstance()->getConf('MYSQL.POOL_MAX_NUM'));\n }",
"public function initCache() {\n $cacheclass = \"corelib_cache_mongoCache\";\n if (self::$_config['caching']['type']) {\n $cacheclass = \"corelib_cache_\" . self::$_config['caching']['type'] . \"Cache\";\n }\n $this->_cache = new $cacheclass(self::$_config['caching']);\n }",
"public function forgetInstances()\n {\n $this->instances = [];\n }",
"public function init() {\n\t$this->_helper->_acl->allow('fa',null);\n\t$this->_helper->_acl->allow('admin',null);\n\t$this->_messages = new Messages();\n\t$this->_replies = new Replies();\n \n }"
] | [
"0.65700257",
"0.5941498",
"0.59093344",
"0.5601446",
"0.5590234",
"0.55478567",
"0.539809",
"0.5350153",
"0.5348513",
"0.53433025",
"0.52624315",
"0.5261633",
"0.5237513",
"0.51924056",
"0.5180532",
"0.5173305",
"0.5168155",
"0.5147384",
"0.5145289",
"0.5138552",
"0.51291746",
"0.51002365",
"0.5083404",
"0.5072864",
"0.50617456",
"0.503327",
"0.50241953",
"0.5020851",
"0.49940473",
"0.49918696",
"0.49846652",
"0.4978813",
"0.49686965",
"0.4963945",
"0.49626794",
"0.49498188",
"0.4949202",
"0.49362087",
"0.49285161",
"0.4922401",
"0.49171743",
"0.49146008",
"0.48998913",
"0.48917556",
"0.48886472",
"0.48847285",
"0.48829743",
"0.48824745",
"0.48715746",
"0.48696887",
"0.48681542",
"0.4858254",
"0.48483118",
"0.48452497",
"0.48381555",
"0.48375586",
"0.4824798",
"0.4822589",
"0.4822183",
"0.481047",
"0.4810329",
"0.48086324",
"0.48007283",
"0.48001522",
"0.48001036",
"0.47941783",
"0.4776798",
"0.47758093",
"0.47736874",
"0.4770822",
"0.4769543",
"0.47636104",
"0.47622028",
"0.47566602",
"0.47499922",
"0.47390354",
"0.4725504",
"0.47158575",
"0.47136608",
"0.4713154",
"0.47045645",
"0.46988592",
"0.46960062",
"0.46947715",
"0.4694035",
"0.46917558",
"0.46900055",
"0.468741",
"0.4687186",
"0.4685867",
"0.46854764",
"0.46765965",
"0.46761316",
"0.46683565",
"0.46631372",
"0.46599534",
"0.46574515",
"0.46530968",
"0.465232",
"0.46520835"
] | 0.5662913 | 3 |
Returns the absolute path to a directory that should contain the lock files | protected function getLockPath() {
return rtrim(sys_get_temp_dir(), '/') . '/';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function lockDir(): string\n {\n return $this->root.'/var/lock';\n }",
"protected function _getCliLockDir()\n {\n return HaloBase::getInstance()->getScriptLockPath();\n }",
"function dirPath() {return (\"../../../../\"); }",
"protected function getFileSnapshotDirectory(): string\n {\n return $this->getSnapshotDirectory().\n DIRECTORY_SEPARATOR.\n 'files';\n }",
"public function get_files_directory() {\n return '../data/files/' . hash_secure($this->name);\n }",
"function dirPath () { return (\"../../\"); }",
"function dirPath() { return (\"../\"); }",
"public function getRootDir()\n {\n return sys_get_temp_dir() . '/base-kernel/' . 'kernel-' . substr(\n hash(\n 'md5',\n json_encode([\n $this->bundlesToLoad,\n $this->configuration,\n $this->routes,\n ])\n ),\n 0,\n 10\n );\n }",
"public function getLocalPath()\r\n\t{\r\n\t\t$accountNumber = $this->getAccountNumber();\r\n\r\n\t\t$file_dir = AntConfig::getInstance()->data_path.\"/$accountNumber/userfiles\";\r\n\t\t$file_dir2 = AntConfig::getInstance()->data_path.\"/$accountNumber/userfiles\";\r\n\t\t\r\n\t\tif ($this->owner_id!=null)\r\n\t\t{\r\n\t\t\t$file_dir .= \"/\".$this->owner_id;\r\n\t\t\t$file_dir2 .= \"/\".$this->owner_id;\r\n\t\t}\r\n\r\n\t\tif (!file_exists($file_dir.\"/\".$this->name_lcl))\r\n\t\t{\r\n\t\t\tif (file_exists($file_dir2.\"/\".$this->name_lcl))\r\n\t\t\t\t$file_dir = $file_dir2;\r\n\t\t}\r\n\r\n\t\t$file_dir .= \"/\".$this->name_lcl;\r\n\r\n\t\treturn $file_dir;\r\n\t}",
"public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'invitationstatus'.DS.'file';\n }",
"public function getCachePath()\r\n\t{\r\n\t\t$path = AD.$this->getConfig()->getChildren(\"cache\")->getString(\"path\");\r\n\t\tif(!is_dir($path))\r\n\t\t{\r\n\t\t\tmkdir($path, 0777, true);\r\n\t\t}\r\n\t\treturn $path;\r\n\t}",
"public static function getCachePath()\n {\n $cacheDir = Config::get('media.cache_dir');\n $cacheFullPath = ROOT . self::getFilesPath() . $cacheDir;\n\n if(!file_exists($cacheFullPath))\n {\n if(!is_writable(ROOT . self::getFilesPath()) || !mkdir($cacheFullPath, Config::get('media.dir_chmod'), true))\n return false;\n }\n\n return $cacheDir;\n }",
"public static function getPatchesLockFilePath(): string\n {\n $composer_file = \\Composer\\Factory::getComposerFile();\n\n $dir = dirname(realpath($composer_file));\n $base = pathinfo($composer_file, \\PATHINFO_FILENAME);\n\n if ($base === 'composer') {\n return \"$dir/patches.lock.json\";\n }\n\n return \"$dir/$base-patches.lock.json\";\n }",
"protected function getUploadRootDir() {\n // guardar los archivos cargados\n return __DIR__ . '/../../../../web/uploads/portafolios/' . $this->getId();\n }",
"public function getCacheDir()\n {\n return $this->rootDir . '/../cache/'.$this->getEnvironment();\n }",
"private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }",
"public function getCacheDir()\n {\n $fileSystem = new Filesystem();\n $path = 'var/cache/assets/'.$this->name.'/';\n \n if (!$fileSystem->exists($path)) {\n $fileSystem->mkdir($path);\n }\n \n return $path;\n }",
"public function getCacheFolder()\n {\n\n return dirname(__FILE__) . '/../../store/cache/';\n }",
"public function getPath(): string\n {\n $root = null;\n $currentDirectory = __DIR__;\n\n do {\n $currentDirectory = dirname($currentDirectory);\n $config = $currentDirectory . '/.refresh-database.yml';\n\n if (file_exists($config)) {\n $root = $currentDirectory;\n }\n } while (is_null($root) && $currentDirectory != '/');\n\n return $config;\n }",
"public function getDir() {\n return Yii::getAlias('@static').'/'.$this->module.'/'. $this->parent_id .'/';\n }",
"protected function get_cache_dir()\n\t{\n\t\treturn $this->cache_dir ?: $this->phpbb_root_path . 'cache/' . $this->get_environment() . '/';\n\t}",
"function getCacheDirectory()\n {\n global $serendipity;\n if ($this->cache_dir === null) {\n $this->cache_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/serendipity_event_avatar';\n }\n return $this->cache_dir;\n }",
"protected function getComposerPath()\n {\n return implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', '..', '..', '..', 'composer.lock'));\n }",
"public function temp_dir() {\n\t\tif(empty($this->jobId))\n\t\t $this->setJobId(\"no_job_id_\"+rand(1,10000));\n\t\t$d=PATH.\"/QueueSandbox/\".$this->jobId.\"_\".$this->ApiName();\n\t\tif(!file_exists($d))\n\t\t\tmkdir($d, 0777, true);\n\t\treturn $d;\n\t}",
"public function getAbsoluteDir()\n {\n return $this->getMachine()->getHome() . '/' . $this->getDir() . '/';\n }",
"public function getAbsoluteBinDir()\n {\n return $this->getAbsoluteDir() . $this->getGame()->getBinDir() . '/';\n }",
"protected function getUploadDir()\n {\n return __DIR__ . '/../../../../web' . $this->getFilesPath();\n }",
"public function getAbsoluteGameContentDir()\n {\n return $this->getAbsoluteBinDir();\n }",
"function parcelcheckout_getRootPath()\n\t{\n\t\t$sRootPath = dirname(dirname(dirname(__FILE__)));\n\n\t\tif(strpos($sRootPath, '\\\\') !== false)\n\t\t{\n\t\t\t$sRootPath .= '\\\\';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sRootPath .= '/';\n\t\t}\n\n\t\treturn $sRootPath;\n\t}",
"public function getCacheDir(){\r\n return $this->_cache->getDir();\r\n }",
"public function getCacheDir()\n {\n return __DIR__ . '/../var/cache/' . $this->getEnvironment();\n }",
"protected function getUploadRootDir()\n {\n //$racine = sudo chmod ;\n return __DIR__.'/../../../web/ressources/uploads/'.$this->getUploadDir();\n }",
"private function getUploadRootDir()\n {\n return __DIR__ . \"/../../../../web\" . $this->getUploadDir();\n }",
"protected function getPath () {\n\tglobal $Config;\n\treturn $Config->get('dir_root').'/'.$this->dir.'/'.$this->name;\n }",
"protected function tempPath() {\n if ($nonce = $this->getNonce()) {\n return sys_get_temp_dir() . DIRECTORY_SEPARATOR . $nonce;\n }\n }",
"abstract public function getRelativeDataDir();",
"protected function get_sitemap_root_cache_file_path() {\n\n\t\t$upload_dir = wp_upload_dir();\n\n\t\t// Set directory the sitemap will be stored in.\n\t\t$cache_dir = '.';\n\t\tif ( isset( $upload_dir['basedir'] ) ) {\n\t\t\t$cache_dir = $upload_dir['basedir'];\n\t\t}\n\n\t\t// Generate sitemap file path.\n\t\t$cache_file = sprintf(\n\t\t\t'%s/sitemap_index.xml',\n\t\t\t$cache_dir\n\t\t);\n\n\t\t$cache_file = \\apply_filters( 'yoast_sitemap_cli_root_cache_file_path', $cache_file );\n\n\t\treturn $cache_file;\n\n\t}",
"protected function getTmpUploadRootDirPhotoPayante() {\n\t\treturn __DIR__ . '/../../../../web/uploads/hebergement/photo_payante/photo_payante';\n\t}",
"public static function getCacheDir()\n {\n return self::getRoot() . DIRECTORY_SEPARATOR . 'cache';\n }",
"protected function getUploadRootDirPhotoPayante() {\n\t\treturn $this->getTmpUploadRootDirPhotoPayante().$this->getId().\"/\";\n\t}",
"protected function getCacheDirectory()\n {\n return $this->cache_dir;\n }",
"protected function getCacheDirectory()\n {\n return $this->cache_dir;\n }",
"public function get_cache_directory() {\n\t\treturn $this->cache_directory;\n\t}",
"public function getRelativeDataDir()\n\t{\n\t\treturn 'ash';\n\t}",
"protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }",
"protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . self::UPLOAD_ROOT;\n }",
"public function get_base_dir()\r\n\t\t{\r\n\t\t\treturn str_replace( \"/\", DIRECTORY_SEPARATOR, __DIR__ . \"/../../\" . self::HOME_DIR );\r\n\t\t}",
"function getUploadedFilesTemporaryPath()\n\t{\n\t\tif (!Queues::$uploadsTempDir) {\n\t\t\tQueues::$uploadsTempDir = Environment::expand(\"%tempDir%\" . DIRECTORY_SEPARATOR . \"uploads-MFU\");\n\t\t}\n\n\t\tif (!file_exists(Queues::$uploadsTempDir)) {\n\t\t\tmkdir(Queues::$uploadsTempDir, 0777, true);\n\t\t}\n\n\t\tif (!is_writable(Queues::$uploadsTempDir)) {\n\t\t\tQueues::$uploadsTempDir = Environment::expand(\"%tempDir%\");\n\t\t}\n\n\t\tif (!is_writable(Queues::$uploadsTempDir)) {\n\t\t\tthrow new InvalidStateException(\"Directory for temp files is not writable!\");\n\t\t}\n\n\t\treturn Queues::$uploadsTempDir;\n\t}",
"protected function getUploadRootDir() {\n // guardar los archivos cargados\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }",
"public function getCacheDir(): string\n {\n return __DIR__ . '/../../../../../../var/cache/test';\n }",
"public function getDirectoryRelativePath(): string\n {\n return $this->config->getValue('general/file/import_images_base_dir');\n }",
"static function LockFilePath( $theUser )\n\t{\n\t\t//\n\t\t// Create name.\n\t\t//\n\t\t$name = kPORTAL_PREFIX.md5( $theUser ).\".lock\";\n\t\t\n\t\t//\n\t\t// Create base path.\n\t\t//\n\t\t$path = sys_get_temp_dir();\n\t\tif( substr( $path, strlen( $path ) - 1, 1 ) != '/' )\n\t\t\t$path .= '/';\n\t\t\n\t\treturn $path.$name;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\n\t}",
"function cache_path()\n {\n $paths = getPaths();\n\n /**\n * Return false if the cache folder is NOT writable\n */\n if( ! is_writable($paths['cache']) )\n {\n return false;\n }\n\n return $paths['cache'];\n }",
"public function lockpath(string $langFile): string\n {\n $langFile = $this->convertDirectorySeparators($langFile);\n \n return $this->lockDirectory.DIRECTORY_SEPARATOR.$langFile.'.php';\n }",
"public function getRootDir();",
"function get_lock_filename(string $key): string\n{\n return \\get_temp_dir() . \"wp_bc_$key.lock\";\n}",
"protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }",
"protected function _getLockFile()\n {\n if ($this->_lockFile !== null) {\n return $this->_lockFile;\n }\n\n $varDir = Mage::getConfig()->getVarDir('locks');\n $file = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';\n\n if (is_file($file)) {\n if($this->_lockIsExpired()){\n unlink($file);//remove file\n $this->_lockFile = fopen($file, 'x');//create new lock file\n }else{\n $this->_lockFile = fopen($file, 'w');\n }\n } else {\n $this->_lockFile = fopen($file, 'x');\n }\n\n fwrite($this->_lockFile, date('r'));\n\n return $this->_lockFile;\n }",
"public function getLogDir(): string\n {\n return __DIR__ . '/../../../../../../var/logs';\n }",
"public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../'.$this->getUploadDir();\n }",
"protected function getUploadRootDir() {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }",
"protected static function packagePath(): string\n {\n return dirname(dirname(__DIR__));\n }",
"public function path() {\n\t\t\treturn rtrim($this->application->configuration([ \"packagemanager\", \"directory\" ]), \"/\") . \"/\" . $this->package_directory;\n\t\t}",
"public function getPhotoUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../web/' . $this->getPhotoUploadDir();\n }",
"public function getBaseDir();",
"public function git_directory_path() {\n\t\t\treturn ($this->bare) ? $this->repo_path : $this->repo_path.\"/.git\";\n\t\t}",
"public function signed_files_dir() {\n\t\t\treturn plugin_dir_path( __FILE__ ) . CFS_SIGNED_FILES_DIR;\n\t\t}",
"public function get_full_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_full_name();\n\t}",
"protected function getUploadDir()\n {\n return 'uploads/org' . $this->id;\n }",
"public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir().\"/\".$this->getHash();\n }",
"protected function _getPath()\n {\n if (!empty($this->_path)) {\n return $this->_path;\n }\n\n $id = $this->_config['id'];\n $dir0 = $id % 10000;\n $dir1 = $dir0 % 100;\n $dir2 = $dir0 - $dir1 * 100;\n if ($dir2 < 0) {\n $dir2 = 0;\n }\n $path = 'apps/';\n\n switch ($this->_config['section']) {\n case 1 :\n $path .= 'scripteditor/' . $dir2 . '/' . $dir1 . '/';\n break;\n \tcase 2 :\n $path .= 'slave/' . $dir2 . '/' . $dir1 . '/';\n break;\n default :\n $path .= 'tmp/';\n break;\n }\n $this->_path = $path;\n return $this->_path;\n }",
"protected function getUploadRootDir() {\r\n return __DIR__ . '/../../../../web/' . $this->getUploadDir()\r\n\r\n ;\r\n }",
"private function getDirectory(): string\n\t{\n\t\t$guesses = [Locator::getPatchPath($this->getPatch())];\n\n\t\t// If this patch has a duplicate then try it too\n\t\t$metaData = $this->getMetaData();\n\t\tif (isset($metaData->duplicate->data))\n\t\t{\n\t\t\t$guesses[] = Locator::getPatchPath($metaData->duplicate->data);\n\t\t}\n\n\t\tforeach ($guesses as $patchDir)\n\t\t{\n\t\t\tif (is_dir($patchDir . 'data'))\n\t\t\t{\n\t\t\t\treturn $patchDir . 'data' . DIRECTORY_SEPARATOR;\n\t\t\t}\n\t\t}\n\n\t\tthrow new RuntimeException('Unable to locate data directory for patch ' . $this->getPatch());\n\t}",
"protected function _getLockFile()\n {\n if ($this->_lockFile === null) {\n $file = $this->getLockFilePath();\n if (is_file($file)) {\n $this->_lockFile = fopen($file, 'w');\n } else {\n $this->_lockFile = fopen($file, 'x');\n }\n fwrite($this->_lockFile, date('r'));\n }\n return $this->_lockFile;\n }",
"protected function getFilesystemPath()\n {\n return dirname($this->path);\n }",
"protected function getBaseDir()\n {\n $ref = new \\ReflectionObject($this);\n\n return realpath(dirname(dirname($ref->getFileName())));\n }",
"public static function get_media_base_dir_path() {\n return self::make_path('cm_root_upload');\n }",
"protected function getUploadRootDir()\n {\n // guardar los archivos cargados\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n // guardar los archivos cargados\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n // guardar los archivos cargados\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n // guardar los archivos cargados\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"private function getUploadRootDir(){\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadDir()\n\t{\n\t\t// get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image\n\t\t// in the view.\n\t\treturn 'uploads/mybudget';\n\t}",
"public function getUploadRootDir() {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }",
"public function getFullPath()\n\t{\n\t\treturn $this->getServerName() . $this->getScriptDirectory();\n\t}",
"protected function getPackageRootPath(): string\n {\n return getcwd() . '/';\n }",
"protected function getUploadRootDir()\r\n\t{\r\n\t\treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n\t}",
"public function configDir(): string\n {\n return $this->root.'/etc';\n }",
"protected function getConfigFolder(): string\n {\n return realpath($this->getBasePath().DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'config');\n }",
"protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../www/' . $this->getUploadImageDir();\n }",
"protected function getCacheDirectory()\n {\n return $this->cacheDirectory;\n }",
"protected function getUploadRootDir()\n\t{\n\t\treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n\t}",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }",
"public static function getWorkingDir()\n {\n return Mage::getBaseDir('var') . DS . 'storelocator' . DS;\n }",
"protected function getUploadRootDir()\n {\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }"
] | [
"0.7803838",
"0.70882094",
"0.64677894",
"0.64637214",
"0.6453238",
"0.6450293",
"0.64373654",
"0.63613033",
"0.6319849",
"0.6242815",
"0.6223127",
"0.61976165",
"0.61470884",
"0.6120226",
"0.61185527",
"0.61091924",
"0.60853636",
"0.60711145",
"0.6062443",
"0.6043631",
"0.6038246",
"0.6034471",
"0.6018704",
"0.6010929",
"0.5987158",
"0.59849256",
"0.5983498",
"0.5966086",
"0.59654367",
"0.5962784",
"0.5958551",
"0.5957523",
"0.59521425",
"0.5951147",
"0.59453815",
"0.59371907",
"0.59233326",
"0.59167504",
"0.59129286",
"0.5906785",
"0.5895788",
"0.5895788",
"0.5888586",
"0.5887537",
"0.58862394",
"0.5882051",
"0.5881714",
"0.5879321",
"0.5876133",
"0.5869753",
"0.5853319",
"0.58493984",
"0.5846457",
"0.58461106",
"0.58452976",
"0.5836964",
"0.58354914",
"0.5827878",
"0.58259803",
"0.5816713",
"0.5816077",
"0.5815739",
"0.58114296",
"0.5809514",
"0.57970077",
"0.57945204",
"0.579451",
"0.5793866",
"0.5791582",
"0.57880783",
"0.5787156",
"0.57852453",
"0.5783256",
"0.57819086",
"0.57793945",
"0.5774548",
"0.5774194",
"0.576589",
"0.57605815",
"0.57605815",
"0.57605815",
"0.57605815",
"0.5759588",
"0.5757896",
"0.5754789",
"0.57477534",
"0.5742597",
"0.5741142",
"0.5739718",
"0.5736301",
"0.5732672",
"0.5729423",
"0.57257414",
"0.572566",
"0.572566",
"0.572566",
"0.572566",
"0.572566",
"0.57240677",
"0.57184833"
] | 0.78949994 | 0 |
Tells if the site is currently locked | public function isSiteLocked() {
return file_exists($this->lockFlagPathAndFilename);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isLocked();",
"public function isLocked();",
"public function isLocked();",
"public function isLocked() {}",
"private function isLocked() {\n return true === $this->status->is_locked;\n }",
"public function checkLock() {\n\t\t$this->autoRender = false;\n\t\t\n\t\t$HttpSocket = new HttpSocket();\n\t\t$results = $HttpSocket->get('https://api.dropbox.com/1/search/auto/',\n\t\t\tarray(\n\t\t\t\t'query' => 'SystemIsLocked',\n\t\t\t\t'access_token' => 'YOUR_ACCESS_TOKEN'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(empty(json_decode($results->body))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function isLocked()\n {\n return isset($this->expires);\n }",
"public function isLocked() {\n return $this->lock->get('enable', false);\n }",
"public function is_locked(): bool {\n\t\t// TODO: Implement this.\n\t\treturn true;\n\t}",
"public function isLocked() {\n return $this->getStatus() === Status::LOCKED;\n }",
"public function isLocked()\r\n {\r\n return $this->locked;\r\n }",
"public function isLocked()\n {\n return $this->_state & self::LOCKED;\n }",
"public function isLocked()\n\t{\n\t\treturn $this->blnLocked;\n\t}",
"public function isLocked()\n {\n return $this->locked;\n }",
"public function isLocked()\n {\n return !!$this->special;\n }",
"public function isLocked()\n {\n return ! $this->isAccountNonLocked();\n }",
"public function isLocked()\n {\n $cache = \\System::getContainer()->get('contao.cache');\n\n if ($cache->contains('login-count')) {\n return intval($cache->fetch('login-count')) >= 3;\n }\n\n return false;\n }",
"public function isLocked()\n\t{\n\t\treturn $this->isLockedFeature();\n\t}",
"public function isAccountNonLocked(){\n return true;\n }",
"public function isLocked(): bool {\n\t\tif ($this->memberIsEmpty('pid') && $this->memberIsEmpty('server')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->_isLocked();\n\t}",
"public function isCurrentlyLoggedIn() {}",
"public function isLocked()\n {\n return $this->conn->exists('lock:' . $this->name);\n }",
"public function isAccountNonLocked()\r\n {\r\n return true;\r\n }",
"public function isLocked()\n {\n return $this->lockFile->exists();\n }",
"public function accountLocked()\n {\n return ($this->getFieldValue(self::FIELD_LOCKOUT_STATUS) !== null);\n }",
"public function isAccountNonLocked() : bool\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"private function _isLocked(): bool {\n\t\t// Each server is responsible for keeping locks clean.\n\t\t// Allow a hook to enable inter-server connection, later\n\t\tif (!$this->isMyServer()) {\n\t\t\treturn $this->application->hooks->callArguments(__CLASS__ . '::server_is_locked', [\n\t\t\t\t$this->memberInteger('server'), $this->pid,\n\t\t\t], true);\n\t\t}\n\t\tif ($this->isMyPID()) {\n\t\t\t// My process, so it's not locked\n\t\t\treturn false;\n\t\t}\n\t\t// Is the process running?\n\t\tif ($this->application->process->alive($this->pid)) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->application->logger->warning('Releasing lock from {server}:{pid} as process is dead', $this->members());\n\t\t$this->release();\n\t\treturn false;\n\t}",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"private function is_locked(){\n\t\t//return $batch_txt_file_object->exists();\n\t\treturn \"no\";\n\t\t\n\t}",
"public function isAccountNonLocked() {\n return true;\n }",
"function lock() {\n if (!authenticated()) {\n header('Location: ' . R . 'auth/?referer=' . $_SERVER['REQUEST_URI']);\n exit();\n }\n}",
"public function getLockStatus() {}",
"public function isLocked(string $name): bool;",
"private function lock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn file_put_contents($this -> lockfile, 'I am locked!') !== false;\n\t}",
"public function pageIsNotLockedForEditors() {}",
"public function hasLocktype(){\n return $this->_has(31);\n }",
"public function wasLockTimeout() {\n\t\treturn false;\n\t}",
"public static function isLockedFeature()\n\t{\n\t\tif (ModuleManager::isModuleInstalled('bitrix24'))\n\t\t{\n\t\t\t$checkFeature = Manager::checkFeature(\n\t\t\t\tManager::FEATURE_ENABLE_ALL_HOOKS,\n\t\t\t\t['hook' => 'headblock']\n\t\t\t);\n\t\t\tif ($checkFeature)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$dateCreate = \\Bitrix\\Main\\Config\\Option::get(\n\t\t\t\t'main', '~controller_date_create'\n\t\t\t);\n\t\t\t// for all portals early than 01.07.2019, feature are available\n\t\t\tif ($dateCreate < 1562000000)\n\t\t\t{\n\t\t\t\t// this option will be set after downgrade in bitrix24\n\t\t\t\treturn Manager::getOption('html_disabled', 'N') == 'Y';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function lockingEnabled()\n {\n return $this->lock === null ? true : $this->lock;\n }",
"public function is_logged_in() {\n\t\t\tif ($this->logged_in > 0) {\n\t\t\t\t$queue = Systask::find_incomplete();\n\t\t\t\tforeach ($queue as $task) {\n\t\t\t\t\t$now = strtotime(\"+1 hour\");\n\t\t\t\t\t$exec = strtotime($task->date_execute);\n\t\t\t\t\t\n\t\t\t\t\tif ($now > $exec) {\n\t\t\t\t\t\t$task->run();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn $this->logged_in;\n\t\t}",
"static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }",
"function cacheObjectLocked ()\n {\n return is_file($this->cacheObjectId.'.lock');\n }",
"public function isLoged() {\n\n\t\tif (is_null($this->getSession()))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function maybeLockouts() {\n\t\tdo_action( 'wd_before_lockout' );\n\t\t$settings = Settings::instance();\n\t\t$isTest = HTTP_Helper::retrieveGet( 'def-lockout-demo', false ) == 1;\n\t\tif ( $isTest ) {\n\t\t\t$message = null;\n\t\t\t$type = HTTP_Helper::retrieveGet( 'type' );\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'login':\n\t\t\t\t\t$message = $settings->login_protection_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '404':\n\t\t\t\t\t$message = $settings->detect_404_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'blacklist':\n\t\t\t\t\t$message = $settings->ip_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$message = __( \"Demo\", \"defender-security\" );\n\t\t\t}\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $message\n\t\t\t) );\n\t\t\tdie;\n\t\t}\n\t\t\n\t\t$ip = $this->getUserIp();\n\t\t$arr = $this->defaultWhiteListIps();\n\t\t$cache = WP_Helper::getCache();\n\t\t$temp_whitelist = $cache->get( 'staff_ips', [] );\n\t\tif ( $this->listenToStaffAccess() ) {\n\t\t\t//tmp whitelist this ip till the access end\n\t\t\t$temp_whitelist[] = $ip;\n\t\t\t$temp_whitelist = array_unique( $temp_whitelist );\n\t\t\t$temp_whitelist = array_filter( $temp_whitelist );\n\t\t\t$cache->set( 'staff_ips', $temp_whitelist, DAY_IN_SECONDS );\n\t\t\tUtils::instance()->log( sprintf( 'Temporary whitelist ip %s', $ip ), 'lockout' );\n\t\t}\n\t\t$arr = array_merge( $arr, $temp_whitelist );\n\t\t\n\t\tif ( in_array( $ip, $arr ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( $settings->isWhitelist( $ip ) ) {\n\t\t\treturn;\n\t\t} elseif ( $settings->isBlacklist( $ip ) ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} elseif ( $settings->isCountryBlacklist() ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} else {\n\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t//if current user can logged in, and no blacklisted we don't need to check the ip\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$model = IP_Model::findOne( array(\n\t\t\t\t'ip' => $ip\n\t\t\t) );\n\t\t\tif ( is_object( $model ) && $model->is_locked() ) {\n\t\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t\t}\n\t\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\t\theader( 'Cache-Control: private' );\n\t\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t\t'message' => $model->lockout_message\n\t\t\t\t) );\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}",
"function isActive(){\n\t\treturn $this->getSessionID() == $this->getUser()->getShift() && $this->getStatus() == '1' ? true : false;\n\t}",
"public function isAccountNonLocked()\r\n {\r\n return !($this->locked);\r\n }",
"function IsLocked($UserID)\n\t{\n\t\t$R=j::SQL(\"SELECT LockTimeout FROM jfp_xuser WHERE ID=?\",$UserID);\n\t\tif (!$R) return false;\n\t\treturn $R[0]['LockTimeout']>time();\n\t}",
"public function ingelogd() {\n\t\t\treturn $this->bLoggedIn;\n\t\t}",
"public function hasUnlock(){\n return $this->_has(3);\n }",
"public function isLocked()\n {\n if ($this->_isLocked !== null) {\n return $this->_isLocked;\n }\n\n $fp = $this->_getLockFile();\n if (flock($fp, LOCK_EX | LOCK_NB)) {\n flock($fp, LOCK_UN);\n return false;\n }\n\n //if the lock exists and exists for longer then 5minutes then remove lock & return false\n if($this->_lockIsExpired()){\n $varDir = Mage::getConfig()->getVarDir('locks');\n $lockFile = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';\n unlink($lockFile);\n\n $this->_getLockFile();//create new lock file\n return false;\n }\n\n return true;\n }",
"public function isOnline() {\n\t\tif ($this->lastActivityTime && $this->lastActivityTime > (TIME_NOW - USER_ONLINE_TIMEOUT) && (WCF::getUser()->userID == $this->userID || !$this->invisible || WCF::getUser()->getPermission('admin.general.canViewInvisible') || ($this->invisible == 2 && UserProfile::isBuddy($this->userID)))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function systemIsLocked($element, $user_id){\n\t\t\tif ($element){\n\t\t\t\t$oPage = $element->getObject();\n\t\t\t\t$lockTime = $oPage->getValue(\"locktime\");\n\t\t\t\t$lockUser = $oPage->getValue(\"lockuser\");\n\t\t\t\tif ($lockTime == null || $lockUser == null){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$lockDuration = regedit::getInstance()->getVal(\"//settings/lock_duration\");\n\t\t\t\tif (($lockTime->timestamp + $lockDuration) > time() && $lockUser!=$user_id){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\t$oPage->setValue(\"lockuser\", null);\n\t\t\t\t\t$oPage->setValue(\"locktime\", null);\n\t\t\t\t\t$oPage->commit();\n\t\t\t\t\t$element->commit();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"protected function _lockIsExpired()\n {\n $varDir = Mage::getConfig()->getVarDir('locks');\n $file = $varDir . DS . 'buckaroo_process_'.$this->getId().'.lock';\n\n if(!is_file($file)){\n $fp = fopen($file, 'x');\n fwrite($fp, date('r'));\n fclose($fp);\n return false;\n }\n\n\n $fiveMinAgo = time() - 300;//300\n $contents = file_get_contents($file);\n $time = strtotime($contents);\n $debug = 'current contents: '.$contents . \"\\n\"\n . 'contents in timestamp: '.$time . \"\\n\"\n . '5 minutes ago in timestamp: '.$fiveMinAgo;\n\n if($time <= $fiveMinAgo){\n $fp = fopen($file, 'w');\n flock($fp, LOCK_UN);\n return true;\n }\n\n return false;\n }",
"public function isAccountNonLocked()\n {\n return ! $this->locked;\n }",
"function getLocked() {\n\t\treturn $this->get(\"locked\");\n\t}",
"public static function checkLock()\n {\n $_lastExecutionTime = Mage::app()->loadCache(self::LOCK_CACHE_INDEX);\n if (self::HDU_LOCK_TIMEOUT > (time() - $_lastExecutionTime)) {\n return false;\n }\n Mage::app()->saveCache(time(), self::LOCK_CACHE_INDEX, array(), self::HDU_LOCK_TIMEOUT);\n return true;\n }",
"public function exitIfSiteLocked() {\n\t\tif ($this->isSiteLocked() === TRUE) {\n\t\t\t$this->doExit();\n\t\t}\n\t}",
"public function pageIsNotLockedForEditors()\n {\n return $this->getBackendUser()->isAdmin() || ($this->CALC_PERMS & Permission::PAGE_EDIT) === Permission::PAGE_EDIT && !$this->pageinfo['editlock'];\n }",
"function can_mod(): bool\n{\n\treturn session_status() === PHP_SESSION_ACTIVE &&\n\t\tarray_key_exists('can_mod', $_SESSION) &&\n\t\t$_SESSION['can_mod'] === true;\n}",
"public function isUnlocked()\n {\n return !$this->isLocked();\n }",
"public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }",
"public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }",
"function PageLock_ajax_checkpagelock($args)\n{\n $lockName = FormUtil::getPassedValue('lockname', null, 'post');\n\n $uname = pnUserGetVar('uname');\n\n $lockInfo = pnModAPIFunc('PageLock', 'user', 'requireLock',\n array('lockName' => $lockName,\n 'sessionId' => session_id(),\n 'lockedByTitle' => $uname,\n 'lockedByIPNo' => $_SERVER['REMOTE_ADDR']));\n\n if (!$lockInfo['hasLock'])\n $lockInfo['message'] = __('Error! Lock broken!');\n else\n $lockInfo['message'] = null;\n return $lockInfo;\n}",
"public function isBlocked()\n {\n if ($this->edit_id === 0) {\n return false;\n } else {\n if ($this->edit_time + 7200 > time()) {\n return true;\n } else {\n return false;\n }\n }\n }",
"public function getLocked()\r\n {\r\n return $this->locked;\r\n }",
"public function is_user_disabled() \n {\n $conn = $this->conn;\n $login = $this->login;\n \n $clogin = $conn->GetOne(\"SELECT login FROM users WHERE login = '\".$login.\"' AND expires > '\".gmdate('Y-m-d H:i:s').\"'\");\n \n if ($clogin == '') \n {\n $this->conn->Execute(\"UPDATE users SET enabled=0 WHERE login= '\".$login.\"'\");\n }\n \n $conf = $GLOBALS['CONF'];\n $lockout_duration = intval($conf->get_conf(\"unlock_user_interval\")) * 60; \n \n \n $params = array($login);\n $query = \"SELECT * FROM users WHERE login = ? AND enabled <= 0\";\n \n $rs = $conn->Execute($query, $params); \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return FALSE;\n }\n \n if (!$rs->EOF) \n {\n // User must be unlocked by admin\n if ($lockout_duration == 0 || $rs->fields['enabled'] == 0) \n { \n return TRUE; \n }\n \n //Auto-enable if account lockout duration expires\n if (time() - strtotime($rs->fields['last_logon_try']) >= $lockout_duration) \n {\n $conn->Execute('UPDATE users SET enabled = 1 WHERE login=?', $params);\n \n return FALSE;\n }\n \n return TRUE;\n }\n \n return FALSE;\n }",
"public function lockMayBeAvailable($name);",
"public function getLockStatus() {\n\t\treturn $this->getDriver()->isAcquired();\n\t}",
"private function isPaymentLocked()\n {\n return $this -> lock_payments;\n }",
"function wp_check_post_lock($post)\n {\n }",
"public static function may_restrict_by_site()\n {\n return 3 == lib::create( 'business\\session' )->get_role()->tier;\n }",
"public function is_currently_locked($proposal)\n {\n return wp_check_post_lock($proposal);\n }",
"function isRestricted() {\t\n\n\t\tif (isset($_SESSION['logged-in']) && $_SESSION['isAdmin']) {\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader(\"Location: restricted.php\");//Instant Re direct to Restricted due to lack of permissions.\n\t\t}\t\t\t\n\t}",
"public function isLocked($key)\n\t{\n\t\treturn $this->dbHandler->isLocked($key);\n\t}",
"function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }",
"public function contentIsNotLockedForEditors() {}",
"public function getIpLockIsDisabled() {}",
"public static function expired_user_has_access_to_this_page(){\n $auth = SwpmAuth::get_instance();\n \n //Check if the user is logged-into the site.\n if(!$auth->is_logged_in()){\n //Anonymous user. No access. No need to check anything else.\n return false;\n }\n \n //Check if account is expired.\n if (!$auth->is_expired_account()){\n //This users account is not expired. No need to check anything else.\n return false;\n }\n \n /*** We have a expired member. Lets check if he is viewing a page that is a core system used URL. ***/\n if (self::is_current_url_a_system_page()){ \n //Allow this expired user to view this post/page content since this is a core system page.\n return true;\n }\n \n //Not a system used page. So the expired user has no access to this page.\n return false;\n }",
"public function isOnline(): bool\n {\n return Cache::has('user-is-online-'.$this->id);\n }",
"public function contentIsNotLockedForEditors()\n {\n return $this->getBackendUser()->isAdmin() || ($this->CALC_PERMS & Permission::CONTENT_EDIT) === Permission::CONTENT_EDIT && !$this->pageinfo['editlock'];\n }",
"public function isBlocked()\n {\n if ($this->status == 2) {\n return true;\n } else {\n return false;\n }\n }",
"protected function isLoginInProgress() {}",
"public function enableLocked()\n\t{\n\t\t$this->_locked = true;\n\t}",
"public function isOnline(): bool\n {\n return Cache::has('user-is-online-' . $this->id);\n }",
"private function isLocked($lockName){\n $checkLock = \"SELECT IS_FREE_LOCK('$lockName')\";\n $result = $this->dbConnection->query($checkLock);\n $check = $result->fetch(PDO::FETCH_NUM);\n\n if ($check[0] == 0){\n //is locked\n return true;\n }\n else{\n //is not locked\n return false;\n }\n }",
"public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }",
"public function isLocked()\n {\n if (0 === $this->getIndexerId()) {\n Mage::throwException('FastIndexer: IndexerId cannot be 0');\n }\n\n if (null !== $this->_isLocked) {\n return $this->_isLocked;\n }\n $shmId = @shmop_open($this->getIndexerId(), 'a', self::PERM, self::LEN);\n if (false === $shmId) {\n $this->_isLocked = false;\n return $this->_isLocked;\n }\n $size = shmop_size($shmId);\n $startTime = shmop_read($shmId, 0, $size);\n shmop_close($shmId);\n\n $this->_isLocked = $this->_isLockedByTtl((double)$startTime);\n return $this->_isLocked;\n }",
"function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}",
"public function hasQuotaLock(){\n return $this->_has(11);\n }",
"public function isOnline() {}",
"public function lockSiteOrExit() {\n\t\ttouch($this->lockFlagPathAndFilename);\n\t\t$this->lockResource = fopen($this->lockPathAndFilename, 'w+');\n\t\tif (!flock($this->lockResource, LOCK_EX | LOCK_NB)) {\n\t\t\tfclose($this->lockResource);\n\t\t\t$this->doExit();\n\t\t}\n\t}",
"public function isBlockable()\n {\n if ($this->_hasVar('user_blockable')) {\n return (boolean) $this->_getVar('user_blockable');\n } else {\n return true;\n }\n }",
"public function IsLocked($lockname)\r\n\t{\r\n\t\t$sql\t\t = \"select Is_Used_Lock('$lockname')\";\r\n\t\t$islocked\t = $this->GetScalar($sql);\r\n\t\t$islocked\t = ($islocked != null);\r\n\t\treturn $islocked;\r\n\t}",
"private function _isLoggedIn() {\n \n if ( ! is_multisite() ) { \n if ( ! function_exists( 'is_user_logged_in' ) ) {\n include( ABSPATH . \"wp-includes/pluggable.php\" ); \n } \n return is_user_logged_in();\n }\n \n // For multi-sites\n return is_user_member_of_blog( get_current_user_id(), get_current_blog_id() );\n\n }"
] | [
"0.7734488",
"0.7734488",
"0.7734488",
"0.7718145",
"0.73412627",
"0.7235753",
"0.7131352",
"0.7097957",
"0.70707387",
"0.70191306",
"0.6960159",
"0.69568294",
"0.6947334",
"0.6936892",
"0.69143236",
"0.6891341",
"0.6873583",
"0.68654096",
"0.6654583",
"0.6627831",
"0.66158897",
"0.66040397",
"0.65936476",
"0.6557701",
"0.6546927",
"0.6526423",
"0.65197265",
"0.6509354",
"0.6502065",
"0.6502065",
"0.6502065",
"0.6502065",
"0.6502065",
"0.6502065",
"0.6424517",
"0.6368289",
"0.6352839",
"0.6279613",
"0.626448",
"0.6248745",
"0.6247712",
"0.6246241",
"0.6237138",
"0.6234579",
"0.6220517",
"0.62112266",
"0.619807",
"0.61822736",
"0.61773276",
"0.6148905",
"0.61297274",
"0.61273974",
"0.61079335",
"0.61049324",
"0.6098411",
"0.6092039",
"0.6085",
"0.60821706",
"0.6075164",
"0.60541004",
"0.6043829",
"0.60435736",
"0.6036783",
"0.60217005",
"0.6002806",
"0.60007477",
"0.5984091",
"0.5984091",
"0.59803545",
"0.5927833",
"0.59213066",
"0.59134877",
"0.59114957",
"0.5900243",
"0.58985263",
"0.58802116",
"0.586797",
"0.58654547",
"0.5853991",
"0.58534354",
"0.58526045",
"0.5847973",
"0.5841367",
"0.58401877",
"0.5837907",
"0.5828942",
"0.58265185",
"0.58189493",
"0.5806672",
"0.5806537",
"0.5802425",
"0.57872665",
"0.5784067",
"0.5758349",
"0.5750141",
"0.5749507",
"0.5742362",
"0.57305384",
"0.5729961",
"0.57289344"
] | 0.7629369 | 4 |
Exits if the site is currently locked | public function exitIfSiteLocked() {
if ($this->isSiteLocked() === TRUE) {
$this->doExit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function doExit() {\n\t\tif (FLOW_SAPITYPE === 'Web') {\n\t\t\theader('HTTP/1.1 503 Service Temporarily Unavailable');\n\t\t\treadfile(FLOW_PATH_FLOW . 'Resources/Private/Core/LockHoldingStackPage.html');\n\t\t} else {\n\t\t\t$expiresIn = abs((time() - self::LOCKFILE_MAXIMUM_AGE - filemtime($this->lockFlagPathAndFilename)));\n\t\t\techo 'Site is currently locked, exiting.' . PHP_EOL . 'The current lock will expire after ' . $expiresIn . ' seconds.' . PHP_EOL;\n\t\t}\n\t\texit(1);\n\t}",
"public function lockSiteOrExit() {\n\t\ttouch($this->lockFlagPathAndFilename);\n\t\t$this->lockResource = fopen($this->lockPathAndFilename, 'w+');\n\t\tif (!flock($this->lockResource, LOCK_EX | LOCK_NB)) {\n\t\t\tfclose($this->lockResource);\n\t\t\t$this->doExit();\n\t\t}\n\t}",
"function lock() {\n if (!authenticated()) {\n header('Location: ' . R . 'auth/?referer=' . $_SERVER['REQUEST_URI']);\n exit();\n }\n}",
"public function interruptLogin();",
"public function unlockSite() {\n\t\tif (is_resource($this->lockResource)) {\n\t\t\tflock($this->lockResource, LOCK_UN);\n\t\t\tfclose($this->lockResource);\n\t\t}\n\t\t@unlink($this->lockFlagPathAndFilename);\n\t}",
"public function isSiteLocked() {\n\t\treturn file_exists($this->lockFlagPathAndFilename);\n\t}",
"public function unlock() {\n }",
"public function isLocked() {}",
"public function unlock()\r\n {\r\n frameEbbs::_()->getModule('backup')->unlock();\r\n }",
"protected function unlock_session() {\n \\core\\session\\manager::write_close();\n ignore_user_abort(true);\n }",
"private function unlock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\tunlink($this -> lockfile);\n\t\t}\n\t}",
"public function isLocked();",
"public function isLocked();",
"public function isLocked();",
"public function maybeLockouts() {\n\t\tdo_action( 'wd_before_lockout' );\n\t\t$settings = Settings::instance();\n\t\t$isTest = HTTP_Helper::retrieveGet( 'def-lockout-demo', false ) == 1;\n\t\tif ( $isTest ) {\n\t\t\t$message = null;\n\t\t\t$type = HTTP_Helper::retrieveGet( 'type' );\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'login':\n\t\t\t\t\t$message = $settings->login_protection_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '404':\n\t\t\t\t\t$message = $settings->detect_404_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'blacklist':\n\t\t\t\t\t$message = $settings->ip_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$message = __( \"Demo\", \"defender-security\" );\n\t\t\t}\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $message\n\t\t\t) );\n\t\t\tdie;\n\t\t}\n\t\t\n\t\t$ip = $this->getUserIp();\n\t\t$arr = $this->defaultWhiteListIps();\n\t\t$cache = WP_Helper::getCache();\n\t\t$temp_whitelist = $cache->get( 'staff_ips', [] );\n\t\tif ( $this->listenToStaffAccess() ) {\n\t\t\t//tmp whitelist this ip till the access end\n\t\t\t$temp_whitelist[] = $ip;\n\t\t\t$temp_whitelist = array_unique( $temp_whitelist );\n\t\t\t$temp_whitelist = array_filter( $temp_whitelist );\n\t\t\t$cache->set( 'staff_ips', $temp_whitelist, DAY_IN_SECONDS );\n\t\t\tUtils::instance()->log( sprintf( 'Temporary whitelist ip %s', $ip ), 'lockout' );\n\t\t}\n\t\t$arr = array_merge( $arr, $temp_whitelist );\n\t\t\n\t\tif ( in_array( $ip, $arr ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( $settings->isWhitelist( $ip ) ) {\n\t\t\treturn;\n\t\t} elseif ( $settings->isBlacklist( $ip ) ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} elseif ( $settings->isCountryBlacklist() ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} else {\n\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t//if current user can logged in, and no blacklisted we don't need to check the ip\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$model = IP_Model::findOne( array(\n\t\t\t\t'ip' => $ip\n\t\t\t) );\n\t\t\tif ( is_object( $model ) && $model->is_locked() ) {\n\t\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t\t}\n\t\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\t\theader( 'Cache-Control: private' );\n\t\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t\t'message' => $model->lockout_message\n\t\t\t\t) );\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}",
"public function isLoged() {\n\n\t\tif (is_null($this->getSession()))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"private function _isLocked(): bool {\n\t\t// Each server is responsible for keeping locks clean.\n\t\t// Allow a hook to enable inter-server connection, later\n\t\tif (!$this->isMyServer()) {\n\t\t\treturn $this->application->hooks->callArguments(__CLASS__ . '::server_is_locked', [\n\t\t\t\t$this->memberInteger('server'), $this->pid,\n\t\t\t], true);\n\t\t}\n\t\tif ($this->isMyPID()) {\n\t\t\t// My process, so it's not locked\n\t\t\treturn false;\n\t\t}\n\t\t// Is the process running?\n\t\tif ($this->application->process->alive($this->pid)) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->application->logger->warning('Releasing lock from {server}:{pid} as process is dead', $this->members());\n\t\t$this->release();\n\t\treturn false;\n\t}",
"public function ifNotConnected() : void\n {\n if( !isset($_SESSION['_userStart']) )\n {\n header('Location:/vue/user/signin.php');\n die();\n }\n }",
"public function unlock(): void;",
"function stop ()\n{\n file_put_contents(config::CLIENT_BASE_DIR . '/act', 'idle');\n die();\n}",
"function health_check_troubleshooter_mode_logout() {\n\t\tif ( ! $this->is_troubleshooting() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isset( $_COOKIE['wp-health-check-disable-plugins'] ) ) {\n\t\t\t$this->disable_troubleshooting_mode();\n\t\t}\n\t}",
"public function pageIsNotLockedForEditors() {}",
"private function waitForUnlocking()\n\t{\n\t\t$times = self::LOCK_TTL;\n\t\t$i = 0;\n\t\twhile ($this->isExecutionLocked() && $i < $times)\n\t\t{\n\t\t\tsleep(1);\n\t\t\t$i++;\n\t\t}\n\t}",
"function userLogOut() {\n try {\n delete_key();\n return 1;\n } catch (Exception $ex) {\n return 0;\n }\n }",
"function wsod_sess_close() {\n $_GET['debug'] ? unregister_tick_function('wsod_tick') : NULL; // DEBUG_OFF\n $_GET['debug'] ? print wsod_tick(TRUE) : NULL; // DEBUG_PRINT\n\n $is_emergency = (strpos($_SERVER['SCRIPT_FILENAME'], 'emergency.php') !== FALSE);\n wsod_check_wsod(TRUE, $is_emergency, $is_emergency, $is_emergency);\n return TRUE;\n}",
"public function isAccountNonLocked()\r\n {\r\n return true;\r\n }",
"public function shutDown() {\n\t\techo \"Permission has not been given.<br>\";\n\t}",
"public function no_wp_login() {\n\t\twp_redirect(home_url());\n\t\texit;\n\t}",
"public function isLocked()\n {\n return isset($this->expires);\n }",
"public function logoff() {}",
"public function logoff() {}",
"public function logoff() {}",
"private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked()\n {\n return true;\n }",
"function isLoggedIn(){\nreturn false;\n}",
"public function isAccountNonLocked()\n {\n return true;\n }",
"public function isAccountNonLocked(){\n return true;\n }",
"public function logoff();",
"public function hideActiveLogin() {}",
"public function restricted()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n if (isset($_SESSION['type']))\n $site->printNav($_SESSION['type']);\n echo \"You are not allowed to access this resource. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n\n }",
"public function logOff();",
"function isGuestLoginAvailable()\n{\n\treturn false;\n}",
"public static function disablePage(){\n if (isset($_SESSION['name']) and !isset($_SESSION['name']))\n {\n header('location: ../load/index.php');\n }\n }",
"public function isAccountNonLocked() {\n return true;\n }",
"public function Logoff();",
"public function lock()\r\n {\r\n frameEbbs::_()->getModule('backup')->lock();\r\n }",
"function cera_grimlock_after_site() {\n\t\tdo_action( 'grimlock_back_to_top_button' );\n\t}",
"public function checkLock() {\n\t\t$this->autoRender = false;\n\t\t\n\t\t$HttpSocket = new HttpSocket();\n\t\t$results = $HttpSocket->get('https://api.dropbox.com/1/search/auto/',\n\t\t\tarray(\n\t\t\t\t'query' => 'SystemIsLocked',\n\t\t\t\t'access_token' => 'YOUR_ACCESS_TOKEN'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(empty(json_decode($results->body))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"function om13_wait_for_going_live() {\n\tif (time() < 1365447600 && !is_user_logged_in()) {\n\t\twp_die('Die Website der #om13 ist demnächst verfügbar. Bei Fragen kannst du gern den Twitteraccount <a href=\"https://twitter.com/openmindkonf\">@openmindkonf</a> kontaktieren. Wir freuen uns auf dich!'); // TODO: __\n\t}\n}",
"function exitAllowedOn()\n\t{\n\t\t$this->bExitAllowed = true;\n\t}",
"public function abort() : bool\n {\n if ($this->isActive()) {\n $aborted = \\session_abort();\n }\n return $aborted ?? true;\n }",
"function startSessionLoged() {\n $this->session->set_ini(); //call ini_set. must be called in every script cause it doesnt remain!\n $this->session->regenerate(); //regenerate the session id\n $this->session->generateTokenId($this->connection,$this->user->getUsrID()); //return the tokenId \n $this->session->initiate($this->user->getKeepMeLogged()); //set values for ip, agent... confirmation\n $this->session->initiateToken($this->session->getToken(), $this->user->getUsrID());\n $this->session->setExpiration(); //set the expiration of idle session\n $this->session->setCookie(); //secure the session cookie\n $this->session->wClose();\n\n }",
"public function invalidateCurrentLogin();",
"public function deactivate()\n {\n if (Manager::getInstance()->isPluginActivated('Login') == false) {\n Manager::getInstance()->activatePlugin('Login');\n }\n }",
"function session_abort()\n{\n}",
"function _access_denied_splash()\n {\n }",
"public function logout()\r\n\t{\r\n\t\tif(!$this->loggedIn()) return;\r\n\t\t$query = 'UPDATE users SET fingerprint=NULL WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query);\r\n\t\tsetcookie('qw_login', '', time()-60*60*24, '/');\r\n\t\tsetcookie('tree_grid_cookie', '', time()-60*60*24, '/');\r\n\t\t$this->user = false;\r\n\t}",
"function guard() {\n\n\t$isValid = true;\n\t$inactive = 60*10; // 10 mins\n\t$fingerprint = md5( $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] );\n\n\tif( ( isset( $_SESSION['fingerprint'] ) && $_SESSION['fingerprint'] != $fingerprint ) ) {\n\n\t\t$isValid = false;\n\t\tsignout();\n\n\t}else if ( ( isset( $_SESSION['last_active'] ) && ( time() - $_SESSION['last_active'] ) > $inactive ) && $_SESSION['username'] ) {\n\n\t\t$isValid = false;\n\t\tsignout();\n\n\t}else {\n\n\t\t$_SESSION['last_active'] = time();\n\n\t}\n\n\treturn $isValid;\n\n}",
"private function exitLogin(){\n\t\tSeguridad::cerrarSesion();\n\t\theader('Location: index.php');\n\t}",
"public function isLocked()\n {\n $cache = \\System::getContainer()->get('contao.cache');\n\n if ($cache->contains('login-count')) {\n return intval($cache->fetch('login-count')) >= 3;\n }\n\n return false;\n }",
"function lockout($username = \"\") {\n\t\tglobal $wpdb;\n\n\t\t$ip = $this->get_user_ip();;\n\n\t\t$username = sanitize_user($username);\n\n\t\t$user = get_user_by( 'login', $username );\n\n\t\tif ( !$user ) { \n\t\t\t$user = new stdClass();\n\t\t\t$user->ID = 0;\n\t\t}\n\n\t\t$sql = \"insert into \" . $this->lock_table . \" (user_id, lockdown_date, release_date, lockdown_IP) \" .\n\t\t\t \"values ('\" . $user->ID . \"', NOW(), date_add( NOW(), interval \" .\n\t\t\t $this->ll_options['lockout_length'] . \" MINUTE), '\" . $wpdb->escape($ip) . \"')\";\n\n\t\t$wpdb->query($sql);\n\n\t\tif ( 'yes' == $this->ll_options['notify_admins'] )\n\t\t\t$this->ll_notify_admins( $ip, $username );\n\n\t}",
"public function AutoTimeOut($inactiveTimeLimit=1200,$landingPage=''){\n //session_start();\n \n //$path=$_SERVER['DOCUMENT_ROOT'];\n //$path=$_SERVER['PHP_SELF'];\n // set timeout period in seconds\n $inactive = $inactiveTimeLimit;\n $logoutPg=$landingPage;\n \n // check to see if $_SESSION['timeout'] is set\n if(isset($_SESSION['timeout']) ) {\n $session_life = time() - $_SESSION['timeout'];\n if($session_life > $inactive)\n { \n //session_destroy(); header(\"Location: {$path}/{$logoutPg}\"); \n // session_destroy(); header(\"Location: {$logoutPg}\"); \n $timeouter=new AuthorizationAndConf(); \n $timeouter->logout($logoutPg,true);\n\n }\n }\n $_SESSION['timeout'] = time(); \n }",
"function exitAllowedOff()\n\t{\n\t\t$this->bExitAllowed = false;\n\t}",
"public function isAccountNonLocked() : bool\n {\n return true;\n }",
"function logOutOnTimeout() {\n\t\tglobal $POSHWEBROOT;\n\t\t\n\t\tLogger::logAction(Logger::LOGOUT_ACTION, array('msg'=>'session was too old'));\n\t\t\n\t\tsession_destroy();\n \tsession_unset();\n\n \theader('Location: ' . $POSHWEBROOT . '/portal/login.php?message=' . lg(\"lblYouHaveBeenDisconnected\", round($IDLE_MAXTIMEOUT/60)));\n\t}",
"public function resume() {\n \n if (!isset($_COOKIE) || !\\array_key_exists($this->name, $_COOKIE)) {\n\n //coookie prob expired\n $this->forget();\n return false;\n }\n\n\n\n if (!$this->sessionStarted()) {\n\n if (\\session_start()) {\n $this->refresh();\n }\n }\n if (!$this->isFingerprint()) { //UA doesnt match\n $this->forget();\n return false;\n }\n\n return true;\n }",
"public function _logout()\n {\n $this->_login( self::getGuestID() );\n }",
"public function block()\n {\n $blocker = Yii::$app->cache->get('login_blocker_' . $this->getIp());\n \n if ($blocker === false) {\n $blocker = [1, time(), 0];\n } else { \n $blocker[0]++;\n \n if ($blocker[0] == $this->wrong_login_number) {\n $blocker[1] = time() + $this->time; \n }\n }\n \n Yii::$app->cache->set('login_blocker_' . $this->getIp(), $blocker, $this->time);\n\n return true;\n }",
"public function clear_wider_cookie() {\n\t\tglobal $phpbbForum, $config;\n\t\t\n\t\tif($this->is_working()) {\n\t\t\t\n\t\t\t// Do this even for unintegrated users -- it must be cleared if set\n\t\t\t$fStateChanged = $phpbbForum->foreground();\n\t\t\t$domain = $config['cookie_domain'];\n\t\t\t$path = $config['cookie_path'];\n\t\t\t$phpbbForum->restore_state($fStateChanged);\n\t\t\n\t\t\tsetcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, $path, $domain);\n\t\t}\n\t\t\n\t}",
"function expiredSession(){\n\t$inactive =3600; // could be any value the admin wants.\n\tif(isset($_SESSION['created'])){\n\t\tif(time() - $_SESSION['created'] > $inactive){\n\t\t\tsession_destroy();\n\t\t\theader(\"Location: errormsg.php?message=session_expired\");\t\n\t\t}\n\t\t\n\t}\n\n}",
"function close () {\n\n # create database object if not create\n self::_connect();\n\n $this->link->direct('SELECT RELEASE_LOCK(\"'.$this->session_lock.'\")');\n\n return TRUE;\n }",
"public function stop() {\r\n\t\tif ($this->hasSession()) {\r\n\t\t\t$sessionId = self::getSessionId();\r\n\t\t\tself::session($sessionId);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function maybeHandle()\n {\n // Don't lock up other requests while processing\n session_write_close();\n\n if (! \\wp_check_password($this->pointer, $_REQUEST['token'])) {\n \\wp_die('-1');\n }\n\n $this->handle();\n\n \\wp_die('Done');\n }",
"public function isUnlocked()\n {\n return !$this->isLocked();\n }",
"private function lock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn file_put_contents($this -> lockfile, 'I am locked!') !== false;\n\t}",
"public static function is_expired()\n { \n $conf = $GLOBALS['CONF'];\n \n if (!$conf)\n { \n $conf = new Ossim_conf();\n $GLOBALS['CONF'] = $conf;\n }\n \n $expired_timeout = intval($conf->get_conf('session_timeout')) * 60;\n \n if ($expired_timeout != 0)\n { \n $time = gmdate('U');\n \n if (isset($_SESSION['_expiration_time']) && intval($_SESSION['_expiration_time']) + $expired_timeout < $time) \n {\n $ossim_link = $conf->get_conf('ossim_link');\n $login_location = preg_replace(\"/(\\/)+/\",\"/\",$ossim_link . '/session/login.php?action=logout'); \n \n header(\"Location: $login_location\");\n }\n \n //Only update if not exists bypass => header ajax responses\n if (intval(GET('bypassexpirationupdate')) != 1 && intval(POST('bypassexpirationupdate')) != 1) \n {\n $_SESSION['_expiration_time'] = $time;\n \n Session_activity::update($_SESSION['_expiration_time']);\n }\n }\n }",
"function notlogout()\n {\n \tif(!isset($_SESSION[\"AdminID\"]))\n \t{\n \t\theader(\"location:index.php\");\n \t}\n }",
"function cera_grimlock_page() {\n\t\tdo_action( 'grimlock_page' );\n\t}",
"public function must_be_logged_in()\n {\n Session::_start();\n if(!isset($_SESSION['user']))\n {\n Session::_destroy();\n header('location: ' . URL_WITH_INDEX_FILE . 'login/index');\n exit();\n }\n }",
"public function logout()\n\t\t{\n\t\tif (!$this->checkSession()) return false;\n\t\t$res=$this->get(\"http://m.linkedin.com/session/logout\",true);\n\t\t$this->debugRequest();\n\t\t$this->resetDebugger();\n\t\t$this->stopPlugin();\n\t\treturn true;\t\n\t\t}",
"private function preventSessionHijack() {\n if (isset($_SESSION[\"browser\"]) && isset($_SESSION[\\model\\UserModel::$sessionUser]) && $_SESSION[\\model\\UserModel::$sessionUser][\\model\\UserModel::$userLoggedIn]) {\n $this->user = new \\model\\UserModel($_SESSION[\\model\\UserModel::$sessionUser][\\model\\UserModel::$userName]);\n if ($_SESSION[\"browser\"] !== $_SERVER['HTTP_USER_AGENT']) {\n $this->user->logout();\n $this->loginView->deleteCookies();\n }\n }\n }",
"public function is_locked(): bool {\n\t\t// TODO: Implement this.\n\t\treturn true;\n\t}",
"public function accountLocked()\n {\n return ($this->getFieldValue(self::FIELD_LOCKOUT_STATUS) !== null);\n }",
"function exec_kickout_if_timeout(){\t\r\n if(!(isset($_SESSION['timeout']))){\r\n //echo \"setting time ~~~~~~~~~~~~~</ br>\";\r\n $_SESSION['timeout'] = time();\r\n }\r\n //set delay time,secs\r\n else{\r\n $delay=dev_delay();\r\n if ($_SESSION['timeout'] + $delay < time()) {\r\n $_SESSION = array();\r\n session_destroy();\r\n //return a little feeedback message\r\n //echo \"<div class='alert alert-success' role='alert'>由于长时间未操作,您已退出系统,请重新登录!</div>\";\r\n\r\n header(\"Location:login.php?timeout&redirect_to=\" . urlencode($_SERVER['REQUEST_URI']));\r\n die();\r\n \r\n } else {\r\n $cha=time()-$_SESSION['timeout'];\r\n $cha_div=$cha / 60 ;\r\n $delay_min=$delay / 60;\r\n echo '\r\n <script type=\"text/javascript\">console.log(\"您距离上一次操作相差'.$cha.'秒,即'.$cha_div.' 分钟,超过'.$delay_min.'分钟会强制退出!\")</script> \r\n ';\r\n $_SESSION['timeout'] = time();\r\n // session ok\r\n }\r\n }\r\n}",
"function _shutdown()\n {\n $curr_time = time();\n\n if (!isset($_SESSION['__sessionhandler']) ||\n ($curr_time >= $_SESSION['__sessionhandler'])) {\n\n $_SESSION['__sessionhandler'] = $curr_time + (ini_get('session.gc_maxlifetime') / 2);\n $this->_force = true;\n }\n }",
"protected function _lockIsExpired()\n {\n $varDir = Mage::getConfig()->getVarDir('locks');\n $file = $varDir . DS . 'buckaroo_process_'.$this->getId().'.lock';\n\n if(!is_file($file)){\n $fp = fopen($file, 'x');\n fwrite($fp, date('r'));\n fclose($fp);\n return false;\n }\n\n\n $fiveMinAgo = time() - 300;//300\n $contents = file_get_contents($file);\n $time = strtotime($contents);\n $debug = 'current contents: '.$contents . \"\\n\"\n . 'contents in timestamp: '.$time . \"\\n\"\n . '5 minutes ago in timestamp: '.$fiveMinAgo;\n\n if($time <= $fiveMinAgo){\n $fp = fopen($file, 'w');\n flock($fp, LOCK_UN);\n return true;\n }\n\n return false;\n }",
"public function isLocked()\n {\n return ! $this->isAccountNonLocked();\n }",
"public function halt();",
"function loggedinonly()\n{\n global $CURUSER;\n if (!$CURUSER) {\n header(\"Refresh: 0; url=\".TTURL.\"/account/login\");\n exit();\n }\n}",
"function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}"
] | [
"0.7518456",
"0.6500489",
"0.6442265",
"0.63166636",
"0.6300901",
"0.6286986",
"0.62186277",
"0.6215603",
"0.6161106",
"0.611809",
"0.6110722",
"0.6059644",
"0.6059644",
"0.6059644",
"0.60594964",
"0.5909938",
"0.5908488",
"0.5908488",
"0.5908488",
"0.5908488",
"0.5908488",
"0.58921266",
"0.58682686",
"0.58401823",
"0.5817247",
"0.57875043",
"0.57543284",
"0.5733839",
"0.5721633",
"0.5719448",
"0.5692388",
"0.5669834",
"0.5656481",
"0.5646563",
"0.564108",
"0.56403863",
"0.56392807",
"0.562254",
"0.5617918",
"0.5617918",
"0.5617918",
"0.5617918",
"0.5617918",
"0.5617918",
"0.5617851",
"0.5611449",
"0.5587817",
"0.5587185",
"0.55727625",
"0.55526334",
"0.5544424",
"0.553836",
"0.55380934",
"0.5512155",
"0.55108154",
"0.5506902",
"0.5505324",
"0.5502482",
"0.54967237",
"0.54845977",
"0.54824394",
"0.5475016",
"0.54735076",
"0.54648405",
"0.54574984",
"0.5456848",
"0.5456697",
"0.5451411",
"0.54385227",
"0.54384166",
"0.5430727",
"0.54176444",
"0.5404365",
"0.54040515",
"0.5403206",
"0.5400427",
"0.539757",
"0.53970766",
"0.5383231",
"0.5381229",
"0.5377555",
"0.53663063",
"0.53647447",
"0.53634745",
"0.53569347",
"0.5335135",
"0.5334443",
"0.53299415",
"0.5325855",
"0.5324648",
"0.53198916",
"0.53191507",
"0.53156596",
"0.53144866",
"0.5312393",
"0.53066796",
"0.53045964",
"0.52982354",
"0.52942353",
"0.5282132"
] | 0.7781014 | 0 |
Locks the site for further requests. | public function lockSiteOrExit() {
touch($this->lockFlagPathAndFilename);
$this->lockResource = fopen($this->lockPathAndFilename, 'w+');
if (!flock($this->lockResource, LOCK_EX | LOCK_NB)) {
fclose($this->lockResource);
$this->doExit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function lock() {\n if (!authenticated()) {\n header('Location: ' . R . 'auth/?referer=' . $_SERVER['REQUEST_URI']);\n exit();\n }\n}",
"public function lock() {}",
"public function lock()\n {\n $this->lock = true;\n }",
"public function lock()\n {\n $this->locked = true;\n }",
"public function lock()\n {\n $this->isLocked = true;\n }",
"function lock()\n{\n}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lockAndBlock()\n {\n $this->lock();\n }",
"public function lock(): void;",
"public function lock()\r\n {\r\n frameEbbs::_()->getModule('backup')->lock();\r\n }",
"private function lockConcurrentExecution()\n\t{\n\t\t$tag = $this->getLockTag();\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($tag);\n\t\t$managedCache->read(self::LOCK_TTL, $tag);\n\t\t$managedCache->setImmediate($tag, true);\n\t}",
"public function lock()\n\t{\n\t\t$this->immutable = true;\n\t}",
"protected function lock()\n {\n $this->isStateLocked = true;\n }",
"public function trylock() {}",
"public function lockToNormal() {}",
"abstract protected function lock(): void;",
"private function lockLink()\n {\n return $this->model->action('link','lock',\n array('job' => 'lock',\n 'id_link' => (int)$_REQUEST['id_link'],\n 'by_id_user' => (int)$this->viewVar['loggedUserId']) ); \n }",
"function lock(Sabre_DAV_Locks_LockInfo $lockInfo);",
"function lock() {\n global $_Query_lock_depth;\n if ($_Query_lock_depth < 0) {\n Fatal::internalError('Negative lock depth');\n }\n if ($_Query_lock_depth == 0) {\n $row = $this->select1($this->mkSQL('select get_lock(%Q, %N) as locked',\n OBIB_LOCK_NAME, OBIB_LOCK_TIMEOUT));\n if (!isset($row['locked']) or $row['locked'] != 1) {\n Fatal::cantLock();\n }\n }\n $_Query_lock_depth++;\n }",
"public function lock()\n {\n $shmId = shmop_open($this->getIndexerId(), 'c', self::PERM, self::LEN);\n shmop_write($shmId, $this->_getMicrotimeString(), 0);\n shmop_close($shmId);\n $this->_isLocked = true;\n }",
"public function lock()\n {\n return view('pages.example_pages.lock');\n }",
"protected function locking()\n {\n foreach ($this->all() as $name => $element) {\n $element->lock();\n }\n }",
"function lock_sqlite3_access() {\n\tglobal $DB;\n\n\tsem_acquire($DB['SEM_ID']);\n}",
"function cera_grimlock_before_site() {\n\t\tdo_action( 'grimlock_loader' );\n\t\tdo_action( 'grimlock_vertical_navigation' );\n\t}",
"public function lockAction() {\n $id = $this->getRequest()->getParam('id');\n $mid = $this->getRequest()->getParam('mid');\n $data = $this->model->lockContent($id);\n $this->redirect('materialcontent/index/id/' . $mid);\n }",
"static function lock($path, $handler)\r\n {\r\n Route::route(\"LOCK\", $path, $handler);\r\n }",
"public function lock_cp()\n\t{\n\t\tif (ee()->session->userdata('admin_sess') == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->db->set('admin_sess', 0)\n\t\t\t->where('session_id', $this->userdata['session_id'])\n\t\t\t->update('sessions');\n\t}",
"public function acquireSharedLock() {}",
"public function enableLocked()\n\t{\n\t\t$this->_locked = true;\n\t}",
"function cera_grimlock_page() {\n\t\tdo_action( 'grimlock_page' );\n\t}",
"public function acquire() {}",
"public function lock_get()\n\t{\n\t\ttry{\n\n\t\t\t$this->checkCanCandidateId();\n\t\t\t$id = $this->getParameterId();\n\t\t\t$code = 0;\n \n $filters = array(\n \"id\" => $id,\n \"{$this->_candidateIdFkKey}\" =>$this->getCanCandidateId()\n );\n \n\t\t\t// if Lock flag is ON\n\t\t\t// Get object by normal way\n\t\t\t// and check is that the object locked by their-self or another\n\t\t\tif ($this->_model->getLockFlag() == LOCK_FLAG_ON){\n\t\t\t\t\n $objects = $this->_model->getBy($filters);\n if (count($objects)==0){\n throw new Exception ('対象が存在していません。', REST_ER_PAGE_NOTFOUND);\n }\n \n\t\t\t\t//if the current object locked equal this id then this object locked by their self s\n\t\t\t\tif ($id != $this->getCurrentObjectId()){\n\t\t\t\t\t// The object locked by another\n\t\t\t\t\t$code = REST_RESPOND_CANNOT_LOCK;\n\t\t\t\t}\n\t\t\t\t$data = array();\n\t\t\t\tif (count($objects)>0)\n\t\t\t\t\t$data = $objects[0];\n\t\t\t}else {\n $objects = $this->_model->getBy($filters);\n if (count($objects)==0){\n throw new Exception ('対象が存在していません。', REST_ER_PAGE_NOTFOUND);\n }\n \n\t\t\t\t// if the lock flag is off\n\t\t\t\t// get and lock this object\n\t\t\t\t$result = $this->_model->getByIdAndLock($id);\n\t\t\t\tif ($result['transStatus']){\n\t\t\t\t\t// set the current locked object id\n\t\t\t\t\t$this->setCurrentObjectId($id);\n\t\t\t\t}else {\n\t\t\t\t\tthrow new Exception('ロック処理に失敗しました。', REST_ER_TRANSACTION_ERROR);\n\t\t\t\t}\n\t\t\t\t$data = $result['data'];\n\n\t\t\t}\n\t\t\t$respond = array(\n\t\t\t\t'code' => $code,\n\t\t\t\t'datetime'=> date('Y-m-d H:i:s', time()),\n\t\t\t\t'data' => $data\n\t\t\t);\n\t\t\t$this->response($respond);\n\t\t}catch( Exception $e ){\n\t\t\t$message = $e->getMessage();\n\t\t\t$code = $e->getCode();\n\t\t\t$this->error_response($message,$code);\n\t\t}\n\n\t}",
"public function lock()\n {\n $this->lock = TRUE;\n return $this;\n\n }",
"public function lock()\n {\n if ( !($this->_state & self::LOADED) ) {\n $this->_memManager->load($this, $this->_id);\n $this->_state |= self::LOADED;\n }\n\n $this->_state |= self::LOCKED;\n\n /**\n * @todo\n * It's possible to set \"value\" container attribute to avoid modification tracing, while it's locked\n * Check, if it's more effective\n */\n }",
"function cera_grimlock_single() {\n\t\tdo_action( 'grimlock_single' );\n\t}",
"protected function ipLockClause() {}",
"private function lock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn file_put_contents($this -> lockfile, 'I am locked!') !== false;\n\t}",
"public function lock_read() {}",
"function _acquireLock ()\n {\n $this->_enterSection('_acquireLock');\n \n $a = strcspn ($this->_options['dsn'], ':');\n $proto = substr ($this->_options['dsn'], 0, $a);\n $path = substr ($this->_options['dsn'], $a + 3);\n\n if ($proto == 'file') {\n $f = sprintf($path, $this->_indexName);\n $this->_indexFileRes = fopen ($f,'w');\n flock ($this->_indexFileRes, LOCK_EX);\n }\n \n $this->_leaveSection('_acquireLock');\n }",
"function wp_refresh_post_lock($response, $data, $screen_id)\n {\n }",
"public function unlockSite() {\n\t\tif (is_resource($this->lockResource)) {\n\t\t\tflock($this->lockResource, LOCK_UN);\n\t\t\tfclose($this->lockResource);\n\t\t}\n\t\t@unlink($this->lockFlagPathAndFilename);\n\t}",
"protected function lock($app, $env)\n {\n $this->getFilesystem()->touch($this->getLockFile($app, $env));\n\n // change mode so the web user can remove it if we die\n $this->getFilesystem()->chmod($this->getLockFile($app, $env), 0777);\n }",
"public function acquireExclusiveLock() {}",
"public function lock()\r\n {\r\n $this->locked = true;\r\n\r\n return $this;\r\n }",
"function release_token(){\n if(!isset($_GET[$this->name])) {\n header(\"Status: 302 Moved Temporarily\");\n $this->get_id($sid);\n header(\"Location: http://\".$_SERVER['HTTP_HOST'].$this->self_url());\n exit;\n } \n }",
"public function lockPayments()\n {\n $this -> lock_payments = true;\n $this -> save();\n }",
"public function isSiteLocked() {\n\t\treturn file_exists($this->lockFlagPathAndFilename);\n\t}",
"function Lock($UserID)\n\t{\n\t\tj::SQL(\"UPDATE jfp_xuser SET LockTimeout=? , FailedLoginAttempts=0 WHERE ID=? LIMIT 1\",time()+$this->LockInterval,$UserID);\n\t}",
"private function prime()\n {\n $promises = [];\n\n foreach ($this->queue as $page) {\n $url = $page->getStoreUrl();\n\n $options = [];\n\n if ($page->getMagentoVary() != null) {\n $options['cookies'] =\n\n $cookieJar = CookieJar::fromArray([\n 'X-Magento-Vary' => $page->getMagentoVary()\n ], $page->getCookieDomain());\n }\n\n $sendtime = microtime(true);\n\n $request = new Request('GET', $url);\n\n $promises[] = $this->client->sendAsync($request, $options)->then(\n\n function (Response $response) use ($page, $sendtime, $request) {\n\n $responsetime = microtime(true);\n\n $this->writeln(\n '<info>GET '.$page->getPath() .' '.$page->getMagentoVary().'</info> <comment>'.$response->getStatusCode().', '.number_format (( $responsetime - $sendtime ), 2).'s</comment>'\n );\n $page->setStatus(1);\n $this->pageRepository->save($page);\n }\n )->otherwise(function(\\Exception $e) use ($page, $sendtime, $request) {\n $this->writeln(\n '<error>'.$e->getMessage().'</error>'\n );\n $priority = $page->getPriority();\n $page->setPriority($priority-1);\n $page->setStatus(1);\n $this->pageRepository->save($page);\n });\n\n }\n\n \\GuzzleHttp\\Promise\\all($promises)->wait();\n }",
"public function lock($wait = -1) {}",
"public function lock($wait = -1) {}",
"public static function setLocked()\n {\n self::$locked = true;\n }",
"function redirect_403()\n{\n // prevent Browser cache for php site\n header(\"Cache-Control: no-store, no-cache, must-revalidate, max-age=0\");\n header(\"Cache-Control: post-check=0, pre-check=0\", false);\n header(\"Pragma: no-cache\");\n header('HTTP/1.1 403 Forrbidden');\n exit;\n}",
"public function modify_headers() {\r\n\t\t\r\n\t\t// Check if we are to try preventing caching of gated content\r\n\t\t\r\n\t\tif ( get_option( 'patreon-prevent-caching-gated-content', 'yes' ) != 'yes' ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tglobal $post;\r\n\r\n\t\t// Bail out if no post object present\r\n\t\tif ( !$post ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Bail out if not a singular page/post\r\n\t\tif ( !is_singular() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// We are here, it means that this is singular content. Check if it is meant to be gated\r\n\t\t\r\n\t\t$gate_content = false;\r\n\t\t\r\n\t\t$lock_or_not = Patreon_Wordpress::lock_or_not( $post->ID );\r\n\r\n\t\tif ( isset( $lock_or_not['lock'] ) ) {\r\n\t\t\t$gate_content = $lock_or_not['lock'];\t\t\t\r\n\t\t}\r\n\r\n\t\tif ( $gate_content ) {\r\n\t\t\t\r\n\t\t\t// Set the content to be revalidated if 30 seconds passed since the request and to only be cached by browsers/devices\r\n\r\n\t\t\theader( \"Cache-control: private, max-age=30, no-cache\" );\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public function lock()\n {\n $this->locked = true;\n\n return $this;\n }",
"function startSessionLoged() {\n $this->session->set_ini(); //call ini_set. must be called in every script cause it doesnt remain!\n $this->session->regenerate(); //regenerate the session id\n $this->session->generateTokenId($this->connection,$this->user->getUsrID()); //return the tokenId \n $this->session->initiate($this->user->getKeepMeLogged()); //set values for ip, agent... confirmation\n $this->session->initiateToken($this->session->getToken(), $this->user->getUsrID());\n $this->session->setExpiration(); //set the expiration of idle session\n $this->session->setCookie(); //secure the session cookie\n $this->session->wClose();\n\n }",
"public function handle_override_changeset_lock_request()\n {\n }",
"protected function loginIfRequested() {}",
"public function writeunlock() {}",
"protected function hashLockClause() {}",
"public function lockJob() {\n \t\t//structure id,jobId,serverId (job id is unique entry)\n\n \t}",
"public function lockAction()\r\n {\r\n $timesheet = $this->byId();\r\n \r\n $this->projectService->lockTimesheet($timesheet);\r\n \r\n $this->redirect('timesheet', 'edit', array('clientid'=>$timesheet->clientid, 'projectid'=>$timesheet->projectid, 'id'=>$timesheet->id));\r\n }",
"public function lockShared($lock_waiting_option = null) {}",
"public function lock($name) {\n\t\t\n\t\t/*$b = mysql_query('show tables');\n\t\t$d = '';\n\t\t$d .= 'LOCK TABLES';\n\t\twhile( $c = mysql_fetch_array($b) ) {\n\t\t\t$d .= '\n\t\t`'.$c[0].'` WRITE , ';\n\t\t}\n\t\t\n\t\t$d = rtrim($d,' , ').';';\n\t\t//if( $this->info['id'] == 12345 ) {\n\t\t\tif( $name == 'reflesh.useitems' || $name == 'reflesh-heal' ) {\n\t\t\t\tmysql_query($d);\n\t\t\t}\n\t\t//}*/\n\t}",
"function lock(string $key): void;",
"private static function for_ie_ssl()\n {\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\n header('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n header('Pragma: public'); // HTTP/1.0\n }",
"protected function doExit() {\n\t\tif (FLOW_SAPITYPE === 'Web') {\n\t\t\theader('HTTP/1.1 503 Service Temporarily Unavailable');\n\t\t\treadfile(FLOW_PATH_FLOW . 'Resources/Private/Core/LockHoldingStackPage.html');\n\t\t} else {\n\t\t\t$expiresIn = abs((time() - self::LOCKFILE_MAXIMUM_AGE - filemtime($this->lockFlagPathAndFilename)));\n\t\t\techo 'Site is currently locked, exiting.' . PHP_EOL . 'The current lock will expire after ' . $expiresIn . ' seconds.' . PHP_EOL;\n\t\t}\n\t\texit(1);\n\t}",
"public function lockClient( $siteID ) {\n\t\tif ( !isset( $this->clientWikis[ $siteID ] ) ) {\n\t\t\tthrow new MWException( \"Wiki not configured: $siteID; \"\n\t\t\t\t\t.\"consider removing it from the \" . $this->stateTable );\n\t\t}\n\n\t\t$wikiDB = $this->clientWikis[ $siteID ];\n\n\t\t$this->trace( \"Trying $siteID\" );\n\n\t\t// start transaction\n\t\t$db = $this->getRepoMaster();\n\t\t$db->begin( __METHOD__ );\n\n\t\ttry {\n\t\t\t$this->trace( 'Loaded repo db master' );\n\n\t\t\t// get client state\n\t\t\t$state = $db->selectRow(\n\t\t\t\t$this->stateTable,\n\t\t\t\tarray( 'chd_site', 'chd_db', 'chd_seen', 'chd_touched', 'chd_lock', 'chd_disabled' ),\n\t\t\t\tarray( 'chd_site' => $siteID ),\n\t\t\t\t__METHOD__,\n\t\t\t\tarray( 'FOR UPDATE' )\n\t\t\t);\n\n\t\t\t$this->trace( \"Loaded dispatch changes row for $siteID\" );\n\n\t\t\tif ( !$state ) {\n\t\t\t\t$this->warn( \"ERROR: $siteID is not in the dispatch table.\" );\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t$this->trace( \"Loading state for $siteID\" );\n\t\t\t\t// turn the row object into an array\n\t\t\t\t$state = get_object_vars( $state );\n\t\t\t}\n\n\t\t\tif ( $state['chd_lock'] !== null ) {\n\t\t\t\t// bail out if another dispatcher instance is holding a lock for that wiki\n\t\t\t\tif ( $this->isClientLockUsed( $wikiDB, $state['chd_lock'] ) ) {\n\t\t\t\t\t$this->trace( \"$siteID is already being handled by another process.\"\n\t\t\t\t\t\t\t\t. \" (lock: \" . $state['chd_lock'] . \")\" );\n\n\t\t\t\t\t$db->rollback( __METHOD__ );\n\t\t\t\t\t$this->releaseRepoMaster( $db );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$lock = $this->getClientLock( $wikiDB );\n\n\t\t\tif ( $lock === false ) {\n\t\t\t\t// This really shouldn't happen, since we already checked if another process has a lock.\n\t\t\t\t// The write lock we are holding on the wb_changes_dispatch table should be preventing\n\t\t\t\t// any race conditions.\n\t\t\t\t// However, another process may still hold the lock if it grabbed it without locking\n\t\t\t\t// wb_changes_dispatch, or if it didn't record the lock in wb_changes_dispatch.\n\n\t\t\t\t$this->trace( \"Warning: Failed to acquire lock on $wikiDB for site $siteID!\" );\n\n\t\t\t\t$db->rollback( __METHOD__ );\n\t\t\t\t$this->releaseRepoMaster( $db );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$this->trace( \"Locked client $siteID\" );\n\n\t\t\t$state['chd_lock'] = $lock;\n\t\t\t$state['chd_touched'] = wfTimestamp( TS_MW, $this->now() ); // XXX: use DB time\n\n\t\t\t// update state record for already known client wiki\n\t\t\t$db->update(\n\t\t\t\t$this->stateTable,\n\t\t\t\t$state,\n\t\t\t\tarray( 'chd_site' => $state['chd_site'] ),\n\t\t\t\t__METHOD__\n\t\t\t);\n\t\t} catch ( Exception $ex ) {\n\t\t\t$db->rollback( __METHOD__ );\n\t\t\t$this->releaseRepoMaster( $db );\n\t\t\tthrow $ex;\n\t\t}\n\n\t\t$db->commit( __METHOD__ );\n\t\t$this->releaseRepoMaster( $db );\n\n\t\t$this->trace( \"Locked $wikiDB for site $siteID at {$state['chd_seen']}.\" );\n\n\t\tunset( $state['chd_disabled'] ); // don't mess with this.\n\n\t\treturn $state;\n\t}",
"public function checkLock() {\n\t\t$this->autoRender = false;\n\t\t\n\t\t$HttpSocket = new HttpSocket();\n\t\t$results = $HttpSocket->get('https://api.dropbox.com/1/search/auto/',\n\t\t\tarray(\n\t\t\t\t'query' => 'SystemIsLocked',\n\t\t\t\t'access_token' => 'YOUR_ACCESS_TOKEN'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(empty(json_decode($results->body))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"protected function _blockAccess()\n\t{\n\t\t// Set the task\n\t\t$this->_task = 'block';\n\n\t\t// Set page title\n\t\t$this->_buildTitle();\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Instantiate a new view\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$this->_msg = Lang::txt('COM_PUBLICATIONS_PRIVATE_PUB_LOGIN');\n\t\t\treturn $this->_login();\n\t\t}\n\n\t\tNotify::error(Lang::txt('COM_PUBLICATIONS_RESOURCE_NO_ACCESS'));\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option, false)\n\t\t);\n\t}",
"function _lock_tree_table()\n\t{\n\t\tee()->db->query(\"LOCK TABLE \" .$this->tree_table . \" WRITE\");\n\t}",
"function lockCacheObject ()\n {\n return copy($this->cacheObjectId, $this->cacheObjectId.'.lock');\n }",
"public function maybeHandle()\n {\n // Don't lock up other requests while processing\n session_write_close();\n\n if (! \\wp_check_password($this->pointer, $_REQUEST['token'])) {\n \\wp_die('-1');\n }\n\n $this->handle();\n\n \\wp_die('Done');\n }",
"function refreshSite()\n{\n\tglobal $siteID, $siteSerialID;\n\n\t$siteSerialID++;\n\tquery('Update `system.Site` set `SerialID` = `SerialID` + 1 where `ID` = ' . $siteID, false);\n}",
"public function enableLocking()\n {\n $this->lock = true;\n return $this;\n }",
"public function readunlock() {}",
"private function synchronize() {\n\t\t$response = $this->send(self::$synchronize_uri, self::SYNC_SIZE);\n\t\t$this->_set_sync($response);\n\t}",
"private function refreshLockInformation()\n {\n $result = self::$db->fetchOne(\n 'SELECT lock, locktime FROM jukebox.playlists WHERE playlistid=$1',\n [$this->getID()]\n );\n $this->lock = empty($result['lock']) ? null : MyRadio_User::getInstance($result['lock']);\n $this->locktime = (int) $result['locktime'];\n }",
"private function refreshCache()\n {\n\n\t\t// any valid date in the past\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t\t// always modified right now\n\t\theader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t// HTTP/1.1\n\t\theader(\"Cache-Control: private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0\");\n\t\t// HTTP/1.0\n\t\theader(\"Pragma: no-cache\");\n\t}",
"public function cache()\r\n {\r\n dispatch(new PageCacheJob());\r\n return redirect()->back()->with(config('seo.flash_message'), 'Your request to refresh cache are in queue now.');\r\n }",
"public static function lockTable(){\n\t\t$statement = App::getDBO()->prepare('LOCK TABLES USERS WRITE');\n\t\t App::getDBO()->query();\n\t}",
"public function maybe_run_ajax_cache()\n {\n }",
"function apc_cache_lock_click_index() {\n\t$n = 1;\n\t// we always unlock as soon as possilbe, so a TTL of 1 should be fine\n\twhile(!apc_add(APC_CACHE_CLICK_INDEX_LOCK, 1, 1)) {\n\t\t$n++;\n\t\tusleep(500);\n\t} \n\tif($n > 1) apc_cache_debug(\"lock_click_index: Locked click index in $n tries\");\n\treturn true;\n}",
"private function synchronize()\n {\n $_SESSION['user'] = $this->user;\n }",
"function Spinlock( $query, $id = -1, $set = FALSE, $spin = FALSE, $name = \"\" )\n\t{\n\t\t$log = new Logger( PAYPAL_IPN_LOG, \"Utils::Spinlock\", FALSE, $name );\n\t\t$log->debug( \"Attempting to lock tables...\" );\n\t\t$myResponse = \"\";\n\t\t$result = mysql_query( \"LOCK TABLES session WRITE, $query\" );\n\t\t\n\t\t// Table access locked?\n\t\tif ( $result == FALSE )\n\t\t{\n\t\t\t$myResponse = 'Lock_wait' . mysql_error();\n\t\t\t$log->error( $myResponse );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Table locked by another guestID?\n\t\t\t$result = mysql_query( \"SELECT locked, timeout FROM session\" );\n\t\t\t$row = mysql_fetch_row( $result );\n\t\t\t$timeLeft = $row[1] - time();\n\t\t\tif ( $row[0] != -1 && $row[0] != $id && $timeLeft > 0 )\n\t\t\t{\n\t\t\t\t// locked by someone else, still within timeout\n\t\t\t\t$myResponse = \"Locked by guest #{$row[0]} for $timeLeft more seconds. You are #$id\";\n\t\t\t\t$log->error( $myResponse );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// not locked or lock timed out\n\t\t\t\t$newID = $set ? $id : -1;\n\t\t\t\t$timeout = (time() + LOCK_TIMEOUT);\n\t\t\t\t$result = mysql_query( \"UPDATE session SET locked='$newID', timeout='$timeout'\" );\n\t\t\t\tif ( $result == FALSE )\n\t\t\t\t{\n\t\t\t\t\t$qerr = \"Error setting/clearing lock to $newID: \" . mysql_error();\n\t\t\t\t\t$log->error( $qerr );\n\t\t\t\t\treturn $qerr;\n\t\t\t\t}\n\t\t\t\t$log->debug( \"Lock set for $newID with timeout of $timeout\" );\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\t// if we get here then there's an existing lock, so spin, if requested, at 5-second intervals\n\t\tif ( $spin )\n\t\t{\n\t\t\t$log->debug( \"Spinning for 5 seconds...\" );\n\t\t\tsleep(5);\n\t\t\treturn Utils::Spinlock( $query, $id, $set, $spin, $name, FALSE );\n\t\t}\n\t\treturn $myResponse;\n\t}",
"function start_caching()\n{\n\tglobal $cachefile;\n\n\t//There is a random string to the end of the $_GET Query String to\n\t//prevent IE from caching the Ajax request. The below line removes the random portion\n\t//of the query so we can cache the page properly in php\n\tif(stripos($cachefile, \"&rand=\")==true)\n\t\t$cachefile = substr($cachefile,0,stripos($cachefile, \"&rand=\"));\n\n\tif (file_exists($cachefile)) \n\t{\n\t\t// the page has been cached from an earlier request\n\t\t// output the contents of the cache file\n\t\tinclude($cachefile); \n\t\t// exit the script, so that the rest isnt executed\n\t\texit;\n\t}\n\telse\n\t\tob_start();\n}",
"public function lock()\n {\n if ($this->isLocked()) {\n throw new RuntimeException('Cannot lock: already locked');\n }\n\n $this->conn->set('lock:' . $this->name, $this->id);\n }",
"public function lock(string $name): void;",
"public function trylock_read() {}",
"function block_atu()\n{\n\tglobal $mybb,$pid;\n\tif(isset($mybb->input['ajax']))\n\t{\n\t\tmy_setcookie(\"ignore_\".$pid,TIME_NOW+6);\n\t}\n}",
"public function maybeLockouts() {\n\t\tdo_action( 'wd_before_lockout' );\n\t\t$settings = Settings::instance();\n\t\t$isTest = HTTP_Helper::retrieveGet( 'def-lockout-demo', false ) == 1;\n\t\tif ( $isTest ) {\n\t\t\t$message = null;\n\t\t\t$type = HTTP_Helper::retrieveGet( 'type' );\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'login':\n\t\t\t\t\t$message = $settings->login_protection_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '404':\n\t\t\t\t\t$message = $settings->detect_404_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'blacklist':\n\t\t\t\t\t$message = $settings->ip_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$message = __( \"Demo\", \"defender-security\" );\n\t\t\t}\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $message\n\t\t\t) );\n\t\t\tdie;\n\t\t}\n\t\t\n\t\t$ip = $this->getUserIp();\n\t\t$arr = $this->defaultWhiteListIps();\n\t\t$cache = WP_Helper::getCache();\n\t\t$temp_whitelist = $cache->get( 'staff_ips', [] );\n\t\tif ( $this->listenToStaffAccess() ) {\n\t\t\t//tmp whitelist this ip till the access end\n\t\t\t$temp_whitelist[] = $ip;\n\t\t\t$temp_whitelist = array_unique( $temp_whitelist );\n\t\t\t$temp_whitelist = array_filter( $temp_whitelist );\n\t\t\t$cache->set( 'staff_ips', $temp_whitelist, DAY_IN_SECONDS );\n\t\t\tUtils::instance()->log( sprintf( 'Temporary whitelist ip %s', $ip ), 'lockout' );\n\t\t}\n\t\t$arr = array_merge( $arr, $temp_whitelist );\n\t\t\n\t\tif ( in_array( $ip, $arr ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( $settings->isWhitelist( $ip ) ) {\n\t\t\treturn;\n\t\t} elseif ( $settings->isBlacklist( $ip ) ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} elseif ( $settings->isCountryBlacklist() ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} else {\n\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t//if current user can logged in, and no blacklisted we don't need to check the ip\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$model = IP_Model::findOne( array(\n\t\t\t\t'ip' => $ip\n\t\t\t) );\n\t\t\tif ( is_object( $model ) && $model->is_locked() ) {\n\t\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t\t}\n\t\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\t\theader( 'Cache-Control: private' );\n\t\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t\t'message' => $model->lockout_message\n\t\t\t\t) );\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}",
"public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}",
"public function exitIfSiteLocked() {\n\t\tif ($this->isSiteLocked() === TRUE) {\n\t\t\t$this->doExit();\n\t\t}\n\t}",
"function freeze() {\n ## we will need this to lock the table\n $db_connection = new DB_Sql();\n $str=\"\";\n\n $this->serialize(\"this->in\",$str);\n $this->serialize(\"this->registered_objects\",$str);\n\n reset($this->registered_objects);\n while ( list($thing) = each($this->registered_objects) ) {\n $thing=trim($thing);\n if ( $thing ) {\n $this->serialize(\"GLOBALS['\".$thing.\"']\",$str);\n }\n }\n \n ## her we start to store the table\n $db_connection->lock(ACTIVE_SESSIONS);\n \n $r = $this->that->store($this->id, $this->name, $str);\n $db_connection->unlock();\n if(!$r) $this->that->halt(\"Session: freeze() failed.\");\n }",
"public function walletlock()\n\t{\n\t\treturn $this->_get_error($this->connect('walletlock'));\n\t}",
"public function testAcquire() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\t// simply try to lock\n\t\t\tSharedLock::lock($lockName, 5, 10);\n\t\t}"
] | [
"0.6972747",
"0.67661196",
"0.6563253",
"0.6494385",
"0.6350959",
"0.6295932",
"0.62935144",
"0.62935144",
"0.62935144",
"0.62935144",
"0.62935144",
"0.62546086",
"0.6190486",
"0.6173493",
"0.6125473",
"0.603985",
"0.6031565",
"0.59846056",
"0.59661597",
"0.58755785",
"0.5858517",
"0.58423185",
"0.5768735",
"0.5708434",
"0.5700879",
"0.5693885",
"0.5682345",
"0.56539154",
"0.563008",
"0.5602403",
"0.5574156",
"0.5568131",
"0.5548996",
"0.5482611",
"0.54684895",
"0.5448235",
"0.54433346",
"0.5433121",
"0.5427526",
"0.54229593",
"0.5422941",
"0.54101115",
"0.5403963",
"0.5385691",
"0.53808653",
"0.53688467",
"0.53563845",
"0.53538805",
"0.5344542",
"0.5344231",
"0.534412",
"0.53274506",
"0.5323807",
"0.5316291",
"0.5316291",
"0.5306469",
"0.5298342",
"0.52145356",
"0.5204532",
"0.5203203",
"0.51927656",
"0.51769704",
"0.5172514",
"0.5167361",
"0.51654845",
"0.51613045",
"0.51595294",
"0.51439494",
"0.5142187",
"0.5123534",
"0.51228964",
"0.51222795",
"0.5118654",
"0.5115354",
"0.51089156",
"0.5092421",
"0.50772774",
"0.50742394",
"0.50654083",
"0.5057425",
"0.5053309",
"0.5051302",
"0.50392514",
"0.50052625",
"0.5000641",
"0.49982208",
"0.4995021",
"0.49863523",
"0.49753046",
"0.49560058",
"0.49545136",
"0.49492353",
"0.49472257",
"0.49384987",
"0.49380362",
"0.49368075",
"0.4924234",
"0.49195442",
"0.49051833",
"0.4904216"
] | 0.65974545 | 2 |
Unlocks the site if this request has locked it. | public function unlockSite() {
if (is_resource($this->lockResource)) {
flock($this->lockResource, LOCK_UN);
fclose($this->lockResource);
}
@unlink($this->lockFlagPathAndFilename);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function exitIfSiteLocked() {\n\t\tif ($this->isSiteLocked() === TRUE) {\n\t\t\t$this->doExit();\n\t\t}\n\t}",
"public function lockSiteOrExit() {\n\t\ttouch($this->lockFlagPathAndFilename);\n\t\t$this->lockResource = fopen($this->lockPathAndFilename, 'w+');\n\t\tif (!flock($this->lockResource, LOCK_EX | LOCK_NB)) {\n\t\t\tfclose($this->lockResource);\n\t\t\t$this->doExit();\n\t\t}\n\t}",
"private function unlock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\tunlink($this -> lockfile);\n\t\t}\n\t}",
"public function unlock()\r\n {\r\n frameEbbs::_()->getModule('backup')->unlock();\r\n }",
"public function unlock($uri,Sabre_DAV_Lock $lockInfo) {\n\n $locks = $this->getLocks($uri);\n foreach($locks as $k=>$lock) {\n\n if ($lock->token == $lockInfo->token) {\n\n unset($locks[$k]);\n $this->putData($uri,$locks);\n return true;\n\n }\n }\n return false;\n\n }",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"protected function unlock_session() {\n \\core\\session\\manager::write_close();\n ignore_user_abort(true);\n }",
"public function unlock() {\n }",
"public function unlock(): void;",
"protected function doExit() {\n\t\tif (FLOW_SAPITYPE === 'Web') {\n\t\t\theader('HTTP/1.1 503 Service Temporarily Unavailable');\n\t\t\treadfile(FLOW_PATH_FLOW . 'Resources/Private/Core/LockHoldingStackPage.html');\n\t\t} else {\n\t\t\t$expiresIn = abs((time() - self::LOCKFILE_MAXIMUM_AGE - filemtime($this->lockFlagPathAndFilename)));\n\t\t\techo 'Site is currently locked, exiting.' . PHP_EOL . 'The current lock will expire after ' . $expiresIn . ' seconds.' . PHP_EOL;\n\t\t}\n\t\texit(1);\n\t}",
"function lock() {\n if (!authenticated()) {\n header('Location: ' . R . 'auth/?referer=' . $_SERVER['REQUEST_URI']);\n exit();\n }\n}",
"public function maybeLockouts() {\n\t\tdo_action( 'wd_before_lockout' );\n\t\t$settings = Settings::instance();\n\t\t$isTest = HTTP_Helper::retrieveGet( 'def-lockout-demo', false ) == 1;\n\t\tif ( $isTest ) {\n\t\t\t$message = null;\n\t\t\t$type = HTTP_Helper::retrieveGet( 'type' );\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'login':\n\t\t\t\t\t$message = $settings->login_protection_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '404':\n\t\t\t\t\t$message = $settings->detect_404_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'blacklist':\n\t\t\t\t\t$message = $settings->ip_lockout_message;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$message = __( \"Demo\", \"defender-security\" );\n\t\t\t}\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $message\n\t\t\t) );\n\t\t\tdie;\n\t\t}\n\t\t\n\t\t$ip = $this->getUserIp();\n\t\t$arr = $this->defaultWhiteListIps();\n\t\t$cache = WP_Helper::getCache();\n\t\t$temp_whitelist = $cache->get( 'staff_ips', [] );\n\t\tif ( $this->listenToStaffAccess() ) {\n\t\t\t//tmp whitelist this ip till the access end\n\t\t\t$temp_whitelist[] = $ip;\n\t\t\t$temp_whitelist = array_unique( $temp_whitelist );\n\t\t\t$temp_whitelist = array_filter( $temp_whitelist );\n\t\t\t$cache->set( 'staff_ips', $temp_whitelist, DAY_IN_SECONDS );\n\t\t\tUtils::instance()->log( sprintf( 'Temporary whitelist ip %s', $ip ), 'lockout' );\n\t\t}\n\t\t$arr = array_merge( $arr, $temp_whitelist );\n\t\t\n\t\tif ( in_array( $ip, $arr ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( $settings->isWhitelist( $ip ) ) {\n\t\t\treturn;\n\t\t} elseif ( $settings->isBlacklist( $ip ) ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} elseif ( $settings->isCountryBlacklist() ) {\n\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t}\n\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\theader( 'Cache-Control: private' );\n\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t'message' => $settings->ip_lockout_message\n\t\t\t) );\n\t\t\tdie;\n\t\t} else {\n\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t//if current user can logged in, and no blacklisted we don't need to check the ip\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$model = IP_Model::findOne( array(\n\t\t\t\t'ip' => $ip\n\t\t\t) );\n\t\t\tif ( is_object( $model ) && $model->is_locked() ) {\n\t\t\t\tif ( ! defined( 'DONOTCACHEPAGE' ) ) {\n\t\t\t\t\tdefine( 'DONOTCACHEPAGE', true );\n\t\t\t\t}\n\t\t\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\t\t\theader( 'Cache-Control: private' );\n\t\t\t\t$this->renderPartial( 'locked', array(\n\t\t\t\t\t'message' => $model->lockout_message\n\t\t\t\t) );\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}",
"public function writeunlock() {}",
"function Unlock( $uri, $lockToken )\r\n\t{\r\n\t\t$this->addHeader( \"Lock-Token\", \"<$lockToken>\" );\r\n\t\tif( $this->sendCommand( \"UNLOCK $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}",
"public function unlock($uri, Sabre_DAV_Locks_LockInfo $lockInfo)\n {\n $query = 'DELETE FROM '. $this->DB->Tbl['core_lock'].' WHERE `uri`=\"'.$this->DB->esc($uri).'\" AND `token`=\"'.$this->DB->esc($lockInfo->token).'\"';\n return $this->DB->query($query);\n }",
"public function isSiteLocked() {\n\t\treturn file_exists($this->lockFlagPathAndFilename);\n\t}",
"private function waitForUnlocking()\n\t{\n\t\t$times = self::LOCK_TTL;\n\t\t$i = 0;\n\t\twhile ($this->isExecutionLocked() && $i < $times)\n\t\t{\n\t\t\tsleep(1);\n\t\t\t$i++;\n\t\t}\n\t}",
"public function unlockAction()\r\n {\r\n $timesheet = $this->byId();\r\n $this->projectService->unlockTimesheet($timesheet);\r\n $this->redirect('timesheet', 'edit', array('clientid'=>$timesheet->clientid, 'projectid'=>$timesheet->projectid, 'id'=>$timesheet->id));\r\n }",
"function close () {\n\n # create database object if not create\n self::_connect();\n\n $this->link->direct('SELECT RELEASE_LOCK(\"'.$this->session_lock.'\")');\n\n return TRUE;\n }",
"function Unlock($UserID)\n\t{\n\t\tj::SQL(\"UPDATE jfp_xuser SET LockTimeout=? , FailedLoginAttempts=0 WHERE ID=? LIMIT 1\",time(),$UserID);\n\t}",
"protected function _unlock($lockFile = null)\n {\n if (!$lockFile) {\n $lockFile = $this->_getLockFile();\n }\n if (file_exists($lockFile)) {\n unlink($lockFile);\n }\n }",
"public function unlockTeam()\n\t\t{\n\t\t\t$lockedteam = array();\n\t\t\t$lockedteam['id'] = $this->team->id;\n\t\t\t$lockedteam['teamvalue'] = ($this->players[0]->playervalue)+($this->team->RR)*($this->team->RRcost)+($this->team->FF)*10000+($this->team->A_Coach)*10000+($this->team->CheerLeader)*10000+($this->team->Apoth)*50000;\n\t\t\t$lockedteam['locked'] = 0;\n\t\t\t$table = $this->getTable('Teams','BloodBowlTable');\n\t\t\treturn $table->updTeam($lockedteam);\n\t\t\t//return true;\n\t\t}",
"function unlockCacheObject ()\n {\n return unlink($this->cacheObjectId.'.lock');\n }",
"protected function releaseLock() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n $sql = \"DELETE FROM \".$this->_dbtp.\"locks WHERE \".$this->_dblp.\"name=?\";\n try {\n $db->query($sql, $this->_lock);\n }\n catch(Exception $ex) {\n $log->err($ex);\n $log->err(array(\"Queue releaseLock failed\", $res));\n } \n }",
"public function unlock($lockName){\n if(in_array(ltrim($lockName,'__'),$this->vault)) return true;\n\n /*\n * Retrun default allow value if lock is not exist\n */\n if(!isset($this->locks[$lockName])) return $this->allowByDefault;\n \n /*\n * Retrun false if there is a block\n */\n if(isset($this->locks[$lockName]['blocks'])){\n foreach ($this->locks[$lockName]['blocks'] as $v) {\n if(in_array($v,$this->vault)) return false;\n }\n }\n\n /*\n * Retrun true if there is access key in vault\n */\n if(isset($this->locks[$lockName]['keys'])){\n foreach ($this->locks[$lockName]['keys'] as $v) {\n if(in_array($v,$this->vault)) return true;\n }\n }\n\n /*\n * Retrun default behavior of the lock\n */\n if(isset($this->locks[$lockName]['default_allow'])){\n return $this->locks[$lockName]['default_allow'];\n }else{\n return $this->allowByDefault;\n }\n\n }",
"private function unlockConcurrentExecution()\n\t{\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($this->getLockTag());\n\t}",
"static function unlock_account() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if ($hash = data('hash')) {\n\n # verificando se ha algum usuário com a hash.\n $user = $model::first(array(\n 'fields' => 'id, hash_unlock_account',\n 'where' => \"hash_unlock_account = '$hash'\"\n ));\n\n if (!empty($user)) {\n $user->hash_unlock_account = '';\n $user->login_attempts = 0;\n\n $user->edit() ?\n flash('Sua conta foi desbloqueada.') :\n flash('Algo ocorreu errado. Tente novamente mais tarte.', 'error');\n }\n }\n\n go('/');\n }",
"function unlock() {\r\n\t\t$query=new query($this, \"unlock tables\");\r\n\t\t$result=$query->result;\r\n\t\treturn $result;\r\n\t}",
"protected function do_unlock($obj) {\n\t\t$this->debug(\"-- do_unlock($obj)\");\n\n\t\t$this->send(self::REQ_REL_LOCK, $obj);\n\n\t\tlist($op, $p) = $this->receive();\n\n\t\tif ($op != self::REP_LOCK_RELEASED) {\n\t\t\tthrow new LockException($this->decode_reply($op) . \": \" . $p);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private function _isLocked(): bool {\n\t\t// Each server is responsible for keeping locks clean.\n\t\t// Allow a hook to enable inter-server connection, later\n\t\tif (!$this->isMyServer()) {\n\t\t\treturn $this->application->hooks->callArguments(__CLASS__ . '::server_is_locked', [\n\t\t\t\t$this->memberInteger('server'), $this->pid,\n\t\t\t], true);\n\t\t}\n\t\tif ($this->isMyPID()) {\n\t\t\t// My process, so it's not locked\n\t\t\treturn false;\n\t\t}\n\t\t// Is the process running?\n\t\tif ($this->application->process->alive($this->pid)) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->application->logger->warning('Releasing lock from {server}:{pid} as process is dead', $this->members());\n\t\t$this->release();\n\t\treturn false;\n\t}",
"public function unlockNode($uri,Sabre_DAV_Lock $lockInfo) {\n\n try {\n $node = $this->getNodeForPath($uri);\n if ($node instanceof Sabre_DAV_ILockable) return $node->unlock($lockInfo);\n } catch (Sabre_DAV_FileNotFoundException $e) {\n // In case the node didn't exist, this could be a lock-null request\n }\n\n if ($this->lockManager) return $this->lockManager->unlock($uri,$lockInfo);\n\n }",
"public function readunlock() {}",
"function release( )\n {\n if ( $this->locked === false )\n {\n return false;\n }\n $this->locked = ( $this->fMemcache->delete( $this->id ) !== true );\n return $this->locked === false;\n }",
"function lock_release($name) {\n global $locks;\n\n unset($locks[$name]);\n db_delete('semaphore')\n ->condition('name', $name)\n ->condition('value', _lock_id())\n ->execute();\n}",
"public function maybeHandle()\n {\n // Don't lock up other requests while processing\n session_write_close();\n\n if (! \\wp_check_password($this->pointer, $_REQUEST['token'])) {\n \\wp_die('-1');\n }\n\n $this->handle();\n\n \\wp_die('Done');\n }",
"protected function _unlock($key) {\n\t\treturn apc_delete($key);\n\t}",
"public function tree_unlock() {\n global $db, $uid;\n\n if (($this->lock_user != false) && ($this->lock_user != $uid)) {\n // Ein anderer User hat den Baum gesperrt\n $this->error = \"ERR_ALREADY_LOCKED\";\n $this->reload = true;\n return false;\n } else if ($this->lock_user == $uid) {\n // Eigene Sperre, entfernen\n $this->lock_user = false;\n $db->querynow(\"DELETE FROM `lock` WHERE FK_USER=\".$uid.\" AND IDENT='\".$this->table.$this->root.\"'\");\n return true;\n }\n // Baum ist nicht gesperrt\n return true;\n }",
"function lockout($username = \"\") {\n\t\tglobal $wpdb;\n\n\t\t$ip = $this->get_user_ip();;\n\n\t\t$username = sanitize_user($username);\n\n\t\t$user = get_user_by( 'login', $username );\n\n\t\tif ( !$user ) { \n\t\t\t$user = new stdClass();\n\t\t\t$user->ID = 0;\n\t\t}\n\n\t\t$sql = \"insert into \" . $this->lock_table . \" (user_id, lockdown_date, release_date, lockdown_IP) \" .\n\t\t\t \"values ('\" . $user->ID . \"', NOW(), date_add( NOW(), interval \" .\n\t\t\t $this->ll_options['lockout_length'] . \" MINUTE), '\" . $wpdb->escape($ip) . \"')\";\n\n\t\t$wpdb->query($sql);\n\n\t\tif ( 'yes' == $this->ll_options['notify_admins'] )\n\t\t\t$this->ll_notify_admins( $ip, $username );\n\n\t}",
"function unlock_sqlite3_access() {\n\tglobal $DB;\n\n\tsem_release($DB['SEM_ID']);\n}",
"public function unlock($name)\n {\n $this->verbose_output(\"unlock() called: name - $name\");\n \n if($this->is_connected() === false) \n {\n $this->verbose_output(\"unlock(): returning false due to memcache = false\");\n return false;\n }\n\n if ($this->mcache->delete($name) === false)\n {\n $this->verbose_output(\"unlock(): returning false due to memcache delete() fail\");\n return false;\n }\n \n $this->verbose_output(\"unlock(): success\");\n \n return true;\n }",
"public function unlock(int $id): bool\n {\n // Execute query.\n $result = $this->wpdb->update(\n $this->blacklist_table,\n ['release_time' => \\date(self::MYSQL_DATETIME_FORMAT, current_time('timestamp'))],\n ['id' => $id],\n ['%s'],\n ['%d']\n );\n // Return status.\n return $result !== false;\n }",
"function wp_ajax_wp_remove_post_lock()\n {\n }",
"function release_token(){\n if(!isset($_GET[$this->name])) {\n header(\"Status: 302 Moved Temporarily\");\n $this->get_id($sid);\n header(\"Location: http://\".$_SERVER['HTTP_HOST'].$this->self_url());\n exit;\n } \n }",
"public function unlock(UnlockAlbumRequest $request, Unlock $unlock): void\n\t{\n\t\t$unlock->do($request->album(), $request->password());\n\t}",
"public function releaseLock($user_id) {\n\t\t\tglobal $db;\n\t\t\t$query = \"UPDATE users SET lock_guid='' WHERE id=$user_id\";\n\t\t\t//print \"$query<br>\\n\"; \n\t\t\tif ($db->query($query)) {\n\t\t\t\t$_SESSION['treeline_user_lock_guid']='';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"function unlock($id) {\n\t\tif (substr(PHP_OS, 0, 3) == 'WIN') {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!isset($this->locks[$id])) {\n\t\t\tif (DEBUG > 0) {\n\t\t\t\tthrow new Exception(\"entity $id not locked\");\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t$fplock= $this->locks[$id];\n\t\tflock($fplock, LOCK_UN);\n\t\tfclose($fplock);\n\n\t\tunset ($this->locks[$id]);\n\t\treturn true;\n\t}",
"protected function RemoveLock()\n {\n if (false === isset($_SERVER['HTTP_REFERER']) || empty($_SERVER['HTTP_REFERER'])) {\n return;\n }\n $sReferer = $_SERVER['HTTP_REFERER'];\n if (false === stristr($sReferer, 'pagedef=tableeditor')) {\n return;\n }\n $aURLParts = parse_url($sReferer);\n if (false === isset($aURLParts['query']) || empty($aURLParts['query'])) {\n return;\n }\n $sLastOpenRecordID = null;\n $sLastOpenTableID = null;\n\n $aParams = explode('&', $aURLParts['query']);\n foreach ($aParams as $sParam) {\n if ('id=' === substr($sParam, 0, 3)) {\n $sLastOpenRecordID = substr($sParam, 3);\n } elseif ('tableid=' === substr($sParam, 0, 8)) {\n $sLastOpenTableID = substr($sParam, 8);\n }\n }\n\n if (null === $sLastOpenRecordID || null === $sLastOpenTableID) {\n return;\n }\n $oTableEditor = new TCMSTableEditorManager();\n if ($oTableEditor->Init($sLastOpenTableID, $sLastOpenRecordID)) {\n $oTableEditor->RemoveLock();\n }\n }",
"public function isLocked() {}",
"function unlock($key)\n {\n if (in_array($key->getKeyId(), $this->config->blackList))\n return false;\n \n // auf whitelist: return true\n if (in_array($key->getKeyId(), $this->config->whiteList))\n return true;\n \n // accesslist pruefen!\n foreach ($this->config->accessList as $item) {\n if ($item->keyId == $key->getKeyId()\n && $this->isNowInWindow($item->begin, $item->end)\n ) {\n return true;\n }\n }\n \n // Bei Active Key:\n if ($key instanceof ActiveKey) {\n foreach ($key->getConfigList() as $keyConfig) {\n if ($keyConfig->lockId == $this->lockId \n && $this->isNowInWindow($keyConfig->begin, $keyConfig->end)\n ) {\n return true;\n }\n }\n }\n \n return false;\n }",
"function unlock()\n\t{\n\t\t/* connect first */\n\t\tif ($this->connect('w')==DB_SUCCESS)\n\t\t{\n\t\t\t/* unlock */\n\t\t\tatkdebug(\"unlock tables\");\n\t\t\t$result = $this->_query(\"UNLOCK TABLES\", true);\n\t\t\tif (!$result) $this->halt(\"unlock tables failed.\");\n\n\t\t\t/* return result */\n\t\t\treturn $result;\n\t\t}\n\t\treturn 0;\n\t}",
"function unblock(Request $request)\n {\n DB::table('users')\n ->where('id', $request->id)\n ->update([\n 'active' => '1',\n ]);\n\n //insert into auditrail\n AuditTrail::create(['user_id' => Auth::user()->id,\n 'username' => Auth::user()->username,\n 'form_name' => 'Account',\n 'activity' => 'Unlocked ' . 'Account ' . $request->username, \n ]);\n\n return redirect()->back();\n }",
"abstract protected function releaseLock($name);",
"public function __destruct()\n {\n if ($this->isLocked()) {\n $this->unlock();\n }\n }",
"function stopDownloadToPool()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\t$this->addInfoMessage($I18N_downloadAborted);\n\n\t\tSERVER_deleteFile($this->getPoolDir().'/lock');\n\n\t\tSERVER_killBackgroundJob('downloadPoolPackages');\n\t}",
"public function unlockgroupAction()\n {\n \t//Don't display a new view\n \t$this->_helper->viewRenderer->setNoRender();\n \t//Don't use the default layout since this isn't a view call\n \t$this->_helper->layout->disableLayout();\n \n \t$group = GroupNamespace::getCurrentGroup();\n \t$date = $this->getRequest()->getParam('unlockuntildateinput');\n \t$zenddate = new Zend_Date($date, ACORNConstants::$ZEND_DATE_FORMAT);\n \t$date = $zenddate->toString(ACORNConstants::$ZEND_INTERNAL_DATE_FORMAT);\n \n \t$items = $group->getRecords();\n \t$success = UnlockedItemsDAO::getUnlockedItemsDAO()->unlockItems($items, $date);\n \t\n \tif ($success)\n \t{\n \t\t$group = GroupDAO::getGroupDAO()->getGroup($group->getPrimaryKey());\n \t\tGroupNamespace::setCurrentGroup($group);\n \t}\n \n \t$jsonstring = Zend_Json::encode(array('UnlockSuccessful' => $success));\n \t$this->getResponse()->setHeader('Content-Type', 'application/json')\n \t->setBody($jsonstring);\n }",
"static function unlock($path, $handler)\r\n {\r\n Route::route(\"UNLOCK\", $path, $handler);\r\n }",
"public function lock()\r\n {\r\n frameEbbs::_()->getModule('backup')->lock();\r\n }",
"public function isLocked()\n {\n return isset($this->expires);\n }",
"public function checkLock() {\n\t\t$this->autoRender = false;\n\t\t\n\t\t$HttpSocket = new HttpSocket();\n\t\t$results = $HttpSocket->get('https://api.dropbox.com/1/search/auto/',\n\t\t\tarray(\n\t\t\t\t'query' => 'SystemIsLocked',\n\t\t\t\t'access_token' => 'YOUR_ACCESS_TOKEN'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(empty(json_decode($results->body))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function isUnlocked()\n {\n return !$this->isLocked();\n }",
"private function lock_cleanup() {\n\t\tif (\n\t\t\t$this->lock !== NULL\n\t\t\t&& $this->lock->is_expired()\n\t\t) {\n\t\t\t$this->lock = NULL;\n\t\t}\n\t\t$this->write();\n\t}",
"protected function unlock()\n {\n $sql = \"UNLOCK TABLES\";\n try {\n $this->_db->exec($sql);\n } catch ( PDOException $e ) {\n if ( !strpos($e->getMessage(), 'syntax error') )\n throw $e;\n // no lock support, continue\n }\n }",
"public function hasUnlock(){\n return $this->_has(3);\n }",
"public function isLocked();",
"public function isLocked();",
"public function isLocked();",
"public function unlock()\r\n {\r\n $this->locked = false;\r\n\r\n return $this;\r\n }",
"public function release() {\n $this->locked = 0;\n $this->save();\n }",
"public function release() {\n $this->locked = 0;\n $this->save();\n }",
"public function unlock($all = false) {}",
"function lock_release(Session $session) {\n\t\tif (\n\t\t\t$this->lock !== NULL\n\t\t\t&& !$this->lock->is_owned_by($session)\n\t\t) {\n\t\t\tthrow new SlideLockException(\n\t\t\t\t\"Can't unlock a slide locked from another session.\"\n\t\t\t);\n\t\t}\n\t\t$this->lock = NULL;\n\t}",
"public function unlock($key=null,$value=null){\n return $this->methodsData(\"unlock\",$key,$value);\n }",
"public function unlock(string $name): void;",
"public function freeLock($lockName){\n if ($this->dbConnection->getAttribute(PDO::ATTR_DRIVER_NAME) != 'mysql'){\n // @codeCoverageIgnoreStart\n throw new Exception(\"Free Lock is only implemented for MySQL drivers\");\n // @codeCoverageIgnoreEnd\n }\n\n $freeLock = \"SELECT RELEASE_LOCK('$lockName')\";\n $result = $this->dbConnection->query($freeLock);\n\n $lockRecord = $result->fetch(PDO::FETCH_NUM);\n\n if ($lockRecord[0] == 1){\n $key = $this->alreadyHaveLock($lockName);\n\n if ($key !== false){\n unset($this->locks[$key]);\n }\n }\n\n }",
"public function UnLockDocument() {\n\n\t\tif ($this->parameter_check) {\n\n\t\t\t/* DATABASE CONNECTION */\n\t\t\t$db=$GLOBALS['db'];\n\n\t\t\t$sql=\"UPDATE \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tSET locked = 'n',\n\t\t\t\t\t\tuser_id_locked = null,\n\t\t\t\t\t\tdate_locked = null\n\t\t\t\t\t\tWHERE document_id = \".$this->document_id.\"\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql;\n\t\t\t$result=$db->Query($sql);\n\t\t\tif ($db->AffectedRows($result) > 0) {\n\t\t\t\t$this->DocumentUndoCut();\n\t\t\t\tLogDocumentFileHistory($this->GetColVal(\"filename\"),$this->GetColVal(\"category_id\"),$this->GetColVal(\"version_number\"),\"Unlocked\");\n\t\t\t\treturn True;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn False;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->Errors(\"Parameter check failed\");\n\t\t\treturn False;\n\t\t}\n\t}",
"public static function release_lock($lock_name)\n {\n }",
"public function unblockThirdparty($id) {\n\t\tif( Auth::user()->hasRole(1) || Auth::user()->hasRole(4) || Auth::user()->hasRole(5) || Auth::user()->hasRole(8) ) {\n\t\t\t$thirdparty = Thirdparty::find($id);\n\t\t\t$thirdparty->status = 0;\n\t\t\t$thirdparty->save();\n\t\t\tSession::flash('flashmessagetxt', 'Unblocked Successfully!!');\n\t\t\treturn Redirect::route('third-party-list');\n\t\t}\n\t}",
"public function unlock($resource): void\n {\n if ($this->hasExclusiveLock($resource)) {\n $this->exclusiveLock = null;\n }\n\n if (! $this->hasSharedLock($resource)) {\n return;\n }\n\n unset($this->sharedLock[$this->getResourceId($resource)]);\n }",
"public function unlock($id)\n {\n unlock($id);\n }",
"public function lock()\n {\n $this->isLocked = true;\n }",
"private function unlockByIdUser($data)\n {\n $sql = \"DELETE FROM {$this->config->dbTablePrefix}keyword_lock\n WHERE `by_id_user`={$data['id_user']}\";\n\n $this->model->dba->query($sql); \n }",
"protected function _lockIsExpired()\n {\n $varDir = Mage::getConfig()->getVarDir('locks');\n $file = $varDir . DS . 'buckaroo_process_'.$this->getId().'.lock';\n\n if(!is_file($file)){\n $fp = fopen($file, 'x');\n fwrite($fp, date('r'));\n fclose($fp);\n return false;\n }\n\n\n $fiveMinAgo = time() - 300;//300\n $contents = file_get_contents($file);\n $time = strtotime($contents);\n $debug = 'current contents: '.$contents . \"\\n\"\n . 'contents in timestamp: '.$time . \"\\n\"\n . '5 minutes ago in timestamp: '.$fiveMinAgo;\n\n if($time <= $fiveMinAgo){\n $fp = fopen($file, 'w');\n flock($fp, LOCK_UN);\n return true;\n }\n\n return false;\n }",
"public function hasQuotaUnlock(){\n return $this->_has(10);\n }",
"function unlock_offer() {\n\n $collectorId = $_SESSION['demo']['user_id'];\n $offerId = $_GET['offerId'];\n $check = mysql_query(\"SELECT status from offer WHERE offer_ID='$offerId'\");\n if ($check) {\n if (mysql_result($check, 0, 'status') == \"booked\") {\n if (mysql_query(\"UPDATE offer SET status ='available' WHERE offer_ID ='$offerId'\"))\n return 1;\n else\n return -1;\n }\n else\n return -1;\n } else {\n return -1;\n }\n}",
"public static function setUnlocked()\n {\n self::$locked = false;\n }",
"public function isLocked() {\n return $this->getStatus() === Status::LOCKED;\n }",
"public function unlockItem($list_id, $item_id) {\n \\App\\Libraries\\DBHelper::unlockItem($list_id, $item_id);\n return response()->json(['success' => 1]);\n }",
"private function release(): void\n {\n if ($this->lock) {\n $this->lock->release();\n $this->lock = null;\n }\n }",
"public function testParallelUnlockNoExpiration(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n $identifier2 = \\uniqid('lock_name_2_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, -1));\n $this->assertTrue($this->cacheInstance2->lock($identifier2, -1));\n\n $this->assertFalse($this->cacheInstance2->unlock($identifier1));\n $this->assertTrue($this->cacheInstance2->unlock($identifier2));\n\n $this->assertTrue($this->cacheInstance2->isLocked($identifier1));\n $this->assertFalse($this->cacheInstance2->isLocked($identifier2));\n }",
"public function delete_password_lockout()\n\t{\n\t\tif (ee()->config->item('password_lockout') == 'n')\n\t\t{\n\t\t \treturn FALSE;\n\t\t}\n\n\t\t$interval = ee()->config->item('password_lockout_interval') * 60;\n\n\t\t$expire = time() - $interval;\n\n\t\tsrand(time());\n\n\t\tif ((rand() % 100) < $this->gc_probability)\n\t\t{\n\t\t\tee()->db->where('login_date <', $expire)\n\t\t\t\t\t\t ->delete('password_lockout');\n\t\t}\n\t}",
"public function lockIsFree( $lockName, $method ) {\n\t\treturn true;\n\t}",
"public static function setUserUnblock(User $user)\n {\n $user->block = 0;\n $user->update();\n return true;\n }",
"public function release($name)\n {\n if ($this->releaseLock($name)) {\n $index = array_search($name, $this->_locks);\n if ($index !== false) {\n unset($this->_locks[$index]);\n }\n\n return true;\n }\n\n return false;\n }",
"public function releaseLocks()\n {\n foreach ($this->lockedKeys as $key => $value) {\n self::appRelease($key);\n }\n }",
"public function unlockTable($table)\n {\n try{\n $this->stmt = $this->db->prepare(\"UNLOCK TABLES `{$table}`\");\n $this->stmt->execute();\n return true;\n } \n \n catch (PDOException $e)\n {\n $this->error = $e->getMessage(); \n return false;\n }\n }",
"private function userUnblock()\n\t{\n\t\t// Make sure the payment is complete\n\t\tif($this->state != 'C') return;\n\t\t\n\t\t// Make sure the subscription is enabled\n\t\tif(!$this->enabled) return;\n\t\t\n\t\t// Paid and enabled subscription; enable the user if he's not already enabled\n\t\t$user = JFactory::getUser($this->user_id);\n\t\tif($user->block) {\n\t\t\t// Check the confirmfree component parameter and subscription level's price\n\t\t\t// If it's a free subscription do not activate the user.\n\t\t\tif(!class_exists('AkeebasubsHelperCparams')) {\n\t\t\t\trequire_once JPATH_ADMINISTRATOR.'/components/com_akeebasubs/helpers/cparams.php';\n\t\t\t}\n\t\t\t$confirmfree = AkeebasubsHelperCparams::getParam('confirmfree', 0);\n\t\t\tif($confirmfree) {\n\t\t\t\t$level = FOFModel::getTmpInstance('Levels', 'AkeebasubsModel')\n\t\t\t\t\t->getItem($this->akeebasubs_level_id);\n\t\t\t\tif($level->price < 0.01) {\n\t\t\t\t\t// Do not activate free subscription\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$updates = array(\n\t\t\t\t'block'\t\t\t=> 0,\n\t\t\t\t'activation'\t=> ''\n\t\t\t);\n\t\t\t$user->bind($updates);\n\t\t\t$user->save($updates);\n\t\t}\n\t}"
] | [
"0.6962182",
"0.6330336",
"0.6303332",
"0.62574786",
"0.6138356",
"0.6117705",
"0.6117705",
"0.6117705",
"0.6117705",
"0.6117705",
"0.6102593",
"0.61019194",
"0.6085819",
"0.60683596",
"0.5912106",
"0.57919365",
"0.5779712",
"0.56537235",
"0.5644656",
"0.56439143",
"0.55403095",
"0.54624104",
"0.54164094",
"0.5397649",
"0.53908074",
"0.53641576",
"0.535964",
"0.534225",
"0.5309127",
"0.5304012",
"0.5259061",
"0.5250593",
"0.52500015",
"0.5222118",
"0.5190872",
"0.5155778",
"0.5145653",
"0.51425445",
"0.51300454",
"0.5127095",
"0.51200885",
"0.5116327",
"0.51134706",
"0.5095388",
"0.50826424",
"0.5079898",
"0.5076826",
"0.50609374",
"0.50584877",
"0.50235623",
"0.50158715",
"0.5014096",
"0.50106543",
"0.49965498",
"0.49888596",
"0.49829268",
"0.49786976",
"0.49773887",
"0.49636447",
"0.49470836",
"0.49443218",
"0.49389106",
"0.49333668",
"0.4917968",
"0.49136853",
"0.48997945",
"0.48936653",
"0.4887094",
"0.4887094",
"0.4887094",
"0.48821968",
"0.48715305",
"0.48715305",
"0.48510474",
"0.48346287",
"0.4829839",
"0.48080033",
"0.47994417",
"0.47974527",
"0.47883415",
"0.47876114",
"0.47855678",
"0.4774218",
"0.47596914",
"0.47555912",
"0.4731618",
"0.47212863",
"0.47173312",
"0.47155103",
"0.47036964",
"0.46945384",
"0.46815047",
"0.4679069",
"0.4677153",
"0.46716136",
"0.4666387",
"0.46615878",
"0.46568093",
"0.4656605",
"0.46563908"
] | 0.74115705 | 0 |
Exit and emit a message about the reason. | protected function doExit() {
if (FLOW_SAPITYPE === 'Web') {
header('HTTP/1.1 503 Service Temporarily Unavailable');
readfile(FLOW_PATH_FLOW . 'Resources/Private/Core/LockHoldingStackPage.html');
} else {
$expiresIn = abs((time() - self::LOCKFILE_MAXIMUM_AGE - filemtime($this->lockFlagPathAndFilename)));
echo 'Site is currently locked, exiting.' . PHP_EOL . 'The current lock will expire after ' . $expiresIn . ' seconds.' . PHP_EOL;
}
exit(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function quit() {\n echo $this->promptMessage('bye') . PHP_EOL . PHP_EOL;\n exit;\n }",
"function qa_exit($reason = null)\n{\n\tqa_report_process_stage('shutdown', $reason);\n\n\t$code = $reason === 'error' ? 1 : 0;\n\texit($code);\n}",
"function quit($exit_message = \"\")\n\t{\n\t\t$this->sendMessageToServer(\"QUIT $exit_message\");\n\t}",
"public function reportProblemLogAndExit(){\nself::encodeAndOutputMessage($this->message);\n$this->logMessage(self::$normalErrorLog);\nexit;\n}",
"static protected function _halt(\n /** @noinspection PhpUnusedParameterInspection */\n $message /*, $value,... */\n )\n {\n echo\n self::ERR_HEADER, PHP_EOL,\n call_user_func_array('sprintf', func_get_args()), PHP_EOL,\n PHP_EOL;\n\n /* Explicitly halt execution. */\n exit;\n }",
"function finalize($message) {\n echo $message;\n exit;\n }",
"function customExit($receive) {\n echo json_encode($receive);\n exit();\n }",
"public function terminate()\n {\n $this->io->text(\"Shutting down..\");\n // TODO: Dispatch console.terminate event ..maybe..?\n exit();\n }",
"function Err()\n{\n ob_end_clean();\n fprintf (STDERR, \"Chyba - Zadan spatny pocet argumentu, spatne typy operandu nebo vase instrukce neodpovida zadnemu regularnimu vyrazu!\\n\");\n exit(23);\n}",
"function exit_program($message, $code)\n{\n fwrite(fopen('php://stderr', 'w+'), $message);\n exit($code);\n}",
"public function quit();",
"function someexit($message = 0) {\n exit($message);\n}",
"public function makeErrorAction()\n {\n // test this\n\n $this->app->abort(404, 'I am a code generated 404 error message');\n\n }",
"public function exit()\n {\n exit(0);\n }",
"public function halt();",
"static function quit(){\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array(self,'out'),$args);\n\t\texit;\n\t}",
"public function quit(){\n try {\n $this->execute('quit', $statusCode, 500);\n } catch (VarnishException $exception) {\n\n }\n\n $this->disconnect();\n }",
"protected function runFailed(string $message): void\n {\n $this->write($message . PHP_EOL);\n\n exit(self::FAILURE_EXIT);\n }",
"protected function runFailed(string $message): void\n {\n $this->write($message . PHP_EOL);\n\n exit(self::FAILURE_EXIT);\n }",
"abstract function preExit();",
"#[Pure]\n public function gotExit(): bool {}",
"function ThrowFatalError($message = \"An unknown error has occured.\") \n// PRE: $message is a description of the error that has occurred\n// POST: This function will cause the program to close itself after echoing an error message\n{\n\techo \"Error : \" . $message . \" The program has been terminated.\\n\";\n\tif(!TESTING)\n\t{\n\t\tdie();\n\t}\n}",
"public function die(): void;",
"private function error(string $message): void\n {\n echo $message . PHP_EOL;\n exit(1);\n }",
"public function Kill( $message = '' )\r\n\t{\r\n\t\tif( strlen( $message ) > 0 )\r\n\t\t{\r\n\t\t\texit( $message );\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\texit( $this->Error() );\r\n\t\t}\r\n\t}",
"abstract public function abort(): void;",
"function kill($msg = STR_EMP, $fatal = false) {\n\tif($fatal) {\n\t\techo \"**** FATAL ERROR:\\n\";\n\t}\n\techo $msg . \"\\n\";\n\techo \"............process ended\\n\";\n\texit;\n}",
"public function handleShutdown()\n {\n $last_error = error_get_last();\n\n if ( ( $last_error !== null ) and ( in_array($last_error['type'], Array ( E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR, E_CORE_WARNING, E_COMPILE_WARNING, E_PARSE )) ) )\n {\n $this->DontShowBacktrace = true;\n $this->handleError($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);\n }\n }",
"public function terminate();",
"function exit_if($condition, $msg) {\n if ($condition) {\n header('-', true, 400);\n echo $msg;\n exit();\n }\n}",
"public function abort(): void;",
"function reply($message) {\n echo $message;\n exit();\n }",
"public function reply()\n\t{\n\t\tif($this->return){\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}else{\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}\n\t\texit();\n\t}",
"function fatal_exit($text)\n{\n require_code('failure');\n _fatal_exit($text);\n}",
"function exitMessage($msg, $title=\"\", $include_bookmark_help = false) {\n\n $body = \"\n <div class='container'>\n <div class='jumbotron text-center'>\n <p>$msg</p>\n </div>\n </div>\";\n if ($include_bookmark_help) $body .= $this->getBookmarkHelp();\n\n print $this->startBootstrapPage($title) . $body . $this->endBootstrapPage();\n exit();\n }",
"public function send() {\n\t\t\texit(implode(\"\", func_get_args()));\n\t\t}",
"public function fail($message) {\n\t\tdie('cobweb: ' . $message . \"\\n\");\t\n\t}",
"public function callbackFail()\n {\n $this->AddOutput(\"<p><i>\" . $this->logoutMessage . \"</i></p>\");\n $this->redirectTo();\n }",
"public function quit()\n {\n $this->sendServerCommand(\"quit\");\n }",
"public function quit()\n {\n $this->disconnect();\n }",
"public function end($status=0, $exit=true)\n {\n if($exit)\n exit($status);\n }",
"function signalHandler()\n{\n exit(1);\n}",
"public function emitEnd(): void;",
"function halt($msg) {\n printf(\"<strong>Database error:</strong> %sn\", $msg);\n printf(\" <strong>MySQL Error</strong>: %s (%s)n\", $this->Errno, $this->Error);\n die(\"Session halted.\");\n }",
"function err($message,$code){\n fwrite(STDERR, \"ERR:\".\"$message\\n\");\n exit($code);\n }",
"function exitWithError($errorMessage) {\n global $result;\n $result['errorMessage'] = \"Database error: \" . $errorMessage;\n echo json_encode($result);\n exit(1);\n }",
"function seterr($msg)\n{\n\tif (php_sapi_name() == 'cli') {\n\t\texit($msg .\"\\n\");\n\t} else {\n\t\texit('<p class=\"alert\">'. $msg .'</p></body></html>');\n\t}\n}",
"function halt( $msg )\n {\n printf( \"\n<strong>Database error:</strong> %s\nn\", $msg );\n printf( \"<strong>MySQL Error</strong>: %s (%s)\nn\", $this->Errno, $this->Error );\n die( \"Session halted.\" );\n }",
"public static function abort($text, $exception = null)\n {\n static::danger($text);\n\n if ($exception) {\n static::logger()->debug($exception);\n }\n\n exit(1);\n }",
"function printError($errorMessage, $code){\n fwrite(STDERR, \"Error : $errorMessage \\n\");\n exit($code);\n}",
"function toDie( $msg ) {\n\techo $msg;\n\tinclude( '/data/project/xtools/public_html/common/footer.php' );\n\tdie();\n}",
"public function loopExit($timeout = -1);",
"function haltmsg( $msg )\n {\n printf( \"</td></tr></table><b>Database error:</b> %s<br>\\n\", $msg );\n printf( \"<b>MySQL Error</b>: %s (%s)<br>\\n\",\n $this->Errno,\n $this->Error );\n }",
"public static function reportOtherExceptionAndExit($e){\nself::encodeAndOutputMessage(self::translate('System error.'));\n$msg=date(\"Y-m-d H:i:s T\");\n$msg.=':'.(string)$e.\"\\n\"; //Let the exception describe itself\nforeach(self::$details as $k=>$v)$msg.=\"$k=$v\\n\";\nLogger::log(self::$systemErrorLog,$msg);\nexit;\n}",
"public function main()\n\t{\n\t\t// Check permissions\n\t\t$this->checkPermissions();\n\n\t\t/** @var StatisticsModel $model */\n\t\t$model = $this->getModel('Statistics', 'Administrator');\n\t\t$result = $model->notifyFailed();\n\n\t\t$message = $result['result'] ? '200 ' : '500 ';\n\t\t$message .= implode(', ', $result['message']);\n\n\t\t@ob_end_clean();\n\t\theader('Content-type: text/plain');\n\t\theader('Connection: close');\n\t\techo $message;\n\t\tflush();\n\n\t\t$this->app->close();\n\t}",
"function halt( $msg ) {\r\n printf( \"Database error: %s\r\nn\", $msg );\r\n printf( \"MySQL Error: %s (%s)\r\nn\", $this->Errno, $this->Error );\r\n die( \"Session halted.\" );\r\n }",
"public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }",
"public function outputFriendlyError()\n {\n //Erase contents of the output buffer\n ob_end_clean();\n view('errors/generic');\n exit;\n }",
"function message_exit ($msg_text = '', $msg_title = '', $err_line = '', $err_file = '')\n{\n\tglobal $template;\n\n\t// Add file line and name to error message?\n\tif ($err_line != '' && $err_file)\n\t{\n\t\t$msg_text .= \"<br />$err_file:$err_line\";\n\t}\n\t\n\t// Show template?\n\t$template_file = 'information.html';\n\tif ($template && $template->template_exists($template_file))\n\t{\n\t\t$template->set_file('main', 'information.html');\n\n\t\t// Set tpl vars\n\t\t$template->set_var('page_title', $msg_title);\n\t\t$template->set_var('information_text', $msg_text);\n\n\t\t// Display template and exit\n\t\t$template->output('main');\n\t}\n\t// Show regular message\n\telse\n\t{\n\t\tprintf(\"<b>%s</b><br /><br />%s\", $msg_title, $msg_text);\n\t}\n\n\texit;\n}",
"public function doQuit($reason = null)\n {\n // Send a QUIT command to the server\n $this->send('QUIT', $reason);\n\n // Terminate the socket connection\n fclose($this->socket);\n\n // Remove the socket from the internal socket list\n unset($this->sockets[(string) $this->getConnection()->getHostmask()]);\n }",
"function my_ssh_disconnect($reason, $message, $language) {\n printf(\"Server disconnected with reason code [%d] and message: %s\\n\",\n $reason, $message);\n}",
"public function halt()\n {\n $this->_halt = TRUE;\n }",
"function atkhalt($msg,$level=\"warning\")\n{\n\tif ($level == $GLOBALS['config_halt_on_error']||$level == \"critical\")\n\t{\n\t\tif($level == \"warning\")\n\t\t{\n\t\t\t$level_color=\"#0000ff\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// critical\n\t\t\t$level_color=\"#ff0000\";\n\t\t}\n\n\t\tif (php_sapi_name() == 'cli')\n\t\t{\n\t\t\t$res = atktext($level,\"atk\").': '.$msg.\"\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res .=\"<font color=\\\"$level_color\\\"><b>\".atktext($level,\"atk\").\"</b></font>: $msg.<br />\\n\";\t\n\t\t}\n\n\t\tatkOutput::getInstance()->output($res);\n\t\tatkOutput::getInstance()->outputFlush();\n\n\t\texit(\"Halted...\\n\");\n\t}\n\telse\n\t{\n\t\tatkerror(\"$msg\");\n\t}\n\treturn false;\n}",
"public function handleShutdown() {\n\t\t$last_error = error_get_last();\n\t\tif ( !empty( $last_error ) ) {\n\t\t\t$this->handleError(\n\t\t\t\t$last_error['type'],\n\t\t\t\t$last_error['message'],\n\t\t\t\t$last_error['file'],\n\t\t\t\t$last_error['line']\n\t\t\t);\n\t\t}\n\t}",
"public function fail($message) {\n exit('<div style=\"display: inline-block; color: #a94442; background: #f2dede; border: solid 1px #ebccd1; font-family: Helvetica, Arial; size: 16px; padding: 15px;\">Test failed: ' . $message . '</div>');\n }",
"abstract protected function doEnd();",
"function inform_exit($text, $support_match_key_messages = null)\n{\n require_code('failure'); // It's in failure.php although this isn't REALLY failure. Still it's an exceptional event so we can't justify loading the code as global.\n _generic_exit($text, 'INFORM_SCREEN', $support_match_key_messages);\n}",
"function message_die($msg_text = \"\")\r\n{\r\n\tprint($msg_text);\r\n\texit;\r\n}",
"private static function fail(string $message): void\n {\n echo \"\\033[41m\\033[1;37m\" . $message . \"\\033[0m\" . PHP_EOL;\n }",
"public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\n }",
"protected function _done($exit, $name, $note = null, $diag = null)\n {\n $this->_info['done'] ++;\n \n $text = '';\n \n if (is_array($diag) || is_object($diag)) {\n $diag = $this->_var->dump($diag);\n }\n \n $diag = trim($diag);\n if ($diag) {\n $text = \"$text\\n# \" . str_replace(\"\\n\", \"\\n# \", trim($diag));\n }\n \n if ($text) {\n $text .= \"\\n\";\n }\n \n $num = $this->_info['done'];\n \n $note = ltrim($note, '# ');\n \n switch ($exit) {\n case Solar_Test::EXIT_FAIL:\n $type = 'fail';\n $text .= \"not ok $num - $name # FAIL $note\";\n break;\n \n case Solar_Test::EXIT_TODO:\n $type = 'todo';\n $text .= \"not ok $num - $name # TODO $note\";\n break;\n \n case Solar_Test::EXIT_SKIP:\n $type = 'skip';\n $text .= \"ok $num - $name # SKIP $note\";\n break;\n \n case Solar_Test::EXIT_PASS:\n $type = 'pass';\n $text .= \"ok $num - $name\";\n break;\n \n default:\n $type = 'fail';\n $text .= \"not ok $num - $name # FAIL exit code '$exit'\";\n break;\n }\n \n $this->_test_result = $type;\n $this->_log($text);\n $this->_info[$type][$name] = array($num, $note);\n }",
"public function theExitCodeShouldBeZero()\n {\n if ($this->return_code != 0) {\n throw new \\Exception(\n 'Return code was '.$this->return_code.' with output '\n .$this->output\n );\n }\n }",
"public static function traceExit() \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::traceExit();\t\t\n\t}",
"function quit()\n\t{\n\t\tif( is_resource($this->connect_id) )\n\t\t{\n\t\t\t$this->put_data('QUIT');\n\t\t\tfclose($this->connect_id);\n\t\t\t\n\t\t\t$this->connect_id = NULL;\n\t\t}\n\t\t\n\t\tif( $this->save_log )\n\t\t{\n\t\t\t$mode = ( $this->erase_log ) ? 'w' : 'a';\n\t\t\t\n\t\t\tif( $fw = fopen($this->filelog, $mode) )\n\t\t\t{\n\t\t\t\t$log = 'Connexion au serveur ' . $this->pop_server . ' :: ' . date('d/M/Y H:i:s');\n\t\t\t\t$log .= \"\\r\\n~~~~~~~~~~~~~~~~~~~~\\r\\n\";\n\t\t\t\t$log .= $this->log . \"\\r\\n\\r\\n\";\n\t\t\t\t\n\t\t\t\tfwrite($fw, $log);\n\t\t\t\tfclose($fw);\n\t\t\t}\n\t\t}\n\t}",
"public function actionConditionalExit($shouldRun=0)\n {\n if ((int)$shouldRun < 0)\n {\n echo 'The $shouldRun argument must be an positive non-zero integer' . \"\\n\";\n return Controller::EXIT_CODE_ERROR; //returns 1\n }\n\n return Controller::EXIT_CODE_NORMAL; //returns 0\n }",
"public function die()\n {\n if (!$this->shouldThrow) return;\n\n throw $this;\n }",
"public function getReason();",
"public function getReason();",
"function exit_handler()\n{\n\tglobal $phpbb_hook, $config;\n\n\tif (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))\n\t{\n\t\tif ($phpbb_hook->hook_return(__FUNCTION__))\n\t\t{\n\t\t\treturn $phpbb_hook->hook_return_result(__FUNCTION__);\n\t\t}\n\t}\n\n\t// As a pre-caution... some setups display a blank page if the flush() is not there.\n\t(empty($config['gzip_compress'])) ? @flush() : @ob_flush();\n\n\texit;\n}",
"public function event_quit($who, $message)\r\n\t{\r\n\t\r\n\t}",
"public static function error()\n {\n if ($error = static::$errorHandler) {\n admin_exit($error());\n }\n\n if (Helper::isAjaxRequest()) {\n abort(403, trans('admin.deny'));\n }\n\n admin_exit(\n Content::make()->withError(trans('admin.deny'))\n );\n }",
"function warn_exit($text, $support_match_key_messages = false)\n{\n require_code('failure');\n suggest_fatalistic();\n _generic_exit($text, 'WARN_SCREEN', $support_match_key_messages);\n if (running_script('cron_bridge')) {\n relay_error_notification(is_object($text) ? $text->evaluate() : escape_html($text), false, 'error_occurred_cron');\n }\n}",
"public function onTerminate(DevoirEventInterface $event);",
"public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }",
"function kill($error) {\n echo $error.\"<br /><br />\";\n die();\n }",
"public static function abort($message)\n {\n abort(1, sprintf(<<<'EOF'\n An unexpected error occured. Please report this issue here: https://github.com/laravel/forge-cli.\n - Issue: %s.\n - PHP version: %s.\n - Operating system: %s.\n EOF\n , $message, phpversion(), PHP_OS));\n }",
"public static function exit(int $code = 0) {\n exit($code);\n }",
"public function handleShutdown()\n {\n if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) {\n $this->handleException($this->fatalExceptionFromError($error, 0));\n }\n\n $this->app->exitObserver->trigger();\n }",
"function usageError($message)\n\t{\n\t\techo \"Error: $message\\n\\n\";\n\t\texit(1);\n\t}",
"public function gracefulStop(){\n $this->handleWorkerOutput('warn', \"Work done, exiting now.\");\n $this->stop();\n }",
"function exit_response($code, $text) {\n http_response_code($code);\n exit($text);\n}",
"function getExit()\n{\n\theader(\"HTTP/1.0 404 Not Found\");\n\texit;\n}",
"public function quit($close_on_error = true)\n {\n }",
"function dbError() {\n exit(\"Error connecting to the database\");\n}",
"public function __destruct() {\n exit((int)$this->_failed);\n }",
"function error($why)\n {\n eval(PUBSUB_MUTATE);\n if (!$this->_closed)\n {\n kn_apply($this->_handlers['onError'],\n array_merge(array($this, $why, $this->_connected),\n $this->_handlers['args']));\n }\n $this->destroy();\n }",
"public static function shutdown()\n {\n // Close output buffers\n //self::close_buffers(TRUE);\n\n // Run the output event\n Event::run('system.display', self::$output);\n\n // Render the final output\n self::render(self::$output);\n }",
"public function handle()\n {\n// echo 'Shutdown...';\n }",
"protected function reason()\n {\n }",
"public function shutDown() {\n\t\techo \"Permission has not been given.<br>\";\n\t}"
] | [
"0.65651774",
"0.6497669",
"0.633139",
"0.6301743",
"0.6006667",
"0.58728653",
"0.58697045",
"0.5834532",
"0.5738182",
"0.57315874",
"0.57036835",
"0.56967574",
"0.5642124",
"0.56279975",
"0.5627411",
"0.5622319",
"0.5576298",
"0.5556209",
"0.5556209",
"0.55514234",
"0.54798794",
"0.5468956",
"0.54671335",
"0.5439215",
"0.54139906",
"0.5404759",
"0.5369151",
"0.53613615",
"0.53336024",
"0.5331472",
"0.5326571",
"0.53107256",
"0.5300884",
"0.5299406",
"0.52751774",
"0.5256338",
"0.52514756",
"0.52340585",
"0.52240705",
"0.5213619",
"0.52086085",
"0.5196962",
"0.519503",
"0.51927",
"0.518826",
"0.51779866",
"0.51723117",
"0.51649296",
"0.5159878",
"0.51440537",
"0.5142799",
"0.5137052",
"0.5136451",
"0.51289725",
"0.51273537",
"0.51238984",
"0.51235366",
"0.51209414",
"0.51051736",
"0.5102561",
"0.5099472",
"0.5097818",
"0.5092675",
"0.50882035",
"0.5075926",
"0.5075658",
"0.5061646",
"0.50531185",
"0.5047593",
"0.50444585",
"0.5039727",
"0.5027619",
"0.50106883",
"0.5008762",
"0.50045526",
"0.5001675",
"0.49985126",
"0.49985126",
"0.49964887",
"0.49912333",
"0.49728847",
"0.49679285",
"0.49660704",
"0.4964927",
"0.49635032",
"0.49624714",
"0.4959777",
"0.4951248",
"0.49510124",
"0.4947678",
"0.49424264",
"0.49394688",
"0.49361333",
"0.49350008",
"0.49327317",
"0.49163905",
"0.49136564",
"0.49130037",
"0.49116454",
"0.49046212"
] | 0.49513763 | 87 |
Finds user by [[email]] | public function getUser()
{
if ($this->_user === false) {
$this->_user = User::findByUsername($this->email);
}
return $this->_user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findUserByEmail($email);",
"public function findUserByEmail($email);",
"public function findUserByEmail($email);",
"function get_user_by_email($email)\n {\n }",
"public function getUserByEmail($email);",
"public function fetchUserByEmail($email);",
"public static function findUserbyEmail($email)\r\n {\r\n\t\t $tableName = preg_replace('/.*\\\\\\\\/', '', get_called_class());\r\n\t\t $sql = 'SELECT * FROM ' . $tableName . ' WHERE email = ?';\r\n \r\n //grab the only record for find one and return as an object\r\n $recordsSet = self::getResults($sql, self::$modelName, $email);\r\n \r\n if (is_null($recordsSet)) {\r\n return FALSE;\r\n } else {\r\n return $recordsSet[0];\r\n }\r\n }",
"public function getUser($email);",
"public function findUserByEmail($email)\n {\n return $this->findOneBy(array('email' => $email));\n }",
"public function searchUserByMail($email)\n {\n $reqmail = $this->db->prepare(\"SELECT * FROM users WHERE email = ?\");\n $reqmail->execute(array($email));\n $user = $reqmail->fetchAll(PDO::FETCH_CLASS, User::class);\n\n return $user[0];\n }",
"public function findUser($email = null)\n {\n if(!$email){\n\n throw new Exception(__METHOD__ .\": Parameter {$email} should have email address.\");\n }\n\n $param = ['email' => esc($email), 'table' => 'Users'];\n\n $this->query->get($param['table'], \"email ='{$param['email']}'\");\n\n return $this->query->first();\n }",
"public function findByEmail($email);",
"public function findByEmail($email);",
"public function findByEmail($email);",
"public function findByEmail($email);",
"private function getUserByEmail($email) {\n\n\t\t$query = array('email' => $email);\n\t\ttry {\n\t\t\t$found = $this->collection->findOne($query, array('_id', 'password', 'logintokens'));\n\t\t} catch (Exception $e) {\n\t\t\tdumper($e->getMessage());\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $found;\n\t}",
"public function findUserByEmail($email)\n {\n return $this->userRepo->where(['email_company' => $email])->first();\n }",
"public function getUserByEmail($email) {\n //create user query by email\n $user_query_by_email = Doctrine_Query::create()\n ->select('sgu.id')\n ->from('sfGuardUser sgu')\n ->where('sgu.email_address =?', $email);\n return $user_query_by_email->fetchOne();\n }",
"public function findUserByEmail($email)\n {\n return $this->user->email($email)->fist();\n }",
"public function findUserByEmail($email) {\n /** @var User $user */\n $user = $this->findOneBy([\"email\" => $email]);\n return $user;\n }",
"public function getUserByEmail($email){\n \n if (filter_var($email, FILTER_VALIDATE_EMAIL)){\n \n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario',array(\n ':email_usuario'=>$email));\n \n if($res==false || count($res)==0){\n return 0;//caso NADA ENCONTRADO\n }else{\n return $res[0];//retorna array associativo com dados do usuario\n }\n\n }else{\n return false;//RETORNA FALSO (EMAIL INVÁLIDO)\n }\n \n }",
"public static function findUser($email)\n {\n $db = DB::getConnection();\n $query = ('SELECT * FROM `users` WHERE `username` = \"'.$email.'\" LIMIT 1');\n $res = $db->query($query);\n if ($db->affected_rows === 0){\n return false;\n }\n return $res->fetch_assoc();\n\n }",
"public function find_user_with_email($email)\n {\n $result = array(\n \"status\" => \"\",\n \"body\" => array(),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM users WHERE email LIKE ?\");\n if (!($stmt))\n {\n trigger_error(\"Prepare failed: (\" . $this->db->errno . \") \" . $this->db->error,\n E_USER_ERROR);\n }\n if (!$stmt->bind_param('s', $email)){\n trigger_error(\"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_ERROR);\n }\n if (!$stmt->execute()) {\n trigger_error(\"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_CORE_ERROR);\n $result['status'] = \"No user with that email exists\";\n $result[\"error\"] = $stmt->error;\n }\n $res = $stmt->get_result();\n $row = $res->fetch_assoc();\n if ($row[\"id\"] != null){\n $result[\"status\"] = \"Query successful\";\n $result[\"body\"] = array(\n \"user\" => array(\n \"id\" => $row[\"id\"],\n \"url\" => $row[\"url\"],\n \"username\" => $row[\"username\"],\n \"email\" => $row[\"email\"],\n \"first_name\" => $row[\"firstName\"],\n \"last_name\" => $row[\"lastName\"],\n \"full_name\" => $row[\"fullName\"],\n \"bio\" => $row[\"bio\"],\n \"is_admin\" => $row[\"isAdmin\"],\n \"password\" => $row[\"password\"],\n \"created\" => $row[\"created\"],\n \"last_updated\" => $row[\"lastUpdated\"]\n )\n );\n return $result;\n } else {\n $result['status'] = \"No user with that email exists\";\n }\n return $result;\n }",
"public function findUserByEmail($email) {\r\n // rufe die Funktion query('SQL Statement') in der Klasse Database auf\r\n $this->db->query('SELECT * FROM users WHERE email = :email');\r\n $this->db->bind(':email', $email);\r\n \r\n //es sollte nur eine uebereinstiende Mail geben, also single() methode nuzzen\r\n $row = $this->db->singleResult();\r\n\r\n // Check row, if > 0 an email is found\r\n if($this->db->numRows() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function findUserByEmail($email){\n // Query the database with a named variable.\n $this->db->query('SELECT * FROM users WHERE email = :email');\n\n // Bind a value to that variable, based on the input to this function.\n $this->db->bind(':email', $email);\n\n // Run a query for a single row.\n $row = $this->db->single();\n\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n\n }",
"public function findUserByEmail($email){\n $this->db->query('SELECT * FROM users WHERE us_email = :email');\n // Bind values\n $this->db->bind(':email', $email);\n $row = $this->db->single();\n // Check row returned\n if($this->db->rowCount() > 0) {\n return $row;\n } else {\n return false;\n }\n }",
"public function getByEmail(string $email): User;",
"function get_user_by_email($email) {\n // read db and put into variable\n $read_json = file_get_contents(__DIR__ . '/data_users.json');\n $data = json_decode($read_json, JSON_OBJECT_AS_ARRAY);\n\n // iterate over db, if email is found, return user\n foreach ($data as $user){\n if ($user[\"email\"] == $email){\n return $user;\n }\n }\n return false;\n}",
"public function findUserByEmail($email)\n {\n return User::where('email', $email)->first();\n }",
"public function searchUserByEmail($email)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT id FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetchColumn();\n return $result;\n }",
"public function findUserByEmail($email){\r\n $this->db->query('SELECT * FROM user_request WHERE email = :email');\r\n // Bind value\r\n $this->db->bind(':email', $email);\r\n\r\n $row = $this->db->single();\r\n\r\n // Check row\r\n if($this->db->rowCount() > 0){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function searchUser($email) {\r\n\r\n\t\t//TODO: Look at bookmark class for sample try/catch block around DB code\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$found = FALSE;\r\n\r\n\t\t$query = \"SELECT * FROM `user_credentials` WHERE `email`='$email'\";\r\n\r\n\t\ttry {\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$resultset = $sqlObj->GetData();\r\n\r\n\t\t\t$num = $sqlObj->getNumberOfRecords();\r\n\t\t} catch (MyException $e) {\r\n\t\t\t$e->getMyExceptionMessage();\r\n\t\t}\r\n\t\tif ($num == 1) {\r\n\t\t\t$id = $resultset[0]['id'];\r\n\t\t\t$found = $id;\r\n\t\t} else {\r\n\t\t\t$found = -1;\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\r\n\t\treturn $found;\r\n\t}",
"public function find_user_by_email($email){\n\n $arr = [\n \"s\", [$email]\n ];\n\n $sql = \"SELECT * FROM users where email=? LIMIT 1;\";\n\n $result = $this->db->prepare_statement_query($sql, $arr);\n\n return $result->num_rows > 0 ? true : false;\n\n }",
"function getByEmail($email);",
"function people_findByEmail($find_email) {\n $response = $this->execute(array('method' => 'flickr.people.findByEmail', 'find_email' => $find_email));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['user']['nsid'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}",
"public static function findUserByEmail($email)\n {\n return static::find()->where(['email' => $email])->one();\n }",
"public static function findByEmail($email){\n\n $sql=\"SELECT * FROM user WHERE email=:email\";\n $stmt=static::getDB()->prepare($sql);\n $stmt->bindValue(\":email\",$email,PDO::PARAM_STR);\n // FETCH_CLASS sẽ thực thi xong rồi mới chạy __constructer\n $stmt->setFetchMode(PDO::FETCH_OBJ);\n $stmt->execute();\n $count=$stmt->rowCount();\n // if($count !=1){\n // echo 'User with that email does not exist';\n // return false;\n // }\n return $stmt->fetch(); \n }",
"public function findUserByEmail($email)\r\n {\r\n $user = $this->DB->fetchAssoc('select * from user where email = ?',array($email));\r\n $user = $this->reformatUserData($user);\r\n return $user;\r\n }",
"public static function findByEmail($email){\n\t\t$sql = 'SELECT * FROM users WHERE email = :email';\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindParam(':email', $email, PDO::PARAM_STR);\n\t\t//$stmt->setFetchMode(PDO::FETCH_CLASS, 'App\\Models\\User');\n\t\t$stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\t\t$stmt->execute();\n\t\t//PDO::fetch() returns false if no record is found\n\t\treturn $stmt->fetch();\n\t}",
"public function get_user_by_email($arg){\n\n return $this->db->query(\"SELECT * FROM admins WHERE email= ?\", $arg)->row_array();\n \n }",
"public static function find($email){\n\t\t\t//preparo la query para buscarlo\n\t\t\t$sql='SELECT * FROM users WHERE email = :email';\n\t\t\t$stmt=DB::getcon()->prepare($sql);\n\t\t\t$stmt->bindValue(':email',$email,PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\n\t\t\t$result=$stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t\t//creo un usuario en blanco al cual lo voy a completar con lo que encontré en la DB\n\t\t\t$usuario=new Usuario('','','','');\n\t\t\t$usuario->toUser($result);\n\t\t\treturn $usuario;\n\t\t}",
"public function findByEmail($email){\n try {\n $connection = Connection::getConnection();\n $sql = \"select * from \\\"user\\\" where email = :email\";\n $stmt = $connection->prepare($sql);\n $stmt->bindValue(\":email\", $email);\n $result = $stmt->execute();\n $result = $stmt->fetchAll();\n if ($result) {\n $result = $result[0];\n return new UserModel(\n $result['id'],\n $result['name'],\n $result['gender'],\n $result['email'],\n $result['status'],\n $result['type'],\n $result['photo']\n );\n } else {\n return null;\n }\n } catch (\\Exception $ex) {\n throw $ex;\n } finally {\n $connection = null;\n } \n }",
"public function getUserByEmail($email=NULL)\n\t{\n\t\t$result = Yii::app()->db->createCommand()\n \t->select('*')\n \t->from($this->tableName())\n \t \t->where('loginId=:loginId', array(':loginId'=>$email))\t\n \t \t->queryRow();\n\t\t\n\t\treturn $result;\n\t}",
"public function getUserByEmail($email)\n {\n return $this->model->where('email', $email)->first();\n }",
"public function findUserByMail(string $email)\n {\n $users = $this->doctrine->getUserRepository()->findBy(['email' => $email]);\n\n if ($user = reset($users)) {\n return $user;\n }\n\n return null;\n }",
"public function getUserByEmail()\n {\n $db = init_db();\n $req = $db->prepare(\"SELECT * FROM user WHERE email = ?\");\n $req->execute(array($this->getEmail()));\n $db = null;\n\n return $req->fetch();\n }",
"public function getByEmail($email) {\n\n\t\t// get database\n\t\t$db = $this->app->database;\n\n\t\t// search email\n\t\tif ($id = $db->queryResult('SELECT id FROM #__users WHERE email = '.$db->Quote($email))) {\n\t\t\treturn $this->get($id);\n\t\t}\n\n\t\treturn null;\n\t}",
"public function findFirstUserByEmail(string $email)\n {\n return User::findFirst([\n 'conditions' => 'email LIKE :email:',\n 'bind' => ['email' => $email]\n ]);\n }",
"public function loadUserByEmail($email)\n { \n $user = $this->_em->getRepository('Entity\\User\\User')->findOneBy(array('email' => $email));\n\n if($user != null)\n return $user;\n\n throw new UsernameNotFoundException(\"Compte introuvable\");\n }",
"public function findUserByEmail($email){\n $this->db->query('SELECT * FROM users WHERE email = :email');\n\n // Bind value\n $this->db->bind(':email', $email);\n\n $row = $this->db->single();\n\n // Check row\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n }",
"public function getByEmail(Email $email): User\n {\n }",
"public function retrieveUserByEmail($email)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlParameter(\"email\", $email)\n ->get()\n ->go();\n }",
"public function findNameByEmail($email){\n\n\t\t$stmt = $this->db->prepare(\"SELECT * FROM users WHERE email=?\");\n\t\t$stmt->execute(array($email));\n\t\t$user = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\tif($user != null) {\n\n\t\t\treturn new User(\n\t\t\t$user[\"email\"],\n\t\t\t$user[\"completeName\"]);\n\t\t} \n\t\telse {\n\t\t\treturn NULL;\n\t\t}\n\t}",
"public function selectUserByEmail($email)\n {\n $result = $this->sdb->query(\"select id from appuser where lower(email) = lower($1) limit 1\",\n array($email));\n $row = $this->sdb->fetchrow($result);\n if ($row && array_key_exists('id', $row))\n {\n /*\n * Call selectUserByID() to avoid all copy/paste code.\n */\n $rec = $this->selectUserByID($row['id']);\n return $rec;\n }\n return false;\n }",
"public function get_user($email){\n\t\t$email_md5_hash = md5($email); \n\t\t$endpoint = '/lists/'. LIST_ID . '/members/'. $email_md5_hash;\n\t\t$result = $this->mc->get($endpoint);\n\t\tif($result['status'] == '404'){\n\t\t\tprint 'user does not exist';\n\t\t}else{\n\t\t\tprint '<pre>'; print_r($result); print '</pre>';\n\t\t}\n\t\t\n\t}",
"function getuser($email)\n\t\t{\n\t\t\t$email = \"'\".$email.\"'\";\n\t\t\t$sql = $this->conn_id->query(\"select * from users where email = \".$email );\n\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\treturn $r;\n\t\t}",
"public static function findByUsername($email)\n {\n return static::findOne(['email' => $email]);\n }",
"public function find_by_email($email)\n\t{\n\t\treturn $this->where('email', $email)->find();\n\t}",
"public function findUserByEmail($email)\n {\n $result = $this->createQueryBuilder('user')\n ->where('user.email = :email')\n ->setParameter('email', $email)\n ->getQuery()\n ->getResult()\n ;\n\n if (empty($result)) {\n return;\n }\n\n return $result[0];\n }",
"public function getUserByEmail($email) {\r\n $query = $this->db->limit(1)\r\n ->get_where(USERS, array('email' => $email));\r\n return $query->row();\r\n }",
"function getByEmail($email){\n\t\t}",
"public static function getUserByEmail($email)\n\t{\n\t\tif (!$email) return false;\n\t\treturn self::_getDao()->getBy(array('email' => $email));\n\t}",
"public function findUserByEmail($email)\n {\n $this->db->query('SELECT * FROM studentdetails WHERE email = :email');\n $this->db->bind(':email', $email);\n\n $row = $this->db->single();\n\n // Check row\n if ($this->db->rowCount() > 0) {\n return true;\n } else {\n // die(\"asa\");\n return false;\n }\n }",
"public function user_get_by_email($email)\n {\n $query = \"SELECT *\n FROM \" . $this->db_table_prefix . \"users where email='\".$email.\"'\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }",
"public function getUserByEmail($email) {\r\n $result = mysqli_query($this->con,\"SELECT * FROM users WHERE email ='$email'\") ;\r\n // check for result \r\n $no_of_rows = mysqli_num_rows($result);\r\n if ($no_of_rows > 0) {\r\n $result = mysqli_fetch_array($result);\r\n \r\n return $result;\r\n \r\n } else {\r\n // user not found\r\n return false;\r\n }\r\n }",
"public function getUserByEmail($email) {\n return $this->db->select(\"id,password,token\")->where(\"email\", $email)->get(\"users\");\n }",
"public function findByEmail($email) {\n\t\t$query = $this->createQuery();\n\t\treturn $query->matching($query->equals('email', $email))\n\t\t->execute()->getFirst();\n\t}",
"public function user_get_by_useremail($email)\n {\n $query = \"SELECT *\n FROM \" . $this->db_table_prefix . \"users where email='\".$email.\"'\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }",
"public function getByEmail($email)\n {\n $db = DBConnection::getConnection();\n\n $query = \"SELECT * FROM users\n WHERE email = ?\";\n $stmt = $db->prepare($query);\n $stmt->execute([$email]);\n\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n \n $user = new self;\n $user->id = $row['id'];\n $user->user = $row['user'];\n $user->name = $row['name'];\n $user->surname = $row['surname'];\n $user->email = $row['email'];\n $user->password = $row['password'];\n $user->biography = $row['biography'];\n $user->created_at = $row['created_at'];\n\n return $user;\n }\n return null;\n }",
"public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT name, email, api_key, created_at FROM app_users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n if ($stmt->execute()) {\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }",
"public function retrieveUser ($email) {\n return $this->usersDB->retrieve($email);\n }",
"public function getUserByEmail($email)\n {\n $options = [\n 'search_engine' => 'v2',\n 'q' => \"email.raw:\".$email\n ];\n $users = $this->getManagement()->users->getAll($options);\n return empty($users) ? null : $users[0];\n }",
"function find_by_email($h, $email ){\n \n $sql = \"SELECT * FROM \" . TABLE_USERS . \" WHERE user_email=%s LIMIT 1\";\n $query = $h->db->prepare($sql, $email);\n \n\treturn $parents = $h->db->get_results($query);; \n }",
"public static function findByEmail($email) {\n $stmt = self::getDB()->prepare(\"SELECT * FROM `user` WHERE `email` = :email;\");\n $stmt->execute([':email' => $email]);\n return $stmt->fetchObject(self::class);\n }",
"function getUserByEmail($email)\n\t{\n\t \n\t\t$stmt = $this->con->prepare(\"SELECT id, username, email, nik, apikey, isuser, isspv, isadmin FROM users WHERE email = ?\");\n\t\t\n\t\t$stmt->bind_param(\"s\", $email);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $username, $email, $nik, $apikey, $isuser, $isspv, $isadmin);\n\t\t$stmt->fetch();\n\t\t\n\t\t\n\t\t$user = array();\n\t\t$user[\"id\"] = $id;\n\t\t$user[\"username\"] = $username;\n\t\t$user[\"email\"] = $email;\n\t\t$user[\"nik\"] = $nik;\n\t\t$user[\"apikey\"] = $apikey;\n\t\t$user[\"isuser\"] = $isuser;\n\t\t$user[\"isspv\"] = $isspv;\n\t\t$user[\"isadmin\"] = $isadmin;\n\t\treturn $user;\n\t\t\n\t}",
"public function getByEmail($email) {\n //Requête d'un objet user à partir de son email\n $reqEmail = $this->db->prepare(\"\n SELECT id, firstname, lastname, pseudo, email, password, level_id \n FROM user WHERE email=:email\n \");\n\n $reqEmail->execute(array(\n 'email' => $email,\n ));\n \n $data = $reqEmail->fetch(PDO::FETCH_ASSOC);\n\n if ($data) {\n \n return new User($data);\n }\n return $data;\n }",
"public function getUserByEmail($email)\n {\n $this->db->query('SELECT * FROM user WHERE email = :email');\n $this->db->bind(':email', $email);\n $row = $this->db->single();\n return $row;\n }",
"public function getUserByEmail($email)\n {\n return $this->getUserByIdentity(['email' => $email]);\n }",
"public function getUsersByEmail($email)\n\t{\n\t\tself::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * \n \t\t\tFROM users\n \t\t\tWHERE users.email LIKE ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n\t\t\t\n $this->query->execute(array('%' . $email . '%'));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n\t}",
"public function findEmail($email = \"[email protected]\") {\n\t\t$users = $this->em->createQuery ( \" SELECT PARTIAL u.{id} FROM App\\Entity\\User u WHERE u.email = ?1 \" )->setParameter ( 1, $email )->execute ();\n\t\treturn count ( $users );\n\t}",
"public function getUserByEmail($email): ?Sh4bangUserInterface\r\n {\r\n $userRepository = $this->entityManager->getRepository(User::class);\r\n $user = $userRepository->findOneBy(['email' => $email]);\r\n\r\n return $user;\r\n }",
"public function lookForUserByEmail($email)\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT email FROM users WHERE email = ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n $this->query->execute(array($email));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n return $this->result;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }",
"public function findUserByUsernameOrEmail($usernameOrEmail);",
"public function findUserByUsernameOrEmail($usernameOrEmail);",
"public function findUserByUsernameOrEmail($usernameOrEmail);",
"public function findUser($username, $email)\n {\n $sql = \"SELECT * FROM user WHERE username = :username AND email = :email\";\n $this->setSql($sql);\n $user = $this->getRow(array($username, $email));\n return ($user) ? $user : false;\n }",
"function selectUserByEmail($email) {\n $connection = openDb();\n $email = escape($email, $connection);\n\n //Using prepared statements and parameterized queries:\n $sql = \"SELECT * FROM users WHERE EMAIL = ? AND DATE_APPROVED IS NOT NULL\";\n $stmt = $connection->stmt_init();\n if(!$stmt->prepare($sql)) {\n return false;\n }\n $stmt->bind_param(\"s\",$email);\n\n return executeQueryPrepared($stmt, $connection, true);\n}",
"public static function getByEMAIL($email) {\n $str = \"\n SELECT id, firstName, lastName, email, password\n FROM indPrj_persons\n WHERE email ='\" . $email . \"'\";\n \n return mysql_fetch_array(Database::query($str));\n }",
"function get_user_by_email($email)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `email`='$email'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}",
"function query_select_user_by_email($email) {\n global $connection;\n\n //prep values\n $email = mysqli_real_escape_string($connection, $email);\n //$role = mysqli_real_escape_string($connection, $role);\n\n //construct query\n $query = \"SELECT * FROM user WHERE email='{$email}' LIMIT 1\";\n\n //execute query\n $result = mysqli_query($connection, $query);\n\n if($result) {\n return mysqli_fetch_assoc($result);\n } else {\n return 0;\n }\n}",
"public function findByEmail($email)\n {\n $filters = array();\n $filters[] = array('key' => 'email', 'operator' => '=', 'value' => $email);\n $user = CustomerioUser::get($filters, 1);\n return empty($user['objects']) ? array() : $user['objects'][0];\n }",
"public function get_user($email){\n $query = $this->db->get_where('users', array('user_email'=> $email));\n $result = $query->result_array();\n return $result;\n\n }",
"function getUser($email) {\r\n\t\t\tif (is_numeric($email))\r\n\t\t\t\t$sql = \"SELECT users.user_id, users.student_id, users.email, users.password, users.society_id, users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id AND user_id=%s\";\r\n\t\t\telse\r\n\t\t\t\t$sql = \"SELECT users.user_id, users.student_id, users.email, users.password, users.society_id, users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id AND UPPER(users.email)=UPPER('%s')\";\r\n\t\t\t$result = $this->query($sql, $email);\r\n\t\t\tif (mysql_num_rows($result) == 0) return false;\r\n\t\t\treturn mysql_fetch_object($result);\r\n\t\t}",
"public function get_byemail($email=NULL) {\n\t\tif ($email != NULL):\n\t\t\t$this->db->where('email', $email);\n\t\t\t$this->db->limit(1);\n\t\t\treturn $this->db->get('usuarios');\n\t\telse:\n\t\t\treturn FALSE;\n\t\tendif;\n\t}",
"public function getByEmail($email)\n {\n $user = $this->userModel->where('email', $email)->first();\n return $user;\n }",
"public function getUserByEmail($email)\n\t{\n\t\t$userIndex = $this->getUserIndex();\n\t\t$userNode = $userIndex->findOne('email', $email);\n\t\tif (!$userNode) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new User($userNode);\n\t}",
"public static function findByEmail($email)\n {\n $user = self::find()->where(['email'=>$email])->one();\n return $user;\n }",
"public function emailExists($email) {\n\n return $this->getEntityManager()\n ->getRepository('Alt68\\Entities\\User')\n ->findOneBy(array('email' => $email));\n }",
"public static function requestUserByEmail($email)\n {\n return UserModel::getUserByEmail($email);\n }",
"public function getUserByEmail($email)\n {\n $sql = \"SELECT * FROM admin_user WHERE email=:email\";\n\n return $this->_rdb->fetchRow($sql, array('email' => $email));\n }",
"public function getUserByEmail($email)\n {\n return $this->user->userByEmail($email);\n }"
] | [
"0.8166407",
"0.8166407",
"0.8166407",
"0.8038051",
"0.801395",
"0.7942375",
"0.7921375",
"0.78417",
"0.78288645",
"0.7686924",
"0.7680421",
"0.7669739",
"0.7669739",
"0.7669739",
"0.7669739",
"0.76563156",
"0.7625273",
"0.7598056",
"0.7595499",
"0.75875545",
"0.7578652",
"0.7559837",
"0.75287217",
"0.7518726",
"0.75078017",
"0.7482086",
"0.74661094",
"0.7456296",
"0.74547446",
"0.74424696",
"0.7430598",
"0.7426737",
"0.7424853",
"0.74235207",
"0.7421422",
"0.7418312",
"0.7415166",
"0.73997223",
"0.7393287",
"0.73811835",
"0.7367253",
"0.73482513",
"0.73408824",
"0.73397416",
"0.7337867",
"0.7328074",
"0.73231584",
"0.7315115",
"0.73145306",
"0.7312506",
"0.7281275",
"0.7277796",
"0.72662365",
"0.7262578",
"0.72609556",
"0.7239041",
"0.7235626",
"0.72290015",
"0.7207421",
"0.72057694",
"0.7205578",
"0.7183145",
"0.7181178",
"0.71772707",
"0.7170259",
"0.71582085",
"0.71536505",
"0.71393967",
"0.71260667",
"0.71258366",
"0.7123181",
"0.7109725",
"0.7105495",
"0.71053034",
"0.7103197",
"0.70757765",
"0.7073089",
"0.7069637",
"0.7062807",
"0.7054822",
"0.7031239",
"0.70290816",
"0.6992122",
"0.6992122",
"0.6992122",
"0.69913596",
"0.69836116",
"0.6982403",
"0.6977621",
"0.6968703",
"0.69606286",
"0.6959992",
"0.6959235",
"0.69534487",
"0.69506174",
"0.69469976",
"0.6942091",
"0.6941965",
"0.6941775",
"0.6937981",
"0.6937717"
] | 0.0 | -1 |
historial de usuario cargar data | function push_historial($usuario, $operacion){
$fecha = Carbon::now();
$so = getOS();
$host = gethostname();
$ip = \Request::ip();
\DB::table('historials')
->insert(
array(
'ip' => $ip,
'so' => $host,
'operacion' => $operacion,
'fecha' => $fecha,
'user_id' => $usuario,
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetAllHistorique() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT h.*,u.nom, u.prenom, u.login, u.photo FROM historique h INNER JOIN user u ON h.idUser = u.idUser AND h.idSociete = :idSociete order by h.dateAction DESC\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n }",
"public function GetAllNoneSeenHistorique() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT h.*,u.nom, u.prenom, u.login, u.photo FROM historique h INNER JOIN user u ON h.idUser = u.idUser AND h.idSociete = :idSociete AND h.vue = 0 order by h.dateAction DESC\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n }",
"public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation aux champs de l'objet UserTab \r\n\t\t\t}\r\n\t\t }\r\n\r\n\t }",
"function listar_historial(){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\n\t\t$sql=\"SELECT * FROM historial ORDER BY id_his\";\n\t\t\n\t\t$consulta=mysql_query($sql);\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}",
"private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}",
"public function indexHistorialEstudiante()\n { \n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n if($resultado != 1 || $rolActual != 4){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValuesEstudiante($idActual[0][0]); //carga el index con todas las solicitudes del estudiante actualmente logueado \n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }",
"function Historial($modulo)\n{\n $sector = \"\";\n $grado = \"\";\n $institucion = \"\";\n $modulo = $modulo;\n\n $usuario = new Usuario();\n $usuario->setIdUsuario($_SESSION[\"ID_Usuario\"]);\n $sector = $usuario->getSector();\n\n /**\n * Dependiendo el secto se obtendra cierta informacion\n */\n switch ($sector) {\n case 'Educativo':\n $grado = $usuario->getGrado();\n $institucion = $usuario->getEscuela();\n break;\n case 'Público':\n $institucion = $usuario->getPublico();\n break;\n case 'Privado':\n $institucion = $usuario->getPrivado();\n break;\n }\n $consulta = new Consulta();\n $consulta->setSector($sector);\n $consulta->setGrado($grado);\n $consulta->setInstitucion($institucion);\n $consulta->setModulo($modulo);\n $consulta->Insert();\n}",
"public function cargarUsuario(){\n $query = \"SELECT nombre, apellido, sexo, DATE_FORMAT(fecha_nac, '%d/%m/%Y') AS fecha_nac, correo FROM usuario WHERE codUsuario = \".parent::string($this->getCodUsuario()).\";\";\n $result = mysqli_query(parent::conexion(), $query);\n $arreglo = null;\n\n if(!$result){\n \t\tdie(\"Error\");\n } else{\n while($data = mysqli_fetch_assoc($result)){\n $arreglo[] = $data;\n \t\t }\n }\n\n parent::desconectar();\n return json_encode($arreglo);\n }",
"public static function paginado_usuario(){\n\t\t $page = 1; //inicializamos la variable $page a 1 por default\n\t\t if(array_key_exists('pg', $_GET)){\n\t\t $page = $_GET['pg']; //si el valor pg existe en nuestra url, significa que estamos en una pagina en especifico.\n\t\t }\n\t\t //ahora que tenemos en que pagina estamos obtengamos los resultados:\n\t\t // a) el numero de registros en la tabla\n\t\t $mysqli = new mysqli(\"localhost\",\"root\",\"slam2018\",\"corgran\");\n\t\t if ($mysqli->connect_errno) {\n\t\t\t\tprintf(\"Connect failed: %s\\n\", $mysqli->connect_error);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t $conteo_query = $mysqli->query(\"SELECT COUNT(*) as conteo FROM usuarios\");\n\t\t $conteo = \"\";\n\t\t if($conteo_query){\n\t\t \twhile($obj = $conteo_query->fetch_object()){ \n\t\t \t \t$conteo =$obj->conteo; \n\t\t \t}\n\t\t }\n\t\t $conteo_query->close(); \n\t\t unset($obj); \n \t\t\n\t\t //ahora dividimos el conteo por el numero de registros que queremos por pagina.\n\t\t $max_num_paginas = intval($conteo/10); //en esto caso 10\n\t\t\t\n\t\t // ahora obtenemos el segmento paginado que corresponde a esta pagina\n\t\t $segmento = $mysqli->query(\"SELECT * FROM usuarios LIMIT \".(($page-1)*10).\", 10 \");\n $resultado=[];\n\t\t //ya tenemos el segmento, ahora le damos output.\n\t\t if($segmento){\n\t\t\t // echo '<table>';\n\t\t\t while($obj2 = $segmento->fetch_object())\n\t\t\t {\n\t\t\t \t$obj_usu = new usuario($obj2->id_usuario,$obj2->tipo_usu,$obj2->nombre,$obj2->clave);\n $resultado[]=$obj_usu;\n\t\t\t /* echo '<tr>\n\t\t\t <td>'.$obj2->id_usuario.'</td>\n\t\t\t <td>'.$obj2->tipo_usu.'</td>\n\t\t\t <td>'.$obj2->nombre.'</td>\n\t\t\t </tr>'; \n\t\t\t */ }\n\t\t\t // echo '</table><br/><br/>';\n\t\t\t}\n\t\n\t\t //ahora viene la parte importante, que es el paginado\n\t\t //recordemos que $max_num_paginas fue previamente calculado.\n\t\t for($i=0; $i<$max_num_paginas;$i++){\n\n\t\t echo '<a href=\"index.php?pg='.($i+1).'\">'.($i+1).'</a> | ';\n\t\t \n\t\t } \n\t\t echo '<div>-------------------------- PAginacion------------------------------------------------</div>'; \n return $resultado; \n \n }",
"public function getUsuarios(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraUsuarios\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM usuarios \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM usuarios LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}",
"protected function importData()\n\t{\n\t\tinclude_once \"Services/ADN/AD/classes/class.adnPersonalData.php\";\n\t\t$data = adnPersonalData::getData($this->filter, $this->mode);\n\t\t$this->setData($data);\n\t\t//$this->setMaxCount(sizeof($users));\n\t}",
"public function cargarVista()\n {\n session_start();\n // load views\n if ($_SESSION['tipeUser'] != 1) {\n\n header('location:'.URL.'Cuentas/access');\n exit();\n\n }else{\n $user = $this->model->cargarPaciente($_SESSION[\"idUser\"],$_SESSION['tipeUser']);\n foreach ($user as $value) {\n $this->model->setId_Paciente($value->id_paciente);\n $this->model->setNombre($value->primer_nombre.' '.$value->segundo_nombre);\n $this->model->setApellido($value->primer_apellido.' '.$value->segundo_apellido);\n $_SESSION['historia'] = $value->id_historia_clinica;\n }\n $_SESSION['userName'] = (\"Paciente : \".$this->model->getNombre(). ' ' .$this->model->getApellido());\n $_SESSION['idPaciente'] = $this->model->getId_Paciente();\n $_SESSION['userName'] = ($this->model->getNombre(). ' ' .$this->model->getApellido());\n $_SESSION['userHome'] = ($this->model->getUrl());\n \n }\n $paciente = $this->model->consultarPaciente($_SESSION['idPaciente']);\n foreach ($paciente as $item) \n {\n $this->model->setId_Paciente($item->id_paciente);\n $this->model->setNombre($item->primer_nombre.' '.$item->segundo_nombre);\n $this->model->setApellido($item->primer_apellido.' '.$item->segundo_apellido);\n $this->model->setTipo_Documento($item->tdocumento);\n $this->model->setDocumento($item->documento);\n $this->model->setGenero($item->genero);\n $this->model->setTelefono($item->telefono);\n $this->model->setEscolaridad($item->escolaridad);\n $this->model->setHistoria($item->historia);\n }\n $_SESSION['historia'] = $this->model->getHistoria();\n $_SESSION['documento'] = $this->model->getDocumento();\n\n }",
"private function cargarDatosValores(){\n\n\t\t$colaboradores = $this->user_model->getPagination(null);\n\n\t\tforeach ($colaboradores as $colaborador){\n\t\t\t\n\t\t\t$this->valores_model->create_actividades_mes($colaborador->id,1);\n\t\t\t\t$this->valores_model->create_actividades_mes($colaborador->id,2);\n\t\t\t\t\t$this->valores_model->create_actividades_mes($colaborador->id,3);\n\t\t\t\t\t\t$this->valores_model->create_actividades_mes($colaborador->id,4);\n\t\t\t\t\t\t\t$this->valores_model->create_actividades_mes($colaborador->id,5);\n\t\t\t\t\t\t\t\t$this->valores_model->create_actividades_mes($colaborador->id,6);\n\t\t}\n\t}",
"public function accionIndex(){\n \n if(!Sistema::app()->acceso()->hayUsuario()){\n Sistema::app()->paginaError(400,\"Solos los usuarios registrados pueden acceder\");\n exit;\n }\n\n //llega el pase de la pelicula\n $codPase = intval($_GET[\"id\"]);\n \n //obtener las entradas compradas para ese pase, esa pelicula y esa hora\n $entUsuarios = new Entradas_usuarios();\n $pasePelicula = new Pases_peliculas();\n $sala = new Salas();\n $asientos = new Asientos();\n $entAnonimos = new Entradas_anonimos();\n \n \n $pasePelicula->buscarPorId($codPase);//CONTROLAR QUE EXISTE.\n //CONTROLAR TAMBIEN SI HA CADUCADO.\n \n //obtengo la sala donde se proyecta ese pase\n $sala->buscarPorId($pasePelicula->cod_sala);\n \n \n $opFil[\"select\"] = \"cod_asiento, fila, columna\";\n $opFil[\"where\"] = \"t.cod_sala =\".$pasePelicula->cod_sala;\n $opFil[\"order by\"] = \"fila, columna\";\n \n $totalAsientos = $asientos->buscarTodos($opFil);\n \n //tengo todos las entradas para ese pase.\n $opFiltrado[\"where\"] = \"t.cod_pase_pelicula = \".$codPase;\n $entradasUsu = $entUsuarios->buscarTodos($opFiltrado);\n $entradasAnon = $entAnonimos->buscarTodos($opFiltrado);\n \n $filas = $sala->n_filas;\n $columnas = $sala->n_columnas;\n $capacidad = $sala->capacidad;\n \n \n $asientosOcupados = [];\n \n //Si no hay entradas compreadas para este pase, no se ejecuta ---\n \n if(!empty($entradasUsu)||!empty($entradasAnon)){\n $asientosOcupados = $this->asientosOcupados($entradasUsu, $entradasAnon);\n }\n \n //if(!empty($entradasAnonimos)){\n // $asientosOcupados2 = $this->asientosOcupados($entradasAnonimos);\n // var_dump($asientosOcupados2);\n //}\n \n if(isset($_POST[\"butacas\"])){\n \n //llega el imput que almacena en un string creado en js\n //con un string con todos los asientos seleccionados\n $asientosSel = explode(\",\", $_POST[\"butacas\"]);\n \n Sistema::app()->sesion()->set(\"butacas\",$asientosSel);\n Sistema::app()->sesion()->set(\"codPase\",$codPase);\n \n Sistema::app()->irAPagina(array(\"entradasUsuarios\",\"mostrarResumen\"));\n exit;\n }\n \n \n $this->dibujaVista(\"mostrarCine\",array(\"asientosOcupados\"=>$asientosOcupados,\n \"filas\"=>$filas,\n \"cols\"=>$columnas,\n \"codPase\"=>$codPase,\n \"codAsientos\"=>$totalAsientos\n ),\n \"CINES MELERO\");\n \n \n \n }",
"function recuperar_contrasenia()\n\t{\n\t\t$opt \t\t= $this->uri->segment(1);\n\t\t$op['opt'] \t\t= $this->data_model->cargarOptimizacion($opt);\n\n\t\t//validacion para identificar tipo de usuario y desglosar info\n\t\t$user\t\t\t\t= $this->session->userdata('user');\n\t\t$op['info']\t\t\t= array();\n\n\t\tif ($user['uid'] != '') {\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\n\t\t}\n\n\t\t//Vista//\n\t\t$this->load->view('recuperarContrasenia-view' ,$op);\n\t}",
"public function mostrarUsuarios($pag) {\n $this->cantidadMostrar = 10;\n $this->pagina = $pag;\n $this->cantidadTotalRegistros = $this->con->query(\"SELECT * FROM usuarios\");\n $this->redondeoFinal = ceil($this->cantidadTotalRegistros->num_rows/$this->cantidadMostrar);\n \n $this->consultaMostrar = \"SELECT * FROM usuarios ORDER BY idUsuario DESC LIMIT \".(($this->pagina-1)*$this->cantidadMostrar).\",\".$this->cantidadMostrar;\n $this->consulta= $this->con->query($this->consultaMostrar);\n \n //$this->consulta=$this->con->query(\"SELECT * FROM usuarios ORDER BY apellido ASC, nombre ASC\");\n $this->i=1;\n while($this->datos= $this->consulta->fetch_array()) {\n ?>\n <tr>\n <td>\n <b><?php echo $this->i;?></b>\n <img src=\"fotos/<?php echo $this->datos['idUsuario'];?>\" width=\"50px\"> \n </td>\n <td><?php echo $this->datos['apellido'].\", \".$this->datos['nombre'];?></td>\n <td><?php echo $this->datos['usuario'];?></td>\n <td><?php echo $this->datos['dni'];?></td>\n <td><?php echo $this->datos['edad'];?></td>\n <td><?php echo $this->datos['domicilio'].\", \".$this->datos['localidad'].\", \".$this->datos['provincia'].\", \".$this->datos['nacionalidad'];?></td>\n <td><?php echo $this->datos['telefono'];?></td>\n <td><?php echo $this->datos['email'];?></td>\n <td><?php echo $this->datos['sexo'];?></td>\n <td><?php echo $this->datos['privilegio'];?></td>\n <td>\n <div class=\"row\">\n <a class=\"btn btn-success btn-sm\" href=\"formmodificar.php?idUsuario=<?php echo $this->datos['idUsuario'];?>\"><i class=\"material-icons\">create</i></a>\n <a class=\"btn btn-danger btn-sm\" onclick=\"return confirm('¿Desea eliminar este registro?')\" href=\"formeliminar.php?idUsuario=<?php echo $this->datos['idUsuario'];?>\"><i class=\"material-icons\">delete</i></a>\n </div>\n </td>\n </tr> \n <?php \n $this->i++; \n \n }\n ?>\n <tr>\n <td colspan=\"12\" class=\"text-center\">\n <nav>\n <ul class=\"pagination\">\n <li <?php if($this->pagina==1) {echo \"class='disabled'\";} ?> ><a href=\"index.php?pagina=1\"><i class=\"material-icons\">chevron_left</i></a></li>\n <?php \n for($this->j=1; $this->j<= $this->redondeoFinal; $this->j++) {\n ?>\n <li <?php if($this->pagina== $this->j){echo \"class='active'\";} ?>>\n <a class=\"waves-effect\" href=\"index.php?pagina=<?php echo $this->j; ?>\"><?php echo $this->j; ?></a>\n </li>\n <?php\n } \n ?>\n <li <?php if($this->pagina==($this->j-1)) {echo \"class='disabled'\";} ?> >\n <a href=\"index.php?<?php echo $this->j-1 ;?>\"><i class=\"material-icons\">chevron_right</i></a>\n </li> \n </ul>\n </nav>\n </td>\n </tr> \n <?php \n $this->con->close();\n }",
"public function buscarUsuarios(){\n\t\t}",
"private function usuarios(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"GET\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t}//es una petición GET\n\t\t//se realiza la consulta a la bd\n\t\t$query = $this->_conn->query(\n\t\t\t\"SELECT id, nombre, email \n\t\t\t FROM usuario\");\n\t\t//cantidad de usuarios\n\t\t$filas = $query->fetchAll(PDO::FETCH_ASSOC); \n \t$num = count($filas);\n \t//si devolvio un resultado, se envia al cliente\n \tif ($num > 0) { \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['usuarios'] = $filas; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } //se envia un error \n\t $this->mostrarRespuesta($this->devolverError(2), 204);\n\t}",
"private function cargarDatosFacebook()\n\t{\n\t\t$this->datosFacebook = null;\n\t\t$facebook = new Facebook(FacebookConfig::ObtenerConfiguracionAplicacion());\n\t\t$idUsuarioActivo = $facebook->getUser();\n\t\tif($idUsuarioActivo != 0 && $idUsuarioActivo == $this->IdFacebook)\n\t\t$this->accessToken = $facebook->getAccessToken();\n\t\tif($this->IdFacebook)\n\t\t$this->datosFacebook = $this->ApiAuth(\"/$this->IdFacebook\");\n\t}",
"function cl_db_usuariosrhlota() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_usuariosrhlota\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function listar_historial_pedido($id){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\n\t\t$sql=\"SELECT * FROM historial WHERE pertenece_his='$id' ORDER BY id_his ASC\";\n\t\t\n\t\t$consulta=mysql_query($sql);\n\t\t$num=1;\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$resultado['numero']=$num++;\n\t\t\t$resultado['fecha_his']=$this->convertir_fecha($resultado['fecha_his']);\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}",
"public function carga($archivo) {\n $public_path = storage_path();\n $url = $public_path.'/app/'.$archivo;\n DB::select(\"delete from temporal\");\n if (($gestor = fopen($url, \"r\")) !== FALSE) {\n while (($datos = fgetcsv($gestor, 1000, \";\")) !== FALSE) {\n //dd(iconv('UCS-2', 'UTF-8', $datos[1].\"\\0\")) ;\n $datos[0]=utf8_encode ( $datos[0]);\n $datos[1]=utf8_encode ( $datos[1]);\n DB::insert(\"INSERT INTO temporal (nombre,apellido,correo,contrasena,puesto,jefe,departamento,permisos) VALUES ('$datos[0]', '$datos[1]', '$datos[2]', '$datos[3]', '$datos[4]', '$datos[5]', '$datos[6]', '$datos[7]')\");\n }\n fclose($gestor);\n //LLENAR TABLA USUARIOS Y PERMISOS\n DB::Select(\"delete from users where id>1\");\n DB::Select(\"delete from detallepermisos where id>8\");\n $tuplas=DB::Select(\"select * from temporal\");\n $total=0;\n foreach ($tuplas as $tupla)\n {\n $jefe=null;\n $departamento=0;\n $Usuario = new \\App\\User();\n $puesto = 0;\n //----------------departamento-----------------------\n $dep=DB::Select(\"select id from departamentos where nombredepartamento='\".$tupla->departamento.\"'\");\n if(count($dep)>0)\n {\n $departamento=$dep[0]->id;\n }\n else\n {\n DB::Insert(\"insert into departamentos (nombredepartamento) values('\".$tupla->departamento.\"')\");\n $dep=DB::Select(\"select id from departamentos where nombredepartamento='\".$tupla->departamento.\"'\");\n $departamento=$dep[0]->id;\n }\n //----------------puesto------------------------------\n $dep=DB::Select(\"select id from puestos where nombrepuesto='\".$tupla->puesto.\"'\");\n if(count($dep)>0)\n {\n $puesto=$dep[0]->id;\n }\n else\n {\n DB::Insert(\"insert into puestos (nombrepuesto) values('\".$tupla->puesto.\"')\");\n $dep=DB::Select(\"select id from puestos where nombrepuesto='\".$tupla->puesto.\"'\");\n $puesto=$dep[0]->id;\n }\n \n $Usuario->name = $tupla->nombre;\n $Usuario->lastname = $tupla->apellido;\n $Usuario->email = $tupla->correo;\n $Usuario->puesto = $puesto;\n $Usuario->departamento = $departamento;\n $Usuario->password = Hash::make($tupla->contrasena);;\n $Usuario->save();\n \n \n $permisos=$tupla->permisos;\n $permisos=str_replace(\"[\", \"\", $permisos);\n $permisos=str_replace(\"]\", \"\", $permisos);\n $numeros=explode(\",\",$permisos);\n \n $id=DB::Select(\"select id from users where email='\".$tupla->correo.\"'\");\n foreach ($numeros as $numero)\n {\n $DetallePermiso = new \\App\\Detallepermiso();\n $DetallePermiso->user_id = $id[0]->id;\n $DetallePermiso->permisos_id = $numero;\n $DetallePermiso->save();\n }\n }\n foreach ($tuplas as $tupla)\n {\n if($tupla->jefe != \"\")\n {\n $id=DB::Select(\"select id from users where name='\".$tupla->jefe.\"'\");\n if(count($id)>0)\n {\n DB::Select(\"update users set id_jefe='\".$id[0]->id.\"'where name='\".$tupla->nombre.\"'\");\n }\n }\n }\n dd(\"completado\");\n }}",
"function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=5;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n\t $this->id_aplicacion=$dato[0];\r\n\t $this->nombre_subaplicacion=$dato[1]; \r\n $this->file_subaplicacion=$dato[2];\r\n $this->imagen_subaplicacion=$dato[3];\r\n $this->orden_subaplicacion=$dato[4];\r\n\t} \r\n }",
"public function CargarGaleriaImagenesAutor($autor)\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT DISTINCT(imagen), id_noticia FROM noticias where autor = '$autor' GROUP BY imagen order by 1 desc \");\n\t\treturn $data_table;\n\t}",
"function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}",
"public function tratarDados(){\r\n\t\r\n\t\r\n }",
"private function loadMembros($tipo)\n {\n \n $this->evento->id = $this->id;\n $this->evento->pegaInfo();\n $lista = $this->evento->mostraMembros($tipo);\n $root = $_SESSION['root'];\n \n // Ordem de listagem do Array\n //\n // [0] => Nome\n // [1] => Imagem\n // [2] => Login\n // [3] => Id\n \n if(is_array($lista))\n {\n echo \"<div class='evento-info2-title'>\".$this->evento->nome.\"</div>\";\n switch($tipo)\n {\n case 0: echo \"<div class='evento-list-introduction'>Visitantes do seu evento</div>\"; break;\n case 1: echo \"<div class='evento-list-introduction'>Lista de atrações cadastradas</div>\"; break;\n }\n \n \n echo \"<div class='wrap-lista-membros' id='\".$this->evento->id.\"'>\";\n foreach($lista as $i => $v)\n {\n echo \"<div class='thumb-box' id='show-participantes-$v[3]'>\";\n if($tipo == 1)\n echo \"<div class='delparticipante' title='Excluir' id='delparticipante-$v[3]-b'></div>\";\n echo \"<a href='$root/profile/$v[2]' >\";\n if($v[1] == \"0\")\n echo \"<img src='$root/imagens/profiles/noavatar_thumb.png' alt='$v[0]' class='thumb' />\";\n else\n echo \"<img src='$root/imagens/profiles/$v[3]_thumb.$v[1]' alt='$v[0]' class='thumb' />\";\n echo \"</a>\";\n echo \"<div>\";\n echo \"<span class='color-blue'>$v[0]</span>\";\n echo \"</div>\";\n echo \"</div>\";\n }\n echo \"<div class='clear'></div>\";\n echo \"</div>\";\n }\n else\n {\n echo \"<div class='evento-info2-title'>\".$this->evento->nome.\"</div>\";\n switch($tipo)\n {\n case 0: echo \"<div class='evento-list-introduction'>Não existem visitantes confirmados neste evento.</div>\"; break;\n case 1: echo \"<div class='evento-list-introduction'>Você não cadastrou nenhuma atração para esse evento.</div>\"; break;\n }\n }\n \n }",
"public function datos_usuario(){\n\t\t$data = json_decode(json_encode($_SESSION['USER']),true);\n\n\t\t$result = $this->_db->query(\"\n\t\tSELECT a.roleid FROM \".DB_PRE.\"role_assignments a, \".DB_PRE.\"context b \n\t\tWHERE a.userid = '$data[id]' AND a.contextid = b.id AND b.instanceid =\".ID_CURSO\n\t\t);\n\n\t\t$rol = 0;\n\t\tif (!$result) {\n\t\t\tprintf(\"Errormessage datos_usuario: %s\\n\", $this->_db->error);\n\t\t}else{\n\t $rol_user = $result->fetch_all(MYSQLI_ASSOC);\n\t if(count($rol_user) > 0){\n\t \t$rol = $rol_user['0']['roleid'];\n\t }\n \t}\n\n\t\t$usuario = array(\n\t\t\t\"id\" => $data['id'],\n\t\t\t\"nombre\" => $data['firstname'],\n\t\t\t\"apellido\" => $data['lastname'],\n\t\t\t\"codigo_estudiante\" => $data['idnumber'],\n\t\t\t\"rol\" => $rol\n\t\t);\n\n\t\t$datos_add = $this->_db->query(\"\n\t\t\tSELECT e.per_aca, b.id_facultad, a.id_programa, e.idnumber as codigo_curso, a.id_genero, a.idnumber\n\t\t\tFROM am_usuario a, am_programa b, \".DB_PRE.\"course e\n\t\t\tWHERE a.id_programa = b.id_programa\n\t\t\tAND e.id = \".ID_CURSO.\"\n\t\t\tAND id_moodle = \".$data['id']\n\t\t\t);\n\n\t\tif (!$datos_add) {\n\t\t\tprintf(\"Errormessage datos_add: %s\\n\", $this->_db->error);\n\t\t}else{\n\t\t\t$row = $datos_add->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach ($row as $key) {\n\t\t\t\tforeach ($key as $data => $value) {\n\t\t\t\t\t$usuario[$data] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $usuario;\n\t}",
"function mostrar_historial(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM historial WHERE id_his='$id'\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->tabla = $resultado['tabla_his'];\n\t\t\t$this->pertenece = $resultado['pertenece_his'];\n\t\t\t$this->asunto = $resultado['asunto_his'];\n\t\t\t$this->descripcion = $resultado['descripcion_his'];\n\t\t\t$this->fecha = $resultado['fecha_his'];\n\t\t\t$this->hora = $resultado['hora_his'];\n\t\t\t$this->fechamod= $resultado['fechamod_his'];\n\t\t\t\n\t\t} \n\t}",
"function historial(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}",
"public function usrget() {\n $q = \"SELECT * FROM ass_usuario WHERE usr_contacto='no' ORDER BY usr_nombre ASC\";\n if ($this->id > 0) {\n $q = \"SELECT * FROM ass_usuario WHERE usr_contacto='no' AND usr_id = \" . $this->id;\n }\n //if ($this->sdid > 0) {\n // $q = \"SELECT * FROM fir_usuario WHERE fir_sede_sde_id = \" . $this->sdid;\n //}\n //if ($this->euid > 0) {\n // $q = \"SELECT * FROM fir_usuario WHERE fir_empresa_emp_id = \" . $this->euid;\n //}\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n $arr = array();\n while ($obj = mysql_fetch_object($con)) {\n $arr[] = array(\n 'id' => $obj->usr_id,\n 'idcli' => $obj->mzt_cliente_cli_id,\n 'idprov' => $obj->mzt_proveedor_pro_id,\n 'nombre' => ($obj->usr_nombre),\n 'apellido' => ($obj->usr_apellido),\n 'cargo' => ($obj->usr_cargo),\n 'email' => ($obj->usr_email),\n 'identificacion' => ($obj->usr_identificacion),\n 'celular' => ($obj->usr_celular),\n 'telefono' => ($obj->usr_telefono),\n 'habilitado' => ($obj->usr_habilitado),\n 'dtcreate' => ($obj->usr_dtcreate));\n }\n//PEDIR ARCHIVOS\n $qa = \"SELECT arc_nombre FROM ass_archivos WHERE mzt_usuario_usr_id= \" . $this->id;\n if ($qa != \"\") {\n $cona = mysql_query($qa, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $qa);\n $resultadoa = mysql_num_rows($cona);\n $arra = array();\n while ($obja = mysql_fetch_object($cona)) {\n $arra[] = array(\n 'ref_imagen' => ($obja->arc_nombre));\n }\n }\n if ($resultado > 0) {\n $arrjson = array('output' => array('valid' => true, 'response' => $arr, 'response2' => $arra));\n } else {\n $arrjson = $this->UTILITY->error_no_result();\n }\n $this->response = ($arrjson);\n }",
"public function indexHistorialAdmin()\n { \n \n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n $rolAdecuado = false;\n if($rolActual == 1 || $rolActual == 2){\n $rolAdecuado = true;\n }\n if($resultado != 1 || !$rolAdecuado){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValues(); //carga el index con todas las solicitudes existentes \n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }",
"function retrieve_users_fftt()\n\t{\n\t\tglobal $gCms;\n\t\t$adherents = new adherents();\n\t\t$ping = cms_utils::get_module('Ping');\n\t\t$saison = $ping->GetPreference ('saison_en_cours');\n\t\t$ping_ops = new ping_admin_ops();\n\t\t$db = cmsms()->GetDb();\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$aujourdhui = date('Y-m-d');\n\t\t$club_number = $adherents->GetPreference('club_number');\n\t\t//echo $club_number;\n\t\t\n\t\t\n\t\t\t$page = \"xml_liste_joueur\";\n\t\t\t$service = new Servicen();\n\t\t\t//paramètres nécessaires \n\t\t\t\n\t\t\t$var = \"club=\".$club_number;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$array = 0;\n\t\t\t\t$lignes = 0;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t$lignes = count($array['joueur']);\n\t\t\t}\n\t\t\t//echo \"le nb de lignes est : \".$lignes;\n\t\t\tif($lignes == 0)\n\t\t\t{\n\t\t\t\t$message = \"Pas de lignes à récupérer !\";\n\t\t\t\t//$this->SetMessage(\"$message\");\n\t\t\t\t//$this->RedirectToAdminTab('joueurs');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//on supprime tt\n\t\t\t\t$query = \"TRUNCATE TABLE \".cms_db_prefix().\"module_ping_joueurs\";\n\t\t\t\t$dbresult = $db->Execute($query);\n\t\t\t\tif($dbresult)\n\t\t\t\t{\n\t\t\t\t\t$i =0;//compteur pour les nouvelles inclusions\n\t\t\t\t\t$a = 0;//compteur pour les mises à jour\n\t\t\t\t\t$joueurs_ops = new ping_admin_ops();\n\t\t\t\t\tforeach($xml as $tab)\n\t\t\t\t\t{\n\t\t\t\t\t\t$licence = (isset($tab->licence)?\"$tab->licence\":\"\");\n\t\t\t\t\t\t$nom = (isset($tab->nom)?\"$tab->nom\":\"\");\n\t\t\t\t\t\t$prenom = (isset($tab->prenom)?\"$tab->prenom\":\"\");\n\t\t\t\t\t\t$club = (isset($tab->club)?\"$tab->club\":\"\");\n\t\t\t\t\t\t$nclub = (isset($tab->nclub)?\"$tab->nclub\":\"\");\n\t\t\t\t\t\t$clast = (isset($tab->clast)?\"$tab->clast\":\"\");\n\t\t\t\t\t\t$actif = 1;\n\n\t\t\t\t\t\t$insert = $joueurs_ops->add_joueur($actif, $licence, $nom, $prenom, $club, $nclub, $clast);\n\t\t\t\t\t\t$player_exists = $joueurs_ops->player_exists($licence);\n\t\t\t\t\t//\tvar_dump($player_exists);\n\t\t\t\t\t\tif($insert === TRUE && $player_exists === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_recup_parties (saison, datemaj, licence, sit_mens, fftt, maj_fftt, spid, maj_spid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t$dbresult = $db->Execute($query, array($saison,$aujourdhui,$licence,'Janvier 2000', '0', '1970-01-01', '0', '1970-01-01'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}//$a++;\n\t\t\t\t\t \t\n\n\t\t\t\t\t}// fin du foreach\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//on redirige sur l'onglet joueurs\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public function seleccionarhistoricoAction(Request $request)\n {\n $usr = $this->get('security.context')->getToken()->getUser();\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n //Seguridad\n $securityContext = $this->get('security.context');\n\n $data = $request->request->all();\n\n // Tomo la dependencia actual\n if ($this->getUser()->multidep_multi){\n $usuarioDependencia = $this->getUser()->multidep_actual_codigo;\n } else {\n $usuarioDependencia = $this->getUser()->IdEstablecimiento;\n }\n\n $busqueda = $data['busqueda'];\n\n $filtro = $data['filtro'];\n\n if ((true === $securityContext->isGranted('ROLE_1')) || (true === $securityContext->isGranted('ROLE_2')) || (true === $securityContext->isGranted('ROLE_15')) || (true === $securityContext->isGranted('ROLE_16')) || (true === $securityContext->isGranted('ROLE_17')) || (true === $securityContext->isGranted('ROLE_18')) || (true === $securityContext->isGranted('ROLE_22'))) {\n switch ($filtro) {\n case 1:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro;\n break;\n case 2:\n $busqueda = ltrim(rtrim(str_replace(' ', '_', $busqueda)));\n $busqueda = str_replace('ñ', 'n', $busqueda);\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro;\n break;\n case 3:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro;\n break;\n }\n\n } else {\n switch ($filtro) {\n case 1:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro.','.$usuarioDependencia;\n break;\n case 2:\n $busqueda = ltrim(rtrim(str_replace(' ', '_', $busqueda)));\n $busqueda = str_replace('ñ', 'n', $busqueda);\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro.','.$usuarioDependencia;\n break;\n case 3:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro.','.$usuarioDependencia;\n break;\n }\n }\n\n\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n $conn = $this->getDoctrine()->getManager(\"ms_haberes_web\")->getConnection();\n\n $stmt = $conn->prepare($sql);\n\n $stmt->execute();\n $rResult = 0;\n\n $rResult = $stmt->fetchAll();\n\n return array(\n 'resultados' => $rResult,\n );\n }",
"private function loadUsers() {\n\t\t\n\t\t\t$sql = \"SELECT usr_id FROM usr_cmp WHERE cmp_id='$companyID'\";\n\t\t\t\n\t\t\t$rawResult = $gremlin->query($sql);\n\t\t\t\n\t\t\tforeach($rawResult as $newCont) {\n\t\t\t\n\t\t\t\t$newUser = new User($newCont);\n\t\t\t\n\t\t\t\t$this->usersInCompany[] = $newUser;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}",
"private function consultar_usuario_todos() {\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u;\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }",
"private function cargarActas() {\n $this->aActas = array();\n $res = Funciones::gEjecutarSQL(\"SELECT FECHA,DATE_FORMAT(FECHA,'%d-%m-%Y') AS FECHAISO,COUNT(*) AS PUNTOS FROM ACTAS_PUNTOS GROUP BY FECHA ORDER BY FECHA DESC\");\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\n $this->aActas[$aRow['FECHA']] = array($aRow['FECHAISO'], $aRow['PUNTOS']);\n }\n $res->closeCursor(); \n }",
"public function indexHistorialProfesor()\n { \n //$semestre = $this->get_semester(); //obtiene el semestre actual\n //$año = $this->get_year(); //obtiene el año actual\n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n if($resultado != 1 || $rolActual != 3){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValuesProfesor($idActual[0][0]); //carga el index con todas las solicitudes del profesor actualmente logueado\n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }",
"function AtividadesRecentesGeral($logs_descricao = \"\", $logs_id_referencia = 0,$usuarios_nome = \"\", $logs_data = \"\"){\n\n $conexao = new classeConexao();\n\n if($logs_descricao=='atualizou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-edit';\n $label = 'label-warning';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='completou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-check';\n $label = 'label-success';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='reativou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-arrow-up';\n $label = 'label-danger';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='pausou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-pause';\n $label = 'label-primary';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='aprovou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-check';\n $label = 'label-success';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='reprovou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-times';\n $label = 'label-danger';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='enviou para aprovação a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-mail-forward';\n $label = 'label-info';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='cancelou a aprovação da tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-times';\n $label = 'label-warning';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='criou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-star';\n $label = 'label-info';\n $url = 'editar/tarefa/';\n }\n\n //$exibeHTML = '<li><div class=\"col1\" style=\"width:98%;\"><div class=\"cont\"><div class=\"cont-col1\"><div class=\"label label-sm '.$label.'\"><i class=\"fa '.$imagem.'\"></i></div></div><div class=\"cont-col2\">';\n //$exibeHTML .= '<div class=\"desc\">O usuário <a href=\"\">'.$usuarios_nome.'</a> '.$logs_descricao.' <a href=\"'.$url.$logs_id_referencia.'\">'.$item.'</a></div></div></div></div><div class=\"col2\">'.'<div class=\"date\">'.DataBrasilSemHoras($logs_data).'</div></div></li>';\n\n //return $exibeHTML;\n\n echo '<li>';\n echo '<div class=\"col1\" style=\"width:98%;\">';\n echo '<div class=\"cont\">';\n echo '<div class=\"cont-col1\">';\n echo '<div class=\"label label-sm '.$label.'\">';\n echo '<i class=\"fa '.$img.'\"></i>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"cont-col2\">';\n\n\n\n echo '<div class=\"desc\">O usuário <a href=\"\">'.$usuarios_nome.'</a> '.$logs_descricao.' <a href=\"'.$url.$logs_id_referencia.'\">'.$item.'</a>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"col2\">';\n echo '<div class=\"date\">'.DataBrasilSemHoras($logs_data).'</div>';\n echo '</div>';\n echo '</li>';\n \n}",
"private function GererUtilisateus() {\r\n if (isset($_GET['limiteBasse'])) {\r\n $limiteBasse = $_GET['limiteBasse'];\r\n } else {\r\n $limiteBasse = $_GET['limiteBasse'] = 0;\r\n }\r\n // -- Determine la pagination de l'affichage des restaurants\r\n $this->pagination = 50;\r\n $this->userCount = $this->CNX->countUsers();\r\n $this->afficherUsers = $this->CNX->showUsers(null, $limiteBasse, $this->pagination);\r\n $this->action = \"GererUtilisateurs\";\r\n }",
"function getVentasUsuario(){\n if(isset($_GET['id'])){\n\n // Obtencion del id del usuario\n $idUsuario = $_GET['id'];\n\n // Conexion a la base de datos\n $con = conexion();\n\n // Selecciona todas las ventas del usuario\n $query = \"SELECT * FROM ver_ventas_usuario WHERE usu_id = \".$idUsuario;\n $select = $con -> query($query);\n\n // Validacion de que el usuario tenga boletos comprados\n if($select -> num_rows > 0){\n\n // Creacion de array vacio que contendra todas las compras\n $arrayVentas = array();\n\n // Mientras exista una venta de boletos del usuario crea un array de la seccion y lo\n // agrega a la variable de todas las compras que existen\n while($row = $select -> fetch_assoc()){\n $compra = [\n \"id_venta\" => $row['ven_id'],\n \"estado_de_pago\" => $row['ven_pago_realizado'],\n \"id_seccion\" => $row['sec_id'],\n \"nombre_seccion\" => $row['sec_nombre'],\n \"costo\" => $row['sec_costo'],\n \"id_evento\" => $row['eve_id'],\n \"nombre_evento\" => $row['eve_nombre'],\n \"estado\" => $row['eve_estado'],\n \"ciudad\" => $row['eve_ciudad'],\n \"direccion\" => $row['eve_direccion'],\n \"lugar\" => $row['eve_lugar'],\n \"fecha\" => $row['eve_fecha'],\n \"hora\" => $row['eve_hora'],\n \"foto\" => $row['eve_foto'],\n \"descripcion\" => $row['eve_descripcion'],\n \"nombre_categoria\" => $row['cat_nombre'],\n \"id_usuario\" => $row['usu_id'],\n \"correo_usuario\" => $row['usu_correo'],\n ];\n $arrayVentas[] = $compra;\n }\n\n // Crea el array de respuesta con todas las compras del usuario de la base de datos\n $compras = [\"res\" => \"1\", \"compras\" => $arrayVentas];\n\n // Creacion del JSON, cierre de la conexion a la base de datos e imprime el JSON\n $json = json_encode($compras);\n $con -> close();\n print($json);\n }else{\n // Respuesta en caso de que no contenga boletos comprados el usuario\n $json = json_encode([\"res\" => \"0\", \"msg\" => \"No se encontraron boletos comprados\"]);\n $con->close();\n print($json);\n }\n }else{\n // Respuesta en caso de que la url no contenga el id del usuario\n $json = json_encode([\"res\"=>\"0\", \"msg\"=>\"La operación deseada no existe\"]);\n print($json);\n }\n}",
"function ingresos($useree){\n \tglobal $babanta, $wuser;\n $ingresossqlquery = $this->impremes($useree);\n $num_rows = mysql_num_rows($ingresossqlquery);\n \t$impresiones = ($num_rows) ? $num_rows : 0;\n $datesqlpago = $this->datesql($useree);\n //setlocale(LC_MONETARY, 'en_US');\n $dolares = $impresiones*$babanta->settings['pago_mil']/1000; // 0.80\n $data['usd'] = number_format($dolares,3,\".\",\",\"); //number_format($dolares, 2, \",\", \".\") // number_format(, 2, '.', '') - $datos['cpm']*$impresiones/382\n \t$data['impresiones'] = $impresiones;\n $data['date'] = $datesqlpago['date'];\n return $data;\n }",
"function ordenaInstitucion($institucion) // a este se le entra con el username\n {\n\t \ninclude ('cajitaCurso.php'); //archivo donde esta la funcion que tira la cajita\n//contador\n$sqlContador = \"SELECT count(*) FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.organizacion LIKE '$institucion' ORDER BY fechas.fechainicio\";\n$count = mysql_fetch_row(mysql_query($sqlContador)) or die(\"Query failed : \" . mysql_error() . mysql_errno());\nglobal $contadorGeneral;\n$contadorGeneral = $count[0];\n//contador\t\n$sql = \"SELECT * FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where fechas.usuario LIKE '$institucion' ORDER BY fechas.fechainicio DESC LIMIT \".DondeComienzo().\", \".MAXCAJITAS.\"\";\n//echo $sql;\n$result = mysql_query($sql) or die(\"Query failed : \" . mysql_error() . mysql_errno()); \nwhile ($row = mysql_fetch_array($result))\n {\n\t\t\t CajitaCursoLlena($row['idcurso'], convierte_fecha($row['fechainicio']));\t\n\t\t\t}\n}",
"public function leerDatosInicio()\n {\n $tipo = $this->session->userdata(\"tipo\");\n echo json_encode($this->Usuarios_model->leerDatosInicio($tipo));\n }",
"function conf(){\n $this->s__perfil = toba::manejador_sesiones()->get_perfiles_funcionales();\n // print_r($this->s__perfil); \n \n $p = array_search('autoridad_mesa', $this->s__perfil);\n if($p !== false){//Es autoridad de mesa\n //Cargar datos del usuario especifico\n //obtengo el nombre de usuario logueado\n $usr = toba::manejador_sesiones()->get_id_usuario_instancia();\n \n $id_mesa = $this->dep('datos')->tabla('mesa')->get_de_usr($usr);\n if(sizeof($id_mesa)>0){\n $this->s__id_mesa = $id_mesa[0]['id_mesa'];\n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \n if($this->s__mesa['estado'] >= 2){//Ya fue validado por la secretaria\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else//No se encuentra mesa asociada al usuario logueado\n toba::notificacion()->agregar(\"No se encuentra el usuario ingresado\",\"info\");\n }\n else{\n $this->s__id_mesa = toba::memoria()->get_parametro('c');//el parametro c tiene el id mesa\n \n $this->s__retorno = toba::memoria()->get_parametro('k');//el parametro k tiene la dir de retorno\n $this->s__retorno_estado = toba::memoria()->get_parametro('f');\n \n \n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \t\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Es junta electoral\n $this->controlador()->evento('procesar')->set_etiqueta('Confirmar');\n $this->controlador()->evento('enviar')->ocultar();\n\n if($this->s__mesa['estado'] > 3){//Ya fue validado por la secretaria\n// $this->dep('form_ml_directivo')->set_solo_lectura('votos');\n// $this->dep('form_ml_superior')->set_solo_lectura('votos');\n// $this->dep('form_ml_extra')->set_solo_lectura('votos');\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);//print_r(isset($p)?'no es false':'es false');\n if($p !== false){//Es secretaria\n $this->controlador()->evento('procesar')->set_etiqueta('Validar');\n $this->controlador()->evento('enviar')->ocultar();\n\n }\n \n }\n }\n \n if(isset($this->s__id_mesa)){//Si el pedido viene de la operacion Confirmar/Cargar// \n $this->s__claustro = $this->s__mesa['id_claustro'];\n $this->s__id_nro_ue = $this->dep('datos')->tabla('sede')->get_unidad($this->s__mesa['id_sede']);\n $this->s__id_sede = $this->s__mesa['id_sede'];\n }\n }",
"function user() {\n $user = $this->ion_auth->user()->row();\n //\n //get id\n $data['profic'] = $this->model_portofolio->select_profic_user($user->id)->row();\n $data['user'] = $user;\n if ($this->model_portofolio->select_metadata($user->id, 1)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 1);\n $data['profil'] = $this->model_portofolio->select_metadata($user->id, 1)->row();\n } else {\n $data['profil'] = $this->model_portofolio->select_metadata($user->id, 1)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 2)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 2);\n $data['pengajaran'] = $this->model_portofolio->select_metadata($user->id, 2)->row();\n } else {\n $data['pengajaran'] = $this->model_portofolio->select_metadata($user->id, 2)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 3)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 3);\n $data['riset'] = $this->model_portofolio->select_metadata($user->id, 3)->row();\n } else {\n $data['riset'] = $this->model_portofolio->select_metadata($user->id, 3)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 4)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 4);\n $data['publikasi'] = $this->model_portofolio->select_metadata($user->id, 4)->row();\n } else {\n $data['publikasi'] = $this->model_portofolio->select_metadata($user->id, 4)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 5)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 5);\n $data['pengalaman'] = $this->model_portofolio->select_metadata($user->id, 5)->row();\n } else {\n $data['pengalaman'] = $this->model_portofolio->select_metadata($user->id, 5)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 6)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 6);\n $data['pendidikan'] = $this->model_portofolio->select_metadata($user->id, 6)->row();\n } else {\n $data['pendidikan'] = $this->model_portofolio->select_metadata($user->id, 6)->row();\n }\n\n //print_r($data['profic']);\n //print_r($data['user']);\n //print_r($data['publikasi']);\n //print_r($data);\n $this->load->view('portofolio/profil', $data);\n }",
"function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}",
"public function historico()\n {\n $pasientes = (new \\App\\Models\\Pasientes())->getAll(['pasientes.*, null AS ciudad']);\n\n # Busqueda de ciuidad\n foreach ($pasientes as $key => $pasiente){\n $ciudad = (new Ciudades())->getById($pasiente['id_ciudad']);\n $pasientes[$key]['ciudad'] = $ciudad['ciudad'];\n }\n\n View::set('pasientes', $pasientes);\n echo View::render('pasientes');\n }",
"function getAllUsers(){\n //Recuperation des Donnees du Fichier sous forme de Chaine\n $file_content=file_get_contents(FILE_NAME);\n //Convertion de la chaine en Tableau\n $arr_users=json_decode($file_content,true);\n return $arr_users;\n }",
"function query_load_richieste($id_utente, $fornitore, $principale){\n// fornitore e principale sono un booleano\n\t$query = \"SELECT Users.nome, Users.cognome, Richieste.tipo_richiesta, Richieste.esito, Richieste.distanza, Aziende.nome_azienda, Aziende.ragione_sociale,\n TIMESTAMPDIFF(MINUTE, NOW(), Richieste.data_ora + INTERVAL Richieste.minuti_risposta MINUTE) as tempo_rimasto, Aziende.valutazione as rating, Richieste.data_ora\n\t FROM Richieste JOIN Users ON Richieste.id_fornitore=Users.id JOIN Aziende ON Users.partita_iva=Aziende.partita_iva\n\t WHERE id_utente=\".$id_utente.\"\n\t ORDER BY Richieste.id DESC\";\n\t$result = mysql_query($query) or die(mysql_error());\n\n\t$a = array();\n\n\tif($result){\n while($row = mysql_fetch_assoc($result)) {\n $a[] = $row;\n }\n if($fornitore && $principale) {\n $query_p = \"SELECT Users.nome, Users.cognome, Richieste.tipo_richiesta, Richieste.esito, Richieste.distanza,\n TIMESTAMPDIFF(MINUTE, NOW(), Richieste.data_ora + INTERVAL Richieste.minuti_risposta MINUTE) as tempo_rimasto, Users.rating, Richieste.data_ora\n \t FROM Richieste JOIN Users ON Richieste.id_utente=Users.id\n \t WHERE Richieste.id_fornitore IN (SELECT id FROM Users WHERE partita_iva = (SELECT partita_iva FROM Users WHERE id=\".$id_utente.\"))\n \t ORDER BY Richieste.id DESC\";\n \t$result_p = mysql_query($query_p) or die(mysql_error());\n \t$b = array();\n \tif($result_p){\n while($row = mysql_fetch_assoc($result_p)) {\n $b[] = $row;\n }\n }\n } else if($fornitore) {\n $query_ = \"SELECT Users.nome, Users.cognome, Richieste.tipo_richiesta, Richieste.esito, Richieste.distanza,\n TIMESTAMPDIFF(MINUTE, NOW(), Richieste.data_ora + INTERVAL Richieste.minuti_risposta MINUTE) as tempo_rimasto, Users.rating, Richieste.data_ora\n \t FROM Richieste JOIN Users ON Richieste.id_utente=Users.id\n \t WHERE Richieste.id_fornitore=\".$id_utente.\"\n \t ORDER BY Richieste.id DESC\";\n \t$result_ = mysql_query($query_) or die(mysql_error());\n \t$b = array();\n \tif($result_){\n while($row = mysql_fetch_assoc($result_)) {\n $b[] = $row;\n }\n }\n } else { $b = null; } // fine if - else if - else\n $richieste = array('richieste' => $a, 'richieste_fornitore' => $b);\n\t} else {\n\t return array('error' => 'dead');\n\t}\n\treturn $richieste;\n}",
"public function buscarHistorial($usuario_id)\n\t{\n\t\treturn Historial::where('usuario_id','=', $usuario_id)->first();\n\t}",
"public function getHistorial()\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from historiales');\n $stmt->execute();\n }",
"public function getUsuarios($order){\r\n\t$pdo = Database::connect();\r\n\t//verificamos el ordenamiento asc o desc:\r\nif($orden==true)//asc\r\n$sql = \"select * from usuario order by nombre\";\r\nelse //desc\r\n\t$sql = \"select * from usuario order by nombre desc\";\r\n\t$resultado = $pdo->query($sql);\r\n//transformamos los registros en objetos de tipo usuario:\r\n\t$listado = array();\r\n\tforeach ($resultado as $res){\r\n\t\t$usuario = new usuario();\r\n\t\t$usuario->setCodigo($res['codigo']);\r\n\t\t$usuario->setNombre($res['nombre']);\r\n\t\t$usuario->setPrecio($res['precio']);\r\n\t\t$usuario->setCantidad($res['cantidad']);\r\n\t\tarray_push($listado, $usuario);\r\n\t}\r\n\tDatabase::disconnect();\r\n//retornamos el listado resultante:\r\n\treturn $listado;\r\n}",
"public function getdatosUsuarios(){\n\t\t$bd = new bd();\n\t\t$result = $bd->doSingleSelect($this->u_table,\"id = {$this->id}\");\n\t\tif($result){\n\t\t\t$this->datosUsuario($result[\"direccion\"], $result[\"telefono\"], $result[\"descripcion\"], $result[\"estados_id\"], $result[\"facebook\"], $result[\"twitter\"],$result[\"website\"],$result[\"certificado\"],$result[\"id_sede\"]);\n\t\t\t$this->id = $result[\"id\"];\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}",
"function getAllUsuarios(){\n\t\t\tDB_DataObject::debugLevel(0);\n\t\t\t$obj = DB_DataObject::Factory('VenUsuario');\n\t\t\t$obj->find();\n\t\t\t$i = 0;\n\t\t\t$data='';\n\t\t\twhile($obj->fetch()){\n\t\t\t\t$data[$i]['idUsuario']=$obj->idUsuario;\n\t\t\t\t$data[$i]['idCargo']=$obj->idCargo;\n\t\t\t\t$nombreCargo=$this->getCargoById($obj->idCargo);\n\t\t\t\t$nombreCargo=utf8_encode($nombreCargo['nombre']);\n\t\t\t\t$data[$i]['cargo']= $nombreCargo;\n\t\t\t\t$data[$i]['nombre']=utf8_encode($obj->nombre);\n\t\t\t\t$data[$i]['apellido']=utf8_encode($obj->apellido);\n\t\t\t\t$data[$i]['email']=$obj->email;\n\t\t\t\t$data[$i]['usuario']=utf8_encode($obj->usuario);\n\t\t\t\t$data[$i]['contrasena']=utf8_encode($obj->contrasena);\n\t\t\t\t$data[$i]['puntos']=$obj->puntos;\n\t\t\t\t$data[$i]['estado']=$obj->estado;\n\t\t\t\t$data[$i]['fechaMod']=$obj->fechaMod;\n\t\t\t\t$data[$i]['fecha']=$obj->fecha;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$obj->free();\n\t\t\t//printVar($data,'getAllUsuarios');\n\t\t\treturn $data;\n\t\t}",
"public function onReadAllDataExcelBeneficiarios()\n {\n if (!$this->archivoValido)\n return;\n $log = [\n 'Correcto' => $this->getImportSuccessLog(),\n 'Incorrecto' => $this->getImportErrorLog(),\n 'Guardar' => $this->getDataGuardar()\n ];\n\n $pathImportJson = Yii::getAlias('@ImportJson/beneficiarios/');\n $archivo = date('Ymd-His_') . Yii::$app->user->id . '_beneficiarios.json';\n file_put_contents($pathImportJson . $archivo, Json::encode($log));\n $this->redirect(['import/beneficiarios-paso2', 'archivo' => $archivo]);\n }",
"public function buscarhistoricopersonaAction()\n {\n $usr = $this->get('security.context')->getToken()->getUser();\n\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n //Seguridad\n $securityContext = $this->get('security.context');\n\n if ((true === $securityContext->isGranted('ROLE_2')) ||\n (true === $securityContext->isGranted('ROLE_10')) ||\n (true === $securityContext->isGranted('ROLE_11')) ||\n (true === $securityContext->isGranted('ROLE_12')) ||\n (true === $securityContext->isGranted('ROLE_13')) ||\n (true === $securityContext->isGranted('ROLE_14')) ||\n (true === $securityContext->isGranted('ROLE_16')) ||\n (true === $securityContext->isGranted('ROLE_20')) ||\n (true === $securityContext->isGranted('ROLE_22')) ||\n (true === $securityContext->isGranted('ROLE_17'))) {\n\n return array(\n\n );\n\n } else {\n\n $direccion = \"liquidaciones_cuposliquidacion\";\n $this->get(\"session\")->getFlashBag()->add(\n 'aviso_error',\n 'No posee permisos para ingresar al contenido solicitado!'\n );\n return $this->redirect($this->generateUrl($direccion));\n }\n }",
"function recuperarContrasenia(){\n\t\t$opt \t\t= $this->uri->segment(1);\n\t\t$op['opt'] \t\t= $this->data_model->cargarOptimizacion($opt);\n\n\t\t//validacion para identificar tipo de usuario y desglosar info\n\t\t$user\t\t\t\t= $this->session->userdata('user');\n\t\t$op['info']\t\t\t= array();\n\n\t\t//Vista//\n\t\t$this->load->view('recuperarContraseniaGracias-view' ,$op);\n\t\n\t}",
"public function DatosUsuarios() {\n $users = Usuarios::join('Perfiles', 'Usuarios.IdPerfil', '=', 'Perfiles.ID')->get();\n $datos = array();\n foreach ($users->toArray() as $user) {\n $groupDes = Grupos::where('ID', '=', $user['IdGrupo']) ->select('Descripcion')->first();\n $user['Grupo'] = $groupDes->Descripcion;\n if (Session::get('idPeril') == 3) {\n $user['Perfil'] = \"{$user['Perfil']}<a href='#' title='Editar Perfil' class='editar' alt='{$user['IdUsuario']}'>\"\n . \"<span style='color:#FACC2E; padding-left:15px' class='glyphicon glyphicon-edit'></span>\"\n . \"</a>\";\n }\n $datos[] = $user;\n }\n\n return $datos = json_encode($datos);\n }",
"public function getInscripcionMesasHasUserDt()\n {\n /**Array para el response */\n $dataResponse = [];\n /**Recibimos lo Valores de DataTable */\n $columnIndex = $_GET['order'][0]['column']; // Índice de columna\n $draw = $_GET['draw'];\n $data = [\n 'row' => $_GET['start'], //Desde que registro para registro por pagina\n 'rowPerPage' => $_GET['length'], //Hasta que registro para Registros por Pagina\n 'columnName' => $_GET['columns'][$columnIndex]['data'], // Nombre de la Columna\n 'columnSortOrder' => $_GET['order'][0]['dir'], // Orden ASC o DESC\n 'searchValue' => filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING), // Valor Buscado\n 'usuario_id' => $_SESSION['usuario_id'],\n ];\n /** Número total de registros sin filtrar */\n $totalRegistros = $this->inscripcionFinalModel->countInscripcionMesasUserDt(null, $_SESSION['usuario_id']);\n /**Número total de registros con filtro */\n $totalRegistrosFiltrado = $this->inscripcionFinalModel->countInscripcionMesasUserDt($data['searchValue'], $_SESSION['usuario_id']);\n $mesasFinales = $this->inscripcionFinalModel->getInscripcionMesasUserDt($data);\n /**Armamos el dataResponse */\n foreach ($mesasFinales as $key => $mesaFinal) {\n $dataResponse[] = [\n 'key' => ($key + 1),\n 'materia' => $mesaFinal->materia,\n 'aula' => $mesaFinal->aula,\n 'fecha' => $mesaFinal->fecha,\n 'created_at' => $mesaFinal->created_at,\n ];\n }\n /**Armamos el response para el Ajax */\n $response = [\n \"draw\" => intval($draw),\n \"iTotalRecords\" => $totalRegistros,\n \"iTotalDisplayRecords\" => $totalRegistrosFiltrado,\n \"aaData\" => $dataResponse\n ];\n /**Mostramos el resultado en JSON */\n echo json_encode($response);\n }",
"public function semana($unidade)\n {\n $transferidos = Cache::tags('transferido')->remember('transferidos'.$unidade, $this->expiration, function() use ($unidade){\n\n $date = \\Carbon\\Carbon::today()->subDays(7);\n $query = DB::connection('pass')->table('movimentos');\n $query->where(function($subquery1) use ($unidade){\n $subquery1->orWhere('opmorigem','like',$unidade.'%')\n ->orWhere('opmdestino','like',$unidade.'%');\n });\n $query->where(function($subquery)\n {\n $subquery = DB::connection('pass')->table('PPusuarios');\n $subquery->select('UserRG');\n $subquery->join('PPUsuarioGrupo', function ($join)\n {\n $join->on('PPUsuarioGrupo.UserID', '=', 'PPUsuarios.UserID')\n ->where([\n ['PPUsuarioGrupo.GrupoID', '=','31'],//CTI - Ordens de Serviço\n ['PPUsuarioGrupo.GrupoID', '=','71'],//CTI - INVENTARIO\n ['PPUsuarioGrupo.GrupoID', '=','90'],//SJD - PROCESSOS\n ['PPUsuarioGrupo.GrupoID', '=','95'],//CTI - DESENVOLVIMENTO\n ['PPUsuarioGrupo.GrupoID', '=','95'],//CTI - SUPORTE\n ['PPUsuarioGrupo.GrupoID', '=','97'],//CTI - INVENTARIO\n ['PPUsuarioGrupo.GrupoID', '=','100'],//CPP - Sistema de Controle\n ['PPUsuarioGrupo.GrupoID', '=','116'],//PROXY 02\n ]);\n }); \n });\n $query->where('data','>=',$date);\n\n try {\n $result = $query->get();\n return $result;\n } catch (\\Throwable $th) {\n // toast()->error($th->getMessage(),'ERRO');\n $this->expiration = 1;\n $result = [\n [\n 'rg' => '',\n 'nome' => 'Fora do ar',\n 'opmorigem' => '0',\n 'opmdestino' => '0',\n ]\n ];\n return $result;\n }\n });\n \n return $transferidos;\n }",
"function retornaUsuarios()\n{\n $PDO = db_connect();\n $sql = \"SELECT id,nome_completo,RA,semestre, usuario, img \n FROM sistema.users \n order by nome_completo ASC;\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute();\n $users = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $usersKeyName = array();\n foreach ($users as $user) {\n $usersKeyName[trim($user['nome_completo'])] = $user;\n }\n $dadosCodificados = json_encode($usersKeyName);\n $objData = json_decode($dadosCodificados);\n return $objData;\n}",
"function datos_usuario($id_usuario) {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.*\n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador='$id_usuario'\n\t\tAND colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"public function buscarUsuarios(){\n $usuarios = file_get_contents('usuarios.json');\n $arrUsuariosJSON = explode(PHP_EOL,$usuarios);\n $arrUsuarioPHP = [];\n array_pop($arrUsuariosJSON);\n foreach ($arrUsuariosJSON as $key => $usuario) {\n $arrUsuarioPHP[] = json_decode($usuario,true);\n }\n return $arrUsuarioPHP;\n }",
"public function ajaxDescargarEscribanos(){\n\n #DESCARGAR ESCRIBANOS DEL ENLACE\n $item = null;\n $valor = null;\n \n $escribanos = ControladorEnlace::ctrMostrarEscribanosEnlace($item,$valor);\n \n #ELIMINAR LOS ESCRIBANOS DE LOCALHOST\n ControladorEnlace::ctrEliminarEnlace('escribanos');\n\n foreach ($escribanos as $key => $value) {\n\n $tabla = \"escribanos\";\n $datos =array(\"id\"=>$value[\"id\"],\n \"nombre\"=>strtoupper($value[\"nombre\"]),\n \"documento\"=>$value[\"documento\"],\n \"id_tipo_iva\"=>$value[\"id_tipo_iva\"],\n \"tipo\"=>$value[\"tipo\"],\n \"facturacion\"=>$value[\"facturacion\"],\n \"tipo_factura\"=>$value[\"tipo_factura\"],\n \"cuit\"=>$value[\"cuit\"],\n \"direccion\"=>strtoupper($value[\"direccion\"]),\n \"localidad\"=>strtoupper($value[\"localidad\"]),\n \"telefono\"=>$value[\"telefono\"],\n \"email\"=>strtoupper($value[\"email\"]),\n \"id_categoria\"=>$value[\"id_categoria\"],\n \"id_escribano_relacionado\"=>$value[\"id_escribano_relacionado\"],\n \"id_osde\"=>$value[\"id_osde\"],\n \"ultimolibrocomprado\"=>strtoupper($value[\"ultimolibrocomprado\"]),\n \"ultimolibrodevuelto\"=>strtoupper($value[\"ultimolibrodevuelto\"]),\n \"inhabilitado\"=>$value[\"inhabilitado\"]);\n #registramos los productos\n $respuesta = ModeloEnlace::mdlIngresarEscribano($tabla, $datos);\n\t }\n echo count($escribanos);\n $datos = array(\"nombre\"=>\"escribanos\",\"fecha\"=>date(\"Y-m-d\"));\n $respuesta=ControladorModificaciones::ctrMostrarModificaciones($datos);\n \n \n if (empty($respuesta)){\n\n ControladorModificaciones::ctrIngresarModificaciones($datos); \n }\n \n }",
"function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}",
"function showUD() {\n $rows = self::$db->getRows(\"SELECT * FROM usuario where tipousuario = 2\"); \n $arrayUsuario= array(); \n foreach ($rows as $c){\n $aux = new Usuario($c{'idusuario'},$c{'usuario'},$c{'contrasenia'},$c{'tipousuario'});\n array_push($arrayUsuario, $aux);\n }\n return $arrayUsuario; \n }",
"function API_lista_hijos($tipo_usuario,$tipo_codigo){\n\t$ClsAsi = new ClsAsignacion();\n\t$ClsAcad = new ClsAcademico();\n\t$ClsPen = new ClsPensum();\n\t\n\tif($tipo_codigo != \"\"){\n\t\tif($tipo_usuario === \"3\"){\n\t\t\t$pensum = $ClsPen->get_pensum_activo();\n\t\t\t$result = $ClsAsi->get_alumno_padre($tipo_codigo,\"\");\n\t\t\tif (is_array($result)) {\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$cui = $row[\"alu_cui\"];\n\t\t\t\t\t$arr_data[$i]['cui'] = $row[\"alu_cui\"];\n\t\t\t\t\t$arr_data[$i]['tipo_cui'] = $row[\"alu_tipo_cui\"];\n\t\t\t\t\t$arr_data[$i]['nombre'] = trim($row[\"alu_nombre\"]);\n\t\t\t\t\t$arr_data[$i]['apellido'] = trim($row[\"alu_apellido\"]);\n\t\t\t\t\t$arr_data[$i]['fecha_nacimiento'] = cambia_fecha($row[\"alu_fecha_nacimiento\"]);\n\t\t\t\t\t$arr_data[$i]['edad'] = Calcula_Edad(cambia_fecha($row[\"alu_fecha_nacimiento\"]));\n\t\t\t\t\t$arr_data[$i]['genero'] = $row[\"alu_genero\"];\n\t\t\t\t\t///------------------\n\t\t\t\t\t$result_grado_alumno = $ClsAcad->comprueba_seccion_alumno($pensum,'','','','',$cui,'',1); ////// este array se coloca en la columna de combos\n\t\t\t\t\tif(is_array($result_grado_alumno)){\n\t\t\t\t\t\t$j = 0;\n\t\t\t\t\t\tforeach($result_grado_alumno as $row_grado_alumno){\n\t\t\t\t\t\t\t$arr_grados[$j]['pensum'] = $row_grado_alumno[\"seca_pensum\"];\n\t\t\t\t\t\t\t$arr_grados[$j]['nivel'] = $row_grado_alumno[\"seca_nivel\"];\n\t\t\t\t\t\t\t$arr_grados[$j]['grado'] = $row_grado_alumno[\"seca_grado\"];\n\t\t\t\t\t\t\t$arr_grados[$j]['seccion'] = $row_grado_alumno[\"seca_seccion\"];\n\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$arr_data[$i]['seccion'] = $arr_grados;\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\techo json_encode($arr_data);\n\t\t\t}else{\n\t\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t\t$arr_data = array(\n\t\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\t\"message\" => \"No exsisten hijos enlazados a este papa...\");\n\t\t\t\t\techo json_encode($arr_data);\n\t\t\t}\n\t\t}else{\n\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t$arr_data = array(\n\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\"message\" => \"Este usuario no pertenece al grupo de padres...\");\n\t\t\t\techo json_encode($arr_data);\n\t\t}\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$arr_data = array(\n\t\t\t\"status\" => \"error\",\n\t\t\t\"message\" => \"El codigo de usuario esta vacio\");\n\t\t\techo json_encode($arr_data);\n\t}\n\t\n}",
"function informacao() {\n $this->layout = '_layout.perfilUsuario';\n $usuario = new Usuario();\n $api = new ApiUsuario();\n $usuario->codgusario = $this->getParametro(0);\n\n $this->dados = array(\n 'dados' => $api->Listar_informacao_cliente($usuario)\n );\n $this->view();\n }",
"public function cargar_retenciones()\r\n {\r\n $cod_org = usuario_actual('cod_organizacion');\r\n $ano=$this->drop_ano->SelectedValue;\r\n $sql2 = \"select * from presupuesto.retencion where cod_organizacion='$cod_org' and ano='$ano' \";\r\n $datos2 = cargar_data($sql2,$this);\r\n // array_unshift($datos2, \"Seleccione\");\r\n $this->drop_retenciones->Datasource = $datos2;\r\n $this->drop_retenciones->dataBind();\r\n }",
"function loadPerfil(){\n\t\t$r = $this->dper->getPerfilById($this->id);\n\t\tif($r != -1){\n\t\t\t$this->nombre = $r[\"nombre\"];\n\t\t}else{\n\t\t\t$this->nombre = \"\";\n\t\t}\n\t}",
"public function mafiliados_grilla($datos = array()) {\n $data = array();\n $rp = $datos['rp'];\n $data['page'] = $datos['page']; //numero de pagina\n $data['rp'] = $datos['rp']; //registros por pagina\n $qtype = $datos['qtype']; //campo de busqueda\n $query = $datos['query']; //dato introducido por el usuario\n \n if ($qtype=='afi.cdeno'){\n $query=strtoupper($query);\n $busqueda = ($qtype != '' && $query != '') ? \"where $qtype like '$query%'\" : '';\n }else{\n $busqueda = ($qtype != '' && $query != '') ? \"where $qtype = '$query'\" : '';\n }\n $registros = ($datos['page']-1) * $rp;\n $consulta = \"SELECT COUNT(*) as count FROM afiliados afi \" . $busqueda;\n $consulta = $this->db->query($consulta);\n if ($consulta==true){\n foreach ($consulta->result_array() as $row) {\n $total = $row['count'];\n }\n $data['total'] = $total;\n $consulta = \"SELECT afi.cdni,afi.cdeno,afi.ccuil,afi.cnuom,afi.cnume,COUNT(fam.*)::smallint as cfamilia FROM afiliados afi LEFT JOIN familiares fam ON fam.cdnititu=afi.cdni \". $busqueda . \" GROUP BY afi.ciden ORDER BY afi.cdeno limit \". $rp. \" offset \". $registros;\n $query = $this->db->query($consulta);\n $this->load->helper('manejacadena_helper');\n foreach ($query->result_array() as $row) {\n $new_row['dni'] = trim($row['cdni']);\n $new_row['deno'] = reemplazacaracter(trim($row['cdeno']));\n $new_row['cuil'] = trim($row['ccuil']);\n $new_row['nuom'] = trim($row['cnuom']);\n $new_row['nume'] = trim($row['cnume']);\n $new_row['familia'] = trim($row['cfamilia']);\n $data['rows'][] = array(\n 'id' => $new_row['dni'],\n 'cell' => array($new_row['dni'], $new_row['deno'],$new_row['nuom'],$new_row['nume'],\n $new_row['cuil'],$new_row['familia'])\n );\n }\n }\n echo json_encode($data);\n }",
"function main()\n{\n if (/*isset($_SESSION[\"tokenSession\"])*/ true) \n {\n $sesion = $_SESSION[\"tokenSession\"];\n $data = array();\n $arregloAuxiliar = null;\n $arregloMascota = null;\n \n $data[\"user\"][\"usuario\"] = extraeUsuario($sesion);\n $data[\"user\"][\"usuarioFoto\"] = extraeArchivo($data[\"user\"][\"usuario\"][\"idArchivo\"]);\n $data[\"user\"][\"mascota\"] = extraeMascotas($data[\"user\"][\"usuario\"][\"idCliente\"]);\n $data[\"empleados\"] = extraeEmpleado ();\n $data[\"servicio\"] = extraeServicio();\n $data[\"tipos\"] = extraeTipos();\n $data[\"razas\"] = extraeRazas();\n \n for ($r = 1; $r <= count($data[\"user\"][\"mascota\"]); $r ++) \n {\n $data[\"user\"][\"raza\"][$r] = extraeRaza($data[\"user\"][\"mascota\"][$r][\"idRaza\"]);\n $data[\"user\"][\"tipo\"][$r] = extraeTipo($data[\"user\"][\"raza\"][$r][\"idTipo\"]);\n $data[\"user\"][\"archivo\"][$r] = extraeArchivo($data[\"user\"][\"mascota\"][$r][\"idArchivo\"]);\n \n $nomMascota = $data[\"user\"][\"mascota\"][$r][\"nombreMa\"];\n $arregloMascota = extraeDetalle($data[\"user\"][\"mascota\"][$r][\"idMascota\"]); \n \n for($m = 1; count($arregloMascota) >= $m; $m++)\n {\n $arregloAuxiliar[\"res$m\"] = extraeReservacion($arregloMascota[\"det$m\"][\"idReservacion\"]);\n }\n \n $data[\"mascota\"][\"mas$r\"] = [\"detalle\" => $arregloMascota, \"reservacion\" => $arregloAuxiliar, \"nombre\" => $nomMascota];\n \n $arregloMascota = null;\n $arregloAuxiliar = null;\n }\n \n $_SESSION[\"tokenIDUser\"] = $data[\"user\"][\"usuario\"][\"idCliente\"];\n return $data;\n } else \n {\n return array(\"estado\" => \"sinSesion\");\n }\n}",
"public function verperfil (){\n extract($_REQUEST);\n\n $db=new clasedb();//instanciando clasedb\n $conex=$db->conectar();//conectando con la base de datos\n\n \n \t$sql=\"SELECT avatar,nombre, correo, pregunta, respuesta FROM usuarios WHERE usuarios.id=\".$_SESSION['id_usuario'];;//query\n \n\t\t\t\n\n //ejecutando query\n if ($res=mysqli_query($conex,$sql)) {\n //echo \"entro\";\n $campos=mysqli_num_fields($res);//cuantos campos trae la consulta \n $filas=mysqli_num_rows($res);//cuantos registro trae la consulta\n $i=0;\n $datos[]=array();//inicializando array\n //extrayendo datos\n while($data=mysqli_fetch_array($res)){\n for ($j=0; $j <$campos ; $j++) { \n $datos[$i][$j]=$data[$j];\n }\n $i++;\n }\n \n header(\"Location: ../Vistas/config/perfil.php?filas=\".$filas.\"&campos=\".$campos.\"&data=\".serialize($datos));\n\n } else {\n echo \"Error en la BD....\";\n }\n \n}",
"function recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}",
"function tampil_data_user()\n\t{\n\t\t$data = mysqli_query($this->connect, \"select * from user\");\n\t\twhile ($d = mysqli_fetch_array($data)) {\n\t\t\t$hasil[] = $d;\n\t\t}\n\t\treturn $hasil;\n\t}",
"public function obtenerGestores(){\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUsuarios();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }",
"function usuarios(){\n\t\t$i=1;\n\t\t$objConexion = conectar(\"on\");\n\t\t$consulta = $objConexion->query(\"SELECT id_usuario,email_usuario,password_usuario,nombre_usuario,rfc_usuario,telefono_usuario,(SELECT tipo FROM tipo_usuario WHERE id_tipo_usuario=tipo_usuario) as tipo FROM usuario\");\n\t\tif($consulta->num_rows == 0){\n\t\t\techo 'No hay usuarios'; /* editar esta opcion */ \n\t \t}\n\t\techo libreriasJS();\n\t\techo '<link type=\"text/css\" href=\"css/tablas.css\" rel=\"stylesheet\" />';\n\t\techo '<div id=\"ventana\">';\n\t\techo '<table border=\"1\">';\n\t\techo '<thead><tr><th scope=\"col\">Correo</th><th scope=\"col\">Clave</th><th scope=\"col\">Nombre</th><th scope=\"col\">RFC</th><th scope=\"col\">Telefono</th><th scope=\"col\">Tipo</th><th scope=\"col\">Acción</th></tr></thead>';\n\t\techo '<tbody>';\n\t\t\twhile($fila=$consulta->fetch_assoc()){\n\t\t\t\tif(($i%2)==0){\n\t\t\t\t\techo '<tr>';\n\t\t\t\t\t\techo '<td>'.$fila['email_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['password_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['nombre_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['rfc_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['telefono_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['tipo'].'</td>';\n\t\t\t\t\t\techo '<td><a href=\"admins_all.php?accion=eliminar_usr&id='.$fila['id_usuario'].'\" data-tooltip=\"Haz click para volver al artículo\"><img src=\"img/btn_del.png\" /></a><a href=\"admins_all.php?accion=editar_usr&id='.$fila['id_usuario'].'\"><img src=\"img/btn_edi.png\" /></a></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}else{\n\t\t\t\t\techo '<tr class=\"odd\">';\n\t\t\t\t\t\techo '<td>'.$fila['email_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['password_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['nombre_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['rfc_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['telefono_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['tipo'].'</td>';\n\t\t\t\t\t\techo '<td><a href=\"admins_all.php?accion=eliminar_usr&id='.$fila['id_usuario'].'\"><img src=\"img/btn_del.png\" /></a><a href=\"admins_all.php?accion=editar_usr&id='.$fila['id_usuario'].'\"><img src=\"img/btn_edi.png\" /></a></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t\t$i+=1;\n\t\t\t}\n\t\techo '</tbody>';\n\t\techo '</table><br /><center><button id=\"agregar\">Agregar nuevo usuario</button> <button id=\"cerrar\">Cerrar el administrador</button></center>';\n\t\techo '</div>';\n\t\tconectar(\"off\");\n\t\techo '<script type=\"text/javascript\">\n\t\t\t\t$(\"button\").button(); \n\t\t\t\tcargar_ventana(\"ventana\",\"Administrador de usuarios\");\n\t\t\t\t$(\"#agregar\").click(function(){\n\t\t\t\t\twindow.location.assign(\"admins_all.php?accion=agregar_usr\");\n\t\t\t\t});\n\t\t\t\t$(\"#cerrar\").click(function(){\n\t\t\t\t\twindow.location.assign(\"menu.php\");\n\t\t\t\t});\n\t\t\t </script>';\n\t}",
"public function somaTodosUsuarios()\n {\n $query = $this->db->query('SELECT COUNT(us_id) AS total_usuarios FROM users_gestores');\n $row = $query->row();\n echo $row->total_usuarios;\n }",
"function GetAllUser(){\n\t\t/*$hasil=$this->db->query(\"SELECT * FROM buku ORDER BY judul_buku\");\n\t\tif($hasil->num_rows()>0){\n\t\t\tforeach($hasil->result() as $row){\n\t\t\t\t$data[]=$row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t*/\n\t\t$query=$this->db->get('user');\n\t\tforeach($query->result() as $row){\n\t\t\t$data[]=$row;\n\t\t}\n\t\treturn $data;\n\t}",
"public function fetchData(){\n \n // init needed libs\n $nedded_libs = array( \n 'models' => array(array('trk_user_model', 'trk_user_model'),\n array('trk_photo_model', 'trk_photo_model'),\n array('trk_uploadactivity_model', 'trk_uploadactivity_model'))\n );\n\n // load needed libs\n SHIN_Core::postInit($nedded_libs);\n \n include(SHIN_Core::isConfigExists('limitations.php'));\n \n $count = 0;\n $statList = '';\n $dataList = array(); \n $userList = SHIN_Core::$_models['trk_user_model']->getUserList();\n \n $search = SHIN_Core::$_input->globalarr('sSearch'); \n $start = SHIN_Core::$_input->globalarr('iDisplayStart'); \n $length = SHIN_Core::$_input->globalarr('iDisplayLength');\n \n $column = SHIN_Core::$_input->globalarr('iSortCol_0');\n $type = SHIN_Core::$_input->globalarr('sSortDir_0'); \n \n\t\t\n\t\t//dump($column);\n switch($column) {\n case 0:\n $name = 'name';\n break;\n case 1:\n $name = 'total_photo';\n break;\n// case 2:\n// $name = 'total_gallery';\n// break;\n case 2:\n $name = 'total_file_size';\n break;\n case 3:\n $name = 'remaining_quota';\n break;\n case 4:\n $name = 'remaining_month_quota';\n break;\n case 5:\n $name = 'total_space_quota';\n break;\n default:\n $name = 'name';\n \n }\n \n\t\t//dump($name);\n $this->orderBy = array($name => $type); \n \n foreach($userList as $user) {\n\t\t\n $totalPhoto = SHIN_Core::$_models['trk_photo_model']->getPhotoCount($user['userId']);\n //\n $totalFileSize = SHIN_Core::$_models['trk_uploadactivity_model']->getTotalUploadedSize($user['userId']);\n $monthBandwidth = SHIN_Core::$_models['trk_uploadactivity_model']->getUsersBandWidth(SHIN_Core::$_user->idUser, date('Y-m-d'));\n \n $remainingQuota = $limitations['lim_total_space_quota'] - $totalFileSize; \n $remainingMonthQuota = $limitations['lim_total_space_quota'] - $monthBandwidth; \n\t\t\t\n \n if(empty($search)) {\n $dataList[] = array('name' => $user['sys_user_name'],\n 'total_photo' => $totalPhoto,\n 'total_file_size' => $this->formatSize($totalFileSize),\n 'remaining_quota' => $this->formatSize($remainingQuota),\n 'remaining_month_quota' => $this->formatSize($remainingMonthQuota),\n 'total_space_quota' => $this->formatSize($limitations['lim_total_space_quota']));\n \n } elseif(stristr($user['name'], $search)) {\n \n $dataList[] = array('name' => $user['name'],\n 'total_photo' => $totalPhoto,\n 'total_file_size' => $this->formatSize($totalFileSize),\n 'remaining_quota' => $this->formatSize($remainingQuota),\n 'remaining_month_quota' => $this->formatSize($remainingMonthQuota),\n 'total_space_quota' => $this->formatSize($limitations['lim_total_space_quota'])); \n } \n }\n \n // 2. make sorting\n\t\t\n usort($dataList, array($this, '_sort_array'));\n // 3. make pagination using array_slice()\n $dataList = array_slice($dataList, $start, $length);\n \n // 4. prepare data for json\n foreach($dataList as $data)\n\t\t{\n $statList .= '[' . implode(',', array('\"' . $data['name'] . '\"',\n '\"' . $data['total_photo'] . '\"',\n '\"' . $data['total_file_size'] . '\"',\n '\"' . $data['remaining_quota'] . '\"',\n '\"' . $data['remaining_month_quota'] . '\"',\n '\"' . $data['total_space_quota'] . '\"')) . '],';\n \n }\n \n \n // json return value \n $sOutput = '{';\n $sOutput .= '\"sEcho\": '.intval(SHIN_Core::$_input->post('sEcho')).', ';\n $sOutput .= '\"iTotalRecords\": '. count($userList) . ', ';\n $sOutput .= '\"iTotalDisplayRecords\": ' . count($dataList) . ', ';\n $sOutput .= '\"aaData\": [' . substr($statList, 0, -1) . '] }'; \n \n echo $sOutput; exit(); \n }",
"public function refreshtitulosAction()\r\n {\r\n $titulos = new Application_Model_CambioTurno_CambioTurno($this->view->user);\r\n $this->_helper->json->sendJson($titulos->getTitulos());\r\n \r\n }",
"function Cargar_servicios_precios($clave, $filadesde, $buscar_servicio, $buscar_fecha){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_servicio != null){\r\n\t\t\t$fech = \" AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND CLAVE_SERVICIO = '\".$buscar_servicio.\"'\";\r\n\t\t\tif($buscar_fecha != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $fech;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_fecha != null){\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT clave_servicio,clave_calendario, pax_desde, pax_hasta, precio, precio_ninos\r\n\t\t\t\t\t\t\t\t\t\tFROM hit_producto_cuadros_servicios_precios \r\n\t\t\t\t\t\t\t\t\t\tWHERE \".$CADENA_BUSCAR.\" ORDER BY numero, fecha_desde, pax_desde\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_SERVICIOS_PRECIOS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_servicios_precios = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['clave_servicio'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_servicios_precios,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_servicios_precios;\r\n\t}",
"public function run()\n {\n //\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 1;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 2;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 3;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 4;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 5;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 6;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 7;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 8;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 9;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 10;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 11;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 12;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 13;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 14;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 15;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 16;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 17;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 18;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 19;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 20;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 21;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 22;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 23;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 24;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 25;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 26;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 27;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 28;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 29;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 30;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 31;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 32;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 33;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 34;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 35;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 36;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 37;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 38;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 39;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n $disponibilidad = new FotoProfesional();\n $disponibilidad->idusuario = 40;\n $disponibilidad->url_foto = \"chica1.jpg\";\n $disponibilidad->orden = 0;\n $disponibilidad->save();\n\n }",
"static public function cargarUsuario($legajo, $email, $nombre, $clave, $fotoUno, $fotoDos)\n {\n $lista = self::LeerJSON(PATH_ARCHIVOS . \"/usuarios.json\", \"Usuario\");\n $Usuario = self::BuscaXCriterio($lista, \"legajo\", $legajo);\n\n if ($Usuario != null) {\n echo \"<br>El Usuario ya existe<br>\";\n } else {\n $nomFotoUno = \"fotoUno_\" . $legajo;\n self::cargarImagenPorNombre($fotoUno, $nomFotoUno, PATH_IMAGENES);\n $nomFotoDos = \"fotoDos_\" . $legajo;\n self::cargarImagenPorNombre($fotoDos, $nomFotoDos, PATH_IMAGENES);\n\n $Usuario = new Usuario($legajo, $email, $nombre, $clave, $nomFotoUno, $nomFotoDos);\n array_push($lista, $Usuario);\n self::guardarJSON($lista, PATH_ARCHIVOS . \"/usuarios.json\", \"Usuario\");\n }\n }",
"function cargar_data($sender, $param)\n {\n $id=$this->Request['id'];\n $sql=\"SELECT id,tipo,denominacion,monto\n FROM organizacion.personas_cargos_asignaciones WHERE(cargo='$id') order by tipo ASC \";\n $resultado=cargar_data($sql, $sender);\n $this->DataGrid->DataSource=$resultado;\n $this->DataGrid->dataBind();\n }",
"protected function loadData()\n\t{\n\t\t$delimiter = \"|||---|||---|||\";\n\t\t$command = 'show --pretty=format:\"%an'.$delimiter.'%ae'.$delimiter.'%cd'.$delimiter.'%s'.$delimiter.'%B'.$delimiter.'%N\" ' . $this->hash;\n\n\t\t$response = $this->repository->run($command);\n\n\t\t$parts = explode($delimiter,$response);\n\t\t$this->_authorName = array_shift($parts);\n\t\t$this->_authorEmail = array_shift($parts);\n\t\t$this->_time = array_shift($parts);\n\t\t$this->_subject = array_shift($parts);\n\t\t$this->_message = array_shift($parts);\n\t\t$this->_notes = array_shift($parts);\n\t}",
"private function loadFilters() {\n\n // buscando usuários\n $companyId = $this->Session->read('CompanyLoggedIn.Company.id');\n $params = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n 'CompaniesUser.user_id'\n ),\n 'conditions' => array(\n 'CompaniesUser.status' => 'ACTIVE'\n )\n )\n );\n $userIds = $this->Utility->urlRequestToGetData('companies', 'list', $params);\n if (!empty($userIds) && empty($userIds ['status'])) {\n $_SESSION ['addOffer'] ['userIds'] = $userIds;\n\n // conta público alvo\n $this->offerFilters ['target'] = count($userIds);\n\n // busca os filtros\n foreach ($this->offerFilters as $key => $value) {\n if ($key == 'gender') {\n $Paramsgenero = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n \"COUNT(User.id) AS count\",\n \"User.gender AS filter\"\n ),\n 'group' => array(\n \"User.gender\"\n ),\n 'order' => array(\n 'COUNT(User.id)' => 'DESC'\n )\n ),\n 'User' => array()\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $Paramsgenero);\n } else if ($key == 'age_group') {\n // busca faixa etária\n $query = \"SELECT\n\t\t\t\t\t SUM(IF(age < 20,1,0)) AS '{$this->ageGroupRangeKeys['0_20']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 20 AND 29,1,0)) AS '{$this->ageGroupRangeKeys['20_29']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 30 AND 39,1,0)) AS '{$this->ageGroupRangeKeys['30_39']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 40 AND 49,1,0)) AS '{$this->ageGroupRangeKeys['40_49']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 50 AND 59,1,0)) AS '{$this->ageGroupRangeKeys['50_59']}',\n\t\t\t\t\t SUM(IF(age >=60, 1, 0)) AS '{$this->ageGroupRangeKeys['60_120']}',\n\t\t\t\t\t SUM(IF(age IS NULL, 1, 0)) AS '{$this->ageGroupRangeKeys['empty']}'\n\t\t\t\t\t\tFROM (SELECT YEAR(CURDATE())-YEAR(birthday) AS age FROM facebook_profiles) AS derived\";\n\n $filterParams = array(\n 'FacebookProfile' => array(\n 'query' => $query\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'query', $filterParams);\n } else {\n $filterParams = array(\n 'FacebookProfile' => array(\n 'fields' => array(\n \"COUNT(FacebookProfile.{$key}) AS count\",\n \"FacebookProfile.{$key} AS filter\"\n ),\n 'conditions' => array(\n 'FacebookProfile.user_id' => $userIds\n ),\n 'group' => array(\n \"FacebookProfile.{$key}\"\n ),\n 'order' => array(\n \"FacebookProfile.{$key}\" => 'ASC'\n )\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $filterParams);\n }\n if (!empty($filter) && empty($filter ['status'])) {\n $this->offerFilters [$key] = $this->formatOfferFilters($filter);\n }\n }\n return $this->offerFilters;\n } else {\n $this->Session->setFlash('Houve um problema para carregar os filtros. Tente novamente.');\n }\n }",
"public function historial_pesos(){\n\t\t\t//El método all() retorna todos los registros\n\t\t\t$dates = Date_action::All();\n\t\t\tforeach ($dates as $date) {\n\t\t\t\t$id_cita = $date->id_cita;\n\t\t\t\t$cita = Date::find($id_cita);\n\t\t\t\t$id_cliente = $cita->id_paciente;\n\t\t\t\t$paciente = Pacient::find($id_cliente);\n\t\t\t\t$nombre_paciente = $paciente->nombre.' '.$paciente->apaterno.' '.$paciente->amaterno;\n\t\t\t\t$pesos_array[] = array('id_paciente'=> $id_cliente, 'nombre'=> $nombre_paciente,\n 'peso'=> $date->peso_actual);\n\t\t\t}\n\t\t\t//Se crea el archivo json, si existe, se sobreescribe\n\t\t\t$collection_2 = Collection::make($pesos_array);\n\t\t\t$collection_2->toJson();\n\t\t\t$file = 'json/pesos.json';\n\t\t\tfile_put_contents($file, $collection_2);\n\t\t}",
"function listuser(){\n\t\t\tif(!empty($_GET['paginado'])){\n\t\t\t\t$pag = $_GET['paginado'];\n\t\t\t\t$list = $this -> model -> selectuser($pag);\n\t\t\t}else{\n\t\t\t\t$list = $this -> model -> selectuser();\n\t\t\t}\n\t\t\t$this -> ajax_set($list);\n\t\t}",
"public function cargarEstados()\r\n {\r\n \r\n $data = $this->cargar_model->cargarEstados();\r\n\r\n print_r(json_encode($data)); \r\n \r\n }",
"private function cargar_acceso_nodos($parametros){\r\n // echo $_SESSION[CookIdUsuario];\r\n //print_r($parametros);\r\n if (strlen($parametros[cod_link])>0){\r\n if(!class_exists('mos_acceso')){\r\n import(\"clases.mos_acceso.mos_acceso\");\r\n }\r\n $acceso = new mos_acceso(); \r\n if ($_SESSION[SuperUser]=='S')\r\n unset($parametros[terceros]); \r\n $data_ids_acceso = $acceso->obtenerNodosArbol($_SESSION[CookIdUsuario],$parametros[cod_link],$parametros[modo],$parametros[terceros]);\r\n //print_r($data_ids_acceso);\r\n foreach ($data_ids_acceso as $value) {\r\n $this->id_org_acceso[$value[id]] = $value;\r\n } \r\n }\r\n }",
"function ListaUsuarios() {\n\t//obtiene el id del usuario\n $sql = \"SELECT usuario.id, usuario.nombre_usuario, persona.primer_nombre, persona.primer_apellido, usuario.estado, rol.descripcion FROM usuario INNER JOIN persona ON usuario.persona_id = persona.id INNER JOIN rol ON usuario.rol_id = rol.id WHERE usuario.estado = 'ACTIVO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\t\t$respuesta->mensaje = \"Usuarios listados\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de usuarios !\";\n\t\t$respuesta->codigo = 0;\n\t}\n\treturn json_encode($respuesta);\n}",
"public function recargar() {\n $this->cargarActas();\n }",
"public function historiqueEnvoie($datedeb, $datefin, $agence)\n {\n require_once('../../lib/classes/Profil.php');\n $profils = new Profil();\n $date1 = $datedeb;\n $date2 = $datefin;\n $agency = $agence;\n $cond=\"\";\n $select= \"\";\n $from=\"\";\n $inclu\n =\"\";\n\n $type_profil=$profils->getProfilByIdInteger($this->idprofil);\n if($type_profil==1)\n {\n $cond.=\" AND tranfert.user_receiver=\".$_SESSION['rowid'];\n }\n if($type_profil==2 || $type_profil==3 || $type_profil==4)\n {\n $cond.=\" AND tranfert.user_receiver = user.rowid AND user.fk_agence =\".$this->idagence;\n }\n\n if($type_profil==6)\n {\n $from.=\", region \";\n $cond.=\" AND user.fk_agence = agence.rowid AND agence.region = region.idregion AND region.DR =\".$_SESSION['fk_DR'] ;\n }\n\n if($agency!=0)\n {\n $inclu.=\" AND agence.rowid =:agency\";\n }else{\n $inclu.=\" \";\n }\n\n $query_rq_historique = \" SELECT tranfert.idtransfert,tranfert.num_transac,tranfert.montant,tranfert.code, tranfert.frais, tranfert.montant_total, \";\n $query_rq_historique.= \" tranfert.date_tranfert, tranfert.nom_sender, tranfert.prenom_sender, tranfert.cin_sender, tranfert.tel_sender, tranfert.pays_sender, \";\n $query_rq_historique.= \" tranfert.nom_receiver, tranfert.prenom_receiver, tranfert.tel_receiver, tranfert.cin_receiver, tranfert.pays_receiver, tranfert.ville_receiver, \";\n $query_rq_historique.= \" tranfert.adresse_receiver,transaction.num_transac, tranfert.user_receiver \";\n $query_rq_historique.= \" FROM tranfert, transaction, agence, user \".$from;\n $query_rq_historique.= \" WHERE tranfert.statut=1 \".$cond.\"\n\t\t\t AND DATE(tranfert.date_tranfert) >= :date1\n\t\t\t AND DATE(tranfert.date_tranfert) <= :date2\n\t\t\t \".$inclu.\"\n\t\t\t AND tranfert.num_transac = transaction.num_transac\n\t\t\t AND transaction.fkuser = user.rowid\n\t\t\t AND user.fk_agence = agence.rowid\";\n $query_rq_historique.= \" ORDER BY transaction.date_transaction DESC \";\n $historique = $this->getConnexion()->prepare($query_rq_historique);\n $historique->bindParam(\"date1\", $date1);\n $historique->bindParam(\"date2\", $date2);\n if($agency!=0) $historique->bindParam(\"agency\", $agency);\n $historique->execute();\n $rs_historique= $historique->fetchAll();\n return $rs_historique;\n }",
"public function tampilDataGalang(){\n\t\t\n\t}",
"public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }",
"function consultaEstudiantes() {\r\n if(!isset($_REQUEST['codProyecto'])||$_REQUEST['codProyecto']<0)\r\n {\r\n echo \"No se seleccionó Proyecto. Por favor regrese y seleccione una opción\";exit;\r\n }\r\n \r\n $estudiantes=array();\r\n $this->estudiantesExitosos=0;\r\n $codProyecto=$_REQUEST['codProyecto'];\r\n if ($codProyecto>10000)\r\n {\r\n $facultad=$codProyecto-10000;\r\n $proyectos=$this->consultarProyectos($facultad);\r\n foreach ($proyectos as $key => $proyecto) {\r\n $estudiantesProyecto=$this->consultarEstudiantes($proyecto['COD_PROYECTO']);\r\n if(is_array($estudiantesProyecto))\r\n {\r\n $estudiantes=array_merge($estudiantes,$estudiantesProyecto);\r\n }\r\n }\r\n $total=count($estudiantes);\r\n }else\r\n {\r\n $estudiantes=$this->consultarEstudiantes($codProyecto);\r\n $total=count($estudiantes);\r\n }\r\n ?>\r\n <html><head>\r\n <script language=\"javascript\">\r\n //Creo una función que imprimira en la hoja el valor del porcentanje asi como el relleno de la barra de progreso\r\n function callprogress(vValor,vItem,vTotal){\r\n document.getElementById(\"getprogress\").innerHTML = vItem+' de '+vTotal+' - '+vValor ;\r\n document.getElementById(\"getProgressBarFill\").innerHTML = '<div class=\"ProgressBarFill\" style=\"width: '+vValor+'%;\"></div>';\r\n }\r\n </script>\r\n <style type=\"text/css\">\r\n /* Ahora creo el estilo que hara que aparesca el porcentanje y relleno del mismoo*/\r\n .ProgressBar { width: 70%; border: 1px solid black; background: #eef; height: 1.25em; display: block; margin-left: auto;margin-right: auto }\r\n .ProgressBarText { position: absolute; font-size: 1em; width: 20em; text-align: center; font-weight: normal; }\r\n .ProgressBarFill { height: 100%; background: #aae; display: block; overflow: visible; }\r\n </style>\r\n </head>\r\n <body>\r\n <!-- Ahora creo la barra de progreso con etiquetas DIV -->\r\n <div class=\"ProgressBar\">\r\n <div class=\"ProgressBarText\"><span id=\"getprogress\"></span> % </div>\r\n <div id=\"getProgressBarFill\"></div>\r\n </div>\r\n </body>\r\n <?\r\n $a=1;\r\n if(is_array($estudiantes)&&!empty($estudiantes))\r\n {\r\n foreach ($estudiantes as $key => $estudiante) {\r\n $this->estudiante=$estudiante['COD_ESTUDIANTE'];\r\n $this->consultarDatos();\r\n $porcentaje = $a * 100 / $total; //saco mi valor en porcentaje\r\n echo \"<script>callprogress(\".round($porcentaje).\",\".$a.\",\".$total.\")</script>\"; //llamo a la función JS(JavaScript) para actualizar el progreso\r\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\r\n ob_flush();\r\n $a++;\r\n if(!isset($this->mensaje[$this->datosEstudiante['CODIGO']]))\r\n {\r\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\"Registro exitoso\";\r\n $this->estudiantesExitosos++;\r\n }\r\n }\r\n }else\r\n {\r\n echo \"<script>callprogress(100,0,0)</script>\"; //llamo a la función JS(JavaScript) para actualizar el progreso\r\n }\r\n \r\n $this->mostrarReporteResultadoProceso($total);\r\n \r\n }",
"private function existenciaDatos() {\n\t\t\tif($this->peticion->post->existencia('boton') == true):\n\t\t\t\t$this->cargarGuion();\n\t\t\telse:\n\t\t\t\texit('El Formulario no proceso los Datos');\n\t\t\tendif;\n\t\t}",
"public function use_obtener_otros_sucursales(){\n $cuenta = $this->ci->session->userdata('usuario'); \n $suc = $this->ci->session->userdata('sucursal');\n $sucursales = $this->ci->arixkernel->select_all_content_where('sucursal_id serial, numero, nombre','config.v_cuenta_sucursal', array('cuenta_id' => $cuenta, 'sucursal_id !=' => $suc, 'estado' => true));\n return $sucursales;\n }"
] | [
"0.66647875",
"0.65418196",
"0.6495498",
"0.6471591",
"0.64632154",
"0.6404893",
"0.6361705",
"0.6267722",
"0.622755",
"0.6178573",
"0.6178238",
"0.6151534",
"0.61235976",
"0.6083238",
"0.60589266",
"0.60574996",
"0.6050549",
"0.6044657",
"0.60117614",
"0.600575",
"0.5998567",
"0.5991595",
"0.59894925",
"0.59734243",
"0.59718037",
"0.5970114",
"0.5967893",
"0.59645563",
"0.59580886",
"0.5953044",
"0.59427047",
"0.5934596",
"0.5928267",
"0.5927178",
"0.5922404",
"0.59211576",
"0.5897966",
"0.58940494",
"0.589172",
"0.58915025",
"0.5870868",
"0.58621436",
"0.5861156",
"0.5855395",
"0.5836004",
"0.5835728",
"0.5826346",
"0.58178705",
"0.5816877",
"0.5810531",
"0.579008",
"0.57819027",
"0.5775219",
"0.57660395",
"0.5762467",
"0.5760528",
"0.5759644",
"0.5758088",
"0.57500046",
"0.57498974",
"0.57498664",
"0.5741476",
"0.57386523",
"0.57376057",
"0.573574",
"0.57311463",
"0.57251245",
"0.572156",
"0.5721292",
"0.571808",
"0.5708187",
"0.57081455",
"0.57032317",
"0.5702898",
"0.56999516",
"0.5696366",
"0.568516",
"0.56832373",
"0.5681168",
"0.5680134",
"0.5678261",
"0.5671834",
"0.567124",
"0.56666327",
"0.5658633",
"0.5655428",
"0.56536317",
"0.5647704",
"0.56471276",
"0.5646969",
"0.5645276",
"0.56448984",
"0.56417775",
"0.5640704",
"0.56341666",
"0.563192",
"0.5628409",
"0.5622404",
"0.5620856",
"0.5619619",
"0.56192607"
] | 0.0 | -1 |
Get the social link profile. | public function getSocialLink(GetRequest $request)
{
return response()->json([
'link' => auth()->user()->profile[$request->platform],
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}",
"public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}",
"public function getProfile()\n {\n return $this->request('me');\n }",
"public function getUserProfile();",
"public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function GetProfile()\n {\n return $this->profile;\n }",
"function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}",
"public function getSocialUrl(): string {\n\t\treturn ($this->socialUrl);\n\t}",
"protected function getUserProfile() {\n $profile = (new FacebookRequest(\n $this->fbSession, 'GET', '/me'\n ))->execute()->getGraphObject(GraphUser::className());\n //return\n return $profile;\n }",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function getUrl() {\n return $this->getProfileUri();\n }",
"function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}",
"private function fetch_social_profiles() {\n\t\t$profiles = [];\n\t\t$social_profiles = [\n\t\t\t'facebook_site',\n\t\t\t'instagram_url',\n\t\t\t'linkedin_url',\n\t\t\t'myspace_url',\n\t\t\t'youtube_url',\n\t\t\t'pinterest_url',\n\t\t\t'wikipedia_url',\n\t\t];\n\t\tforeach ( $social_profiles as $profile ) {\n\t\t\t$social_profile = $this->helpers->options->get( $profile, '' );\n\t\t\tif ( $social_profile !== '' ) {\n\t\t\t\t$profiles[] = \\urldecode( $social_profile );\n\t\t\t}\n\t\t}\n\n\t\t$twitter = $this->helpers->options->get( 'twitter_site', '' );\n\t\tif ( $twitter !== '' ) {\n\t\t\t$profiles[] = 'https://twitter.com/' . $twitter;\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_schema_organization_social_profiles' - Allows filtering social profiles for the\n\t\t * represented organization.\n\t\t *\n\t\t * @api string[] $profiles\n\t\t */\n\t\t$profiles = \\apply_filters( 'wpseo_schema_organization_social_profiles', $profiles );\n\n\t\treturn $profiles;\n\t}",
"public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }",
"public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }",
"public function getSocialPage()\n {\n $result = null;\n if (isset($this->userInfo['screen_name'])) {\n $result = 'http://vk.com/' . $this->userInfo['screen_name'];\n }\n return $result;\n }",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"public function profile() {\n return $this->profile;\n }",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->api('/me'); \r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t} \r\n\r\n\t\t// if the provider identifier is not recived, we assume the auth has failed\r\n\t\tif ( ! isset( $data[\"id\"] ) )\r\n\t\t{ \r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\r\n\t\t}\r\n\r\n\t\t# store the user profile. \r\n\t\t$this->user->profile->identifier = @ $data['id'];\r\n\t\t$this->user->profile->displayName = @ $data['name'];\r\n\t\t$this->user->profile->firstName = @ $data['first_name'];\r\n\t\t$this->user->profile->lastName \t= @ $data['last_name'];\r\n\t\t$this->user->profile->photoURL = \"https://graph.facebook.com/\" . $this->user->profile->identifier . \"/picture\";\r\n\t\t$this->user->profile->profileURL \t= @ $data['link']; \r\n\t\t$this->user->profile->webSiteURL \t= @ $data['website']; \r\n\t\t$this->user->profile->gender \t= @ $data['gender'];\r\n\t\t$this->user->profile->description \t= @ $data['bio'];\r\n\t\t$this->user->profile->email \t= @ $data['email'];\r\n\t\t$this->user->profile->region \t= @ $data['hometown'][\"name\"];\r\n\r\n\t\tif( isset( $data['birthday'] ) ) {\r\n\t\t\tlist($birthday_month, $birthday_day, $birthday_year) = @ explode('/', $data['birthday'] );\r\n\r\n\t\t\t$this->user->profile->birthDay = $birthday_day;\r\n\t\t\t$this->user->profile->birthMonth = $birthday_month;\r\n\t\t\t$this->user->profile->birthYear = $birthday_year;\r\n\t\t}\r\n\r\n\t\treturn $this->user->profile;\r\n \t}",
"public function getAvatar()\n\t{\n\t\treturn $this->instance->profile;\n\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}",
"abstract protected function getUserProfile();",
"protected function _getAvatar()\n {\n $avatar = null;\n if (isset($this->social_accounts[0])) {\n $avatar = $this->social_accounts[0]['avatar'];\n }\n\n return $avatar;\n }",
"public function getProfile()\n {\n $profile = new \\login\\user\\Profile($this->db);\n if (array_key_exists('profile_id', $this->data)) {\n $profile->loadFromId($this->data['profile_id']);\n }\n return $profile;\n }",
"public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}",
"public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }",
"public function getAvatar()\n {\n return $this->getProfilePicture();\n }",
"public function socials()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select(['prefix AS social', 'value AS url', 'is_primary'])\n ->where('type', 'social');\n }",
"function profileUrl()\r\n {\r\n return \"/user/show/{$this->id}\";\r\n }",
"public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }",
"public function userProfile() {\n\t\t\t$request = $this->api(\"GET\", \"/me\");\n\t\t\t\n\t\t\t$request->execute();\n\t\t\t$response = $request->responseObject();\n\t\t\t$response->id = $response->ID;\n\t\t\treturn $response;\n\t\t}",
"public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->getProfile( $this->api->getCurrentUserId() );\r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t}\r\n\r\n\t\tif ( ! is_object( $data ) )\r\n\t\t{\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalide response.\", 6 );\r\n\t\t} \r\n\r\n\t\t$this->user->profile->identifier = $this->api->getCurrentUserId();\r\n\t\t$this->user->profile->displayName \t= @ $data->basicprofile->name;\r\n\t\t$this->user->profile->description \t= @ $data->aboutme;\r\n\t\t$this->user->profile->gender \t= @ $data->basicprofile->gender;\r\n\t\t$this->user->profile->photoURL \t= @ $data->basicprofile->image;\r\n\t\t$this->user->profile->profileURL \t= @ $data->basicprofile->webUri;\r\n\t\t$this->user->profile->age \t\t\t= @ $data->age;\r\n\t\t$this->user->profile->country \t\t= @ $data->country;\r\n\t\t$this->user->profile->region \t\t= @ $data->region;\r\n\t\t$this->user->profile->city \t\t\t= @ $data->city;\r\n\t\t$this->user->profile->zip \t\t\t= @ $data->postalcode;\r\n\r\n\t\treturn $this->user->profile;\r\n\t}",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }",
"public function profile()\n { \n $user = Auth::user();\n $profile = $user->student;\n return $user;\n \n }",
"public function getImageProfile() {\n\t\t$basePath = Yii::getAlias ( '@web' );\n\t\t\n\t\t$usuarioFacebook = $this->entUsuariosFacebook;\n\t\t\n\t\tif(empty($usuarioFacebook)){\n\t\t\tif ($this->txt_imagen) {\n\t\t\t\treturn $basePath . '/profiles/' . $this->txt_token.\"/\". $this->txt_imagen;\n\t\t\t}\n\t\t\t\n\t\t\treturn $basePath . '/webAssets/images/site/user.png';\n\t\t}\n\t\t\n\t\treturn 'http://graph.facebook.com/'.$usuarioFacebook->id_facebook.'/picture';\n\t\t\n\t}",
"public function getProfileImageURL()\n {\n return 'https://avatars3.githubusercontent.com/u/4479918?v=4&s=460';\n }",
"function userSocial($social){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT $social FROM employes WHERE iduser=\".$this->userInfo('id'));\r\n\t\t\ttry{\r\n\t\t\t\t$req->execute();\r\n\t\t\t\t$data = $req->fetch();\r\n\r\n\t\t\t\tif(isset($data->$social)){\r\n\t\t\t\t\treturn $data->$social;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\treturn \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (PDOException $e){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t}",
"public function getSocial(string $provider)\n {\n return $this->socials()\n ->whereProvider($provider)\n ->first();\n }",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function getProfilePhotoUrlAttribute()\n {\n return $this->profile_photo_path\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->defaultProfilePhotoUrl();\n }",
"public function getProfilePicture();",
"public function getAvatar()\n {\n return $this->profile->getAvatar();\n }",
"public function getUserProfile() {\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT p.firstName, p.lastName, p.dob, p.addressFirst, p.addressSecond, p.city, p.postcode, p.mobile, p.bio\n FROM users AS u\n JOIN profiles AS p ON p.userId = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }\n }",
"public function getAvatar()\n {\n return $this->getFirstMediaUrl() ?: get_gravatar($this->email);\n }",
"public function getProfile()\n {\n return $this->hasOne(Profile::className(), ['user_id' => 'id']);\n }",
"public function getProfile()\n {\n return $this->hasOne(Profile::className(), ['id' => 'profile_id']);\n }",
"public function getSocialId(): Uuid {\n\t\treturn $this->socialId;\n\t}",
"public function getSpotifyProfilePicture()\n {\n return $this->spotifyProfilePicture;\n }",
"public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path ?: $this->defaultProfilePhotoUrl();\n }",
"public function getProfileImageURL()\n {\n return 'https://s.gravatar.com/avatar/9ff2a97e7faf3529f1b78f1f737ebca0?s=80';\n }",
"public static function getProfile(string $accesToken): SocialNetworkUser\n {\n if (TESTING_ENVIRONMENT === env('APP_ENV')) {\n return SocialNetworkUser::getFakeUser();\n }\n\n $http = new Client();\n\n $response = $http->request('GET', self::OPEN_GRAPH_URL, [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json',\n ],\n 'query' => [\n 'access_token' => $accesToken,\n ],\n ]);\n\n $response = json_decode($response->getBody()->getContents());\n\n return (new SocialNetworkUser())\n ->setId($response->id ?? null)\n ->setEmail($response->email ?? null)\n ->setName($response->given_name ?? null)\n ->setLastName($response->family_name ?? null)\n ->setPhoto($response->picture ?? null);\n }",
"public function getProfileImg()\n {\n return $this->profile_img;\n }",
"public function userProfile()\n {\n return $this->hasOne(config('aggregator.namespace').'UserProfile');\n }",
"public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }",
"public function getUserAvatarUrl()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_AVATAR_URL);\n }",
"public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}",
"public function getUserProfileInstance()\n {\n $entity = null;\n\n if ($this instanceof \\UserProfile) {\n $entity = $this;\n } elseif ($this instanceof \\PortalUser) {\n $entity = $this->getRelated('UserProfile');\n } else {\n $portalUser = $this->getPortalUser();\n if ($portalUser == null) {\n return null;\n }\n $entity = $portalUser->getRelated('UserProfile');\n }\n\n $this->checkJoin($this, $entity);\n\n return $entity;\n }",
"public function getProfileImg()\n {\n return $this->profileImg;\n }",
"private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }",
"public function profile()\n {\n return Auth::user();\n }",
"public function showProfile()\n\t{\n\t\t$data = array(\n\t\t\t'profile' => $this->profile,\n\t\t\t'socialMediaAccounts' => $this->profileService->getSocialMediaAccountsForProfile($this->profile)->toArray(),\n\t\t\t'socialMediaMax' => Config::get('profile.social_media.max'),\n\t\t\t'socialMediaTypes' => $this->profileService->getSocialMediaTypes(),\n\t\t\t'maxQuote' => $this->profile->program->type->name == 'mbo' ? 75 : 175\n\t\t);\n\n\t\treturn new ProfileView($data);\n\t}",
"public function getUserProfile()\n {\n $this->sandbox = ($this->config[\"paypal_sandbox\"] == 'Y');\n\n // refresh tokens if needed\n $this->refreshToken();\n\n // store for seamless checkout\n Tygh::$app['session']['paypal_token'] = $this->token( \"access_token\" );\n\n // ask google api for user infos\n $response = $this->api->api( \"https://api\".($this->sandbox?'.sandbox' : '').\".paypal.com/v1/identity/openidconnect/userinfo/?schema=openid\" );\n\n if ( ! isset( $response->user_id ) || isset( $response->message ) ) {\n throw new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n }\n\n $this->user->profile->identifier = (property_exists($response,'user_id'))? md5($response->user_id):\"\";\n $this->user->profile->firstName = (property_exists($response,'given_name'))?$response->given_name:\"\";\n $this->user->profile->lastName = (property_exists($response,'family_name'))?$response->family_name:\"\";\n $this->user->profile->displayName = (property_exists($response,'name'))?$response->name:\"\";\n $this->user->profile->photoURL = (property_exists($response,'picture'))?$response->picture:\"\";\n $this->user->profile->gender = (property_exists($response,'gender'))?$response->gender:\"\";\n $this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n $this->user->profile->emailVerified = (property_exists($response,'email_verified'))?$response->email_verified:\"\";\n $this->user->profile->language = (property_exists($response,'locale'))?$response->locale:\"\";\n $this->user->profile->phone = (property_exists($response,'phone_number'))?$response->phone_number:\"\";\n if (property_exists($response,'address')) {\n $address = $response->address;\n $this->user->profile->address = (property_exists($address,'street_address'))?$address->street_address:\"\";\n $this->user->profile->city = (property_exists($address,'locality'))?$address->locality:\"\";\n $this->user->profile->zip = (property_exists($address,'postal_code'))?$address->postal_code:\"\";\n $this->user->profile->country = (property_exists($address,'country'))?$address->country:\"\";\n $this->user->profile->region = (property_exists($address,'region'))?$address->region:\"\";\n }\n\n if ( property_exists($response,'birthdate') ) {\n if (strpos($response->birthdate, '-') === false) {\n if ($response->birthdate !== '0000') {\n $this->user->profile->birthYear = (int) $response->birthdate;\n }\n } else {\n list($birthday_year, $birthday_month, $birthday_day) = explode( '-', $response->birthdate );\n\n $this->user->profile->birthDay = (int) $birthday_day;\n $this->user->profile->birthMonth = (int) $birthday_month;\n if ($birthday_year !== '0000') {\n $this->user->profile->birthYear = (int) $birthday_year;\n }\n }\n }\n\n return $this->user->profile;\n }",
"public function getUserProfile() {\n\n\t\t$data = $this->api->get( 'people/~:('. implode(',', $this->config['fields']) .')?format=json' );\n\n\t\t// if the provider identifier is not received, we assume the auth has failed\n\t\tif ( ! isset( $data->id ) ) {\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response: \" . Hybrid_Logger::dumpData( $data ), 6 );\n\t\t}\n\n\t\t// # store the user profile.\n\t\t$this->user->profile->identifier = ( property_exists ( $data, 'id' ) ) ? $data->id : '';\n\t\t$this->user->profile->firstName = ( property_exists ( $data, 'firstName' ) ) ? $data->firstName : '';\n\t\t$this->user->profile->lastName = ( property_exists ( $data, 'lastName' ) ) ? $data->lastName : '';\n\t\t$this->user->profile->profileURL = ( property_exists ( $data, 'publicProfileUrl' ) ) ? $data->publicProfileUrl : '';\n\t\t$this->user->profile->email = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->emailVerified = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->photoURL = ( property_exists ( $data, 'pictureUrl' ) ) ? $data->pictureUrl : '';\n\t\t$this->user->profile->description = ( property_exists ( $data, 'summary' ) ) ? $data->summary : '';\n\t\t$this->user->profile->country = ( property_exists ( $data, 'country' ) ) ? strtoupper( $data->country ) : '';\n\t\t$this->user->profile->displayName = trim( $this->user->profile->firstName . ' ' . $this->user->profile->lastName );\n\n\t\tif ( property_exists( $data, 'phoneNumbers' ) && property_exists( $data->phoneNumbers, 'phoneNumber' ) ) {\n\t\t\t$this->user->profile->phone = (string) $data->phoneNumbers->phoneNumber;\n\t\t} else {\n\t\t\t$this->user->profile->phone = null;\n\t\t}\n\n\t\tif ( property_exists( $data, 'dateOfBirth' ) ) {\n\t\t\t$this->user->profile->birthDay = (string) $data->dateOfBirth->day;\n\t\t\t$this->user->profile->birthMonth = (string) $data->dateOfBirth->month;\n\t\t\t$this->user->profile->birthYear = (string) $data->dateOfBirth->year;\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"public function getProfileImage(){\n\t\t// To hook into this function we could use a an event:\n\t\t// $event = new CEvent();\n\t\t// $this->onGetProfileImage($event)\n\t\t// // then if the event has been handled \n\t\t// if($event->handled)\n\t\t// // we know another function has handled the event and found us an image url for this user\n\t\t// // it could store this in the event object\n\t\t// return $event->params->imageUrl \n\t\t\n\t\t// Display guest photo\n\t\treturn Yii::app()->controller->createWidget('nii.widgets.Gravatar',array('email'=>$this->email))->getUrl();\n\t}",
"public static function getProfile($gotuser) {\n $assocprofile = User::with('profile')->find($gotuser->id)->profile;\n return $assocprofile;\n }",
"public function twitter_user_profile() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $TwitterHelper = new TwitterHelperFunction();\n $properties = ['token_access'];\n $response_token = \\Drupal::service('social_media.social_media_controller')->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $connection = new TwitterOAuth($TwitterHelper->getTwitterApiKey(), $TwitterHelper->getTwitterSecretKey(), $response_token['token_access']->oauth_token, $response_token['token_access']->oauth_token_secret);\n $verify_account = $connection->get('account/verify_credentials');\n return $verify_account;\n }",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function show()\n\t{\n\t\t// get user model\n\t\tif (Auth::check()) {\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\treturn $profile;\n\t\t} else {\n\t\t\treturn 'fail';\n\t\t}\n\t}",
"public function getWebsiteProfile()\n {\n $websiteProfileData = json_decode($this->getConfigValue('websiteProfile'), true);\n if (empty($websiteProfileData)) {\n return null;\n }\n\n return WebsiteProfile::fromArray($websiteProfileData);\n }",
"function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }",
"function fc_get_jomSocial_avatar(){\r\n\t$user =& CFactory::getUser($userid);\r\n\t\r\n\t// Retrieve the avatar.\r\n\treturn correct_avatar_path($user->getThumbAvatar());\r\n}",
"public function AvatarURL() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['avatar150'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"private function getSocialUserName($social_link)\n {\n $path = parse_url($social_link, PHP_URL_PATH);\n if ($path && !is_null($path)) {\n $f_n_array = explode('/', $path);\n if (count($f_n_array) > 0) {\n return $f_n_array[(count($f_n_array) - 1)];\n } else {\n return $path;\n }\n }\n\n return '';\n }",
"protected function getUserFromAccessToken()\n {\n try {\n return $this->api('GET', '/v1/people/~:(id,firstName,lastName,headline)');\n } catch (LinkedInApiException $e) {\n return;\n }\n }",
"public function getProfilePictureUrlAttribute()\n {\n if (empty($this->profile_picture)) {\n return null;\n }\n\n return Storage::url(file_path($this->uploadPath(), $this->profile_picture));\n }",
"function nsh_social() {\n\n\t$social = nsh_get_social();\n\n\tif ( $social ) {\n\t\techo $social;\n\t}\n\n}",
"public function profile()\n\t{\n\t\treturn $this->hasOne('App\\Models\\UserProfile', 'user_id', 'id');\n\t}",
"function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}",
"public function get_profile($user_profile_data){\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to get contents of user profile\n\t\t$user_profile_data = UserProfileHelper::get_user_profile($user_id);\n\t\treturn $user_profile_data;\n\t}",
"public function get_profile($seo)\n\t{\n\t\t$this->db->select(\"*,sha1(id_profile) as ref\");\n\t\t$this->db->where(array(\"judul_seo\"=>$seo));\n\t\t$hasil = $this->db->get($this->profile_table);\n\t\treturn $hasil->row();\n\t}",
"public function get_profile($seo)\n\t{\n\t\t$this->db->select(\"*,sha1(id_profile) as ref\");\n\t\t$this->db->where(array(\"judul_seo\"=>$seo));\n\t\t$hasil = $this->db->get($this->profile_table);\n\t\treturn $hasil->row();\n\t}",
"function wpcom_vip_get_user_profile( $email_or_id ) {\n\n\tif ( is_numeric( $email_or_id ) ) {\n\t\t$user = get_user_by( 'id', $email_or_id );\n\t\tif ( ! $user )\n\t\t\treturn false;\n\n\t\t$email = $user->user_email;\n\t} elseif ( is_email( $email_or_id ) ) {\n\t\t$email = $email_or_id;\n\t} else {\n\t\t$user_login = sanitize_user( $email_or_id, true );\n\t\t$user = get_user_by( 'login', $user_login );\n\t\tif ( ! $user )\n\t\t\treturn;\n\n\t\t$email = $user->user_email;\n\t}\n\n\t$hashed_email = md5( strtolower( trim( $email ) ) );\n\t$profile_url = esc_url_raw( sprintf( '%s.gravatar.com/%s.php', ( is_ssl() ? 'https://secure' : 'http://www' ), $hashed_email ), array( 'http', 'https' ) );\n\n\t$profile = wpcom_vip_file_get_contents( $profile_url, 1, 900 );\n\tif ( $profile ) {\n\t\t$profile = unserialize( $profile );\n\n\t\tif ( is_array( $profile ) && ! empty( $profile['entry'] ) && is_array( $profile['entry'] ) ) {\n\t\t\t$profile = $profile['entry'][0];\n\t\t} else {\n\t\t\t$profile = false;\n\t\t}\n\t}\n\treturn $profile;\n}",
"public function profile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profile');\n\n return $this->loadPublicView('user.profile', $breadCrumb['data']);\n }",
"public function getManageProfile() {\n\t\treturn $this->manageProfile;\n\t}",
"public function woo_slg_get_linkedin_user_data() {\n\t\t\t\n\t\t\t$user_profile_data = '';\n\t\t\t\n\t\t\t$user_profile_data = \\WSL\\Persistent\\WOOSLGPersistent::get('woo_slg_linkedin_user_cache');\n\t\t\t\n\t\t\t\\WSL\\Persistent\\WOOSLGPersistent::delete('woo_slg_linkedin_user_cache');\n\n\t\t\treturn $user_profile_data;\n\t\t}",
"public function profile()\n {\n $profile = Auth::user();\n return response()->json(compact('profile'));\n }",
"private function parse_facebook_profile($user_info)\n {\n $user_profile = new SocialProfile();\n\n foreach($user_info as $key => $field)\n {\n switch ($key)\n {\n case 'id':\n $user_profile->id = $field;\n break;\n case 'first_name':\n $user_profile->given_name = $field;\n break;\n case 'last_name':\n $user_profile->last_name = $field;\n break;\n case 'gender':\n $user_profile->gender = $field;\n break;\n case 'email':\n $user_profile->email = $field;\n break;\n default:\n break;\n }\n }\n\n return $user_profile;\n }",
"public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }",
"public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }",
"function getUserProfile()\n\t{\n\t\t$response = $this->api->get( 'user/get.json' );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->id_user ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\n\t\t# store the user profile.\n\t\t$this->user->profile->identifier = (property_exists($response,'id_user'))?$response->id_user:\"\";\n\t\t$this->user->profile->displayName = (property_exists($response,'username'))?$response->username:\"\";\n\t\t$this->user->profile->profileURL = (property_exists($response,'user_url'))?$response->user_url:\"\";\n\t\t$this->user->profile->photoURL = (property_exists($response,'avatar_url'))?$response->avatar_url:\"\";\n//unknown\t\t$this->user->profile->description = (property_exists($response,'description'))?$response->description:\"\";\n\t\t$this->user->profile->firstName = (property_exists($response,'firstname'))?$response->firstname:\"\";\n\t\t$this->user->profile->lastName = (property_exists($response,'name'))?$response->name:\"\";\n\n\t\tif( property_exists($response,'gender') ) {\n\t\t\tif( $response->gender == 1 ){\n\t\t\t\t$this->user->profile->gender = \"male\";\n\t\t\t}\n\t\t\telseif( $response->gender == 2 ){\n\t\t\t\t$this->user->profile->gender = \"female\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->user->profile->gender = \"\";\n\t\t\t}\n\t\t}\n\n\t\t$this->user->profile->language = (property_exists($response,'lang'))?$response->lang:\"\";\n\n\t\tif( property_exists( $response,'birth_date' ) && $response->birth_date ) {\n $birthday = date_parse($response->birth_date);\n\t\t\t$this->user->profile->birthDay = $birthday[\"day\"];\n\t\t\t$this->user->profile->birthMonth = $birthday[\"month\"];\n\t\t\t$this->user->profile->birthYear = $birthday[\"year\"];\n\t\t}\n\n\t\t$this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n\t\t$this->user->profile->emailVerified = (property_exists($response,'email'))?$response->email:\"\";\n\n//unknown\t\t$this->user->profile->phone = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->address = (property_exists($response,'address1'))?$response->address1:\"\";\n\t\t$this->user->profile->address .= (property_exists($response,'address2'))?$response->address2:\"\";\n\t\t$this->user->profile->country = (property_exists($response,'country'))?$response->country:\"\";\n//unknown\t\t$this->user->profile->region = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->city = (property_exists($response,'city'))?$response->city:\"\";\n\t\t$this->user->profile->zip = (property_exists($response,'postalcode'))?$response->postalcode:\"\";\n\n\t\treturn $this->user->profile;\n\t}"
] | [
"0.71583956",
"0.7031077",
"0.7030198",
"0.70263696",
"0.7023635",
"0.6977801",
"0.6977801",
"0.6977801",
"0.6966012",
"0.69169104",
"0.6867503",
"0.68170285",
"0.6813979",
"0.67681503",
"0.6758419",
"0.67504925",
"0.6696678",
"0.6695514",
"0.6650981",
"0.663111",
"0.65945697",
"0.6573804",
"0.65574396",
"0.65261877",
"0.65117985",
"0.65033424",
"0.6500091",
"0.6481247",
"0.64379716",
"0.6433457",
"0.64262575",
"0.6425826",
"0.6414983",
"0.63571465",
"0.63404715",
"0.6275228",
"0.6267355",
"0.6263325",
"0.6262555",
"0.6252052",
"0.6231475",
"0.6228274",
"0.6211952",
"0.6197883",
"0.61888194",
"0.6187103",
"0.6179007",
"0.6178382",
"0.6172344",
"0.61373097",
"0.61350876",
"0.61322045",
"0.6127713",
"0.6123135",
"0.61205614",
"0.6112541",
"0.6106107",
"0.6104142",
"0.6095879",
"0.60896313",
"0.608371",
"0.6063436",
"0.6063314",
"0.6060895",
"0.60588837",
"0.60443425",
"0.6042328",
"0.6035555",
"0.6019881",
"0.6011679",
"0.6009687",
"0.59959835",
"0.59831357",
"0.5976212",
"0.5974195",
"0.596855",
"0.59581",
"0.59537274",
"0.5945823",
"0.59374845",
"0.5937411",
"0.59300345",
"0.5928639",
"0.5923936",
"0.59175324",
"0.5914666",
"0.59112805",
"0.5900939",
"0.5895872",
"0.58948404",
"0.58948404",
"0.5892131",
"0.5886639",
"0.5882878",
"0.58827883",
"0.58717376",
"0.58681524",
"0.5865672",
"0.5865672",
"0.5855395"
] | 0.62255204 | 42 |
Saves a social link. | public function saveSocialLink(UpdateRequest $request)
{
$profile = auth()->user()->profile;
$profile[$request->platform] = $request->link;
try {
$profile->save();
return response()->json([
'link' => $request->link,
]);
} catch (\Exception $e) {
abort(500, $e->getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(SocialRequest $request)\n {\n\n $social = new Social();\n\n $social->icon = $request->icon;\n\n $social->href = $request->link;\n\n $social->save();\n\n return redirect('/socials');\n\n }",
"function save()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$post\t= JRequest::get('post');\n\t\t$cid\t= JRequest::getVar( 'cid', array(0), 'post', 'array' );\n\t\t$post['id'] = (int) $cid[0];\n\n\t\t$model = $this->getModel('weblink');\n\n\t\tif ($model->store($post)) {\n\t\t\t$msg = JText::_( 'Weblink Saved' );\n\t\t} else {\n\t\t\t$msg = JText::_( 'Error Saving Weblink' );\n\t\t}\n\n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$model->checkin();\n\t\t$link = 'index.php?option=com_weblinks';\n\t\t$this->setRedirect($link, $msg);\n\t}",
"public function insert(){\n\t\t$facebook = $_POST['facebook'];\n $linkedin = $_POST['linkedin'];\n $twitter = $_POST['twitter'];\n $youtube = $_POST['youtube'];\n\t\t$sql= $this->link->query(\"INSERT INTO social(facebook,linkedin,twitter,youtube)VALUES('$facebook','$linkedin','$twitter','$youtube')\");\n if($sql){\n\t\techo \"<script>alert('link created')</script>\";\n\t\techo \"<script>window.location.href = './social.php'</script>\";\n exit;\n\t }\n\t}",
"public function store(Request $request)\n {\n //validation\n $validateData = $request->validate([\n 'icon_class' => 'required',\n 'name' => 'required',\n 'link' => 'required|url'\n ]);\n \n //saving data on database\n $sociallink = new Social_link();\n $sociallink->icon_class = $request->icon_class;\n $sociallink->name = $request->name;\n $sociallink->link = $request->link;\n $sociallink->save();\n toastr()->success('Social link successfully added!');\n return redirect()->back();\n }",
"public function savesocial()\n {\n $id = 1; // make $id to always be one\n //Add validation for new social_setting info being inputed in table\n request()->validate([\n 'facebook_url' => ['nullable', 'url'],\n 'twitter_url' => ['nullable', 'url'],\n 'instagram_url' => ['nullable', 'url'],\n ]);\n\n //Select social_setting by id and rename every value\n $social_setting = socialSetting::find($id);\n $social_setting->facebook_url = request('facebook_url');\n $social_setting->twitter_url = request('twitter_url');\n $social_setting->instagram_url = request('instagram_url');\n $social_setting->save();\n return redirect('admin/settings/social');\n }",
"public function saveSocialMedia($socialData=null){\n if($socialData){\n if($this->save($socialData)){\t\t \n return true; //Success\n }else{\t\t\t\n return false;// Failure \n }\t \n } \n }",
"public function store(LinkRequest $request)\n {\n $links = new link;\n\n $links -> name = $request -> input('name','');\n $links -> url = $request -> input('url','');\n\n if($links -> save()){\n return redirect('/admin/link') -> with('success','添加成功');\n }else{\n return back() -> with('error','添加失败');\n }\n }",
"public function save_links($data){\n\n // Insert Data In Links Table\n $this->db->insert($data,'links');\n \n }",
"public function update(SocialFormRequest $request)\n {\n $data = $request->except('_token');\n \n try {\n $this->socialLinksService->update($data);\n \n return redirect()->back()->with(\n 'notifications',\n ['type' => 'success', 'message' => 'Social links saved']\n );\n } catch(\\Exception $e) {\n report($e);\n \n return redirect()->back()->with(\n 'notifications',\n ['type' => 'error', 'message' => 'Social links edit error']\n );\n }\n }",
"function press_save_link( $post_id ){\n\tif ( !isset( $_POST['press_link_box_nonce'] ) || !wp_verify_nonce( $_POST['press_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n}\n //save value\n if ( isset( $_REQUEST['press_link'] ) ) {\n\tupdate_post_meta( $post_id, '_press_link', sanitize_text_field( $_POST['press_link'] ) );\n}\n \n}",
"function save()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit('Invalid Token');\n\n\t\t// Get some objects from the JApplication\n\t\t$db\t\t= &JFactory::getDbo();\n\t\t$user\t= &JFactory::getUser();\n\n\t\t// Must be logged in\n\t\tif ($user->get('id') < 1) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\t//get data from the request\n\t\t$post = JRequest::getVar('jform', array(), 'post', 'array');\n\n\t\t$model = $this->getModel('weblink');\n\n\t\tif ($model->store($post)) {\n\t\t\t$msg = JText::_('Weblink Saved');\n\t\t} else {\n\t\t\t$msg = JText::_('Error Saving Weblink');\n\t\t}\n\n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$model->checkin();\n\n\t\t// Get the user groups setup to receive notifications of new weblinks.\n\t\t$access = new JAccess();\n\t\t$groups = $access->getAuthorisedUsergroups('com_weblinks.submit.notify');\n\t\t$groups = count($groups) ? implode(',', $groups) : '0';\n\n\t\t// list of admins\n\t\t$query = 'SELECT u.email, u.name' .\n\t\t\t\t' FROM #__users AS u' .\n\t\t\t\t' JOIN #__users_usergroup_map AS m ON m.group_id IN ('.$groups.')' .\n\t\t\t\t' AND u.sendEmail = 1';\n\t\t$db->setQuery($query);\n\t\tif (!$db->query()) {\n\t\t\tJError::raiseError(500, $db->stderr(true));\n\t\t\treturn;\n\t\t}\n\t\t$adminRows = $db->loadObjectList();\n\n\t\t// send email notification to admins\n\t\tforeach ($adminRows as $adminRow) {\n\t\t\tJUtility::sendAdminMail($adminRow->name, $adminRow->email, '', JText::_('Web Link'), $post['title'].\" URL link \".$post[url], $user->get('username'), JURI::base());\n\t\t}\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_weblinks&view=category&id='.$post['catid'], false), $msg);\n\t}",
"public function save(GC_Model_Link $object)\n {\n $data = array(\n\t\t\t\t'nome' => $object->getNome(),\n\t\t\t\t'descricao' => $object->getDescricao(),\n\t\t\t\t'url' => $object->getUrl(),\n\t\t\t\t'validade_inicio' => $object->getValidadeInicio(),\n\t\t\t\t'validade_termino' => $object->getValidadeTermino(),\n\t\t\t\t'data_desativacao' => $object->getDataDesativacao(),\n\t\t\t\t'data_auto_reativar' => $object->getDataAutoReativar(),\n\t\t\t\t'motivo_desativacao' => $object->getMotivoDesativacao(),\n 'menu' => $object->getMenu(),\n 'rowinfo'=> $object->getRowinfo(),\n\n );\n\n if (null === ($id = $object->getId())) {\n unset($data['id']);\n $object->setId($this->getDbTable()->insert($data));\n } else {\n $this->getDbTable()->update($data, array('id = ?' => $id));\n }\n }",
"public function save()\r\n\t{\r\n\t\t// save the parent object and thus the status table\r\n\t\tparent::save();\r\n\t\t// grab the newly inserted status ID\r\n\t\t$id = $this->getID();\r\n\t\t// insert into the link status table, using the same ID\r\n\t\t$extended = array();\r\n\t\t$extended['id'] = $id;\r\n\t\t$extended['URL'] = $this->url;\r\n\t\t$extended['description'] = $this->description;\r\n\t\t$this->registry->getObject('db')->insertRecords( 'statuses_links', $extended );\r\n\t}",
"public function updateSocial ()\n {\n foreach ($this->user->social as $social_key => $social)\n {\n if($social->url !== $social->full_link)\n {\n if(strpos($social->full_link, $social->contain) === false) {\n $count = count(explode('://', $social->full_link));\n\n if($count > 1) {\n $social->full_link = $social->url;\n }else {\n $social->full_link = strtolower($social->url.$social->full_link);\n }\n }\n }\n }\n\n u()->update([\n 'social' => $this->user->social\n ]);\n\n return $this->message('Settings updated!', 'Social settings successfully updated.', true, $this->user);\n }",
"public function update(SocialRequest $request, $social)\n {\n\n $social = Social::find($social);\n\n $social->icon = $request->icon;\n\n $social->href = $request->link;\n\n $social->save();\n\n return redirect('/socials');\n\n }",
"public function postSocial(Request $request)\n {\n $rules = [\n 'facebook' => 'required',\n 'twitter' => 'required',\n 'linkedin' => 'required',\n 'instagram' => 'required',\n 'youtube' => 'nullable',\n 'google_plus' => 'nullable',\n ];\n\n $messages = [\n 'facebook.required' => 'هذا الحقل مطلوب ادخاله',\n 'twitter.required' => 'هذا الحقل مطلوب ادخاله',\n 'linkedin.required' => 'هذا الحقل مطلوب ادخاله',\n 'instagram.required' => 'هذا الحقل مطلوب ادخاله',\n ];\n\n $this->validate($request, $rules, $messages);\n Social::first()->update($request->all());\n\n flash('تم التعديل بنجاح')->success();\n return back();\n }",
"public function store(LinkPost $request)\n {\n $link = new Link();\n $link->name = $request->name;\n $link->active = $request->active;\n $link->parent_id = $request->parent_id;\n $link->save();\n\n return redirect()->route(\"admin.links.index\")\n ->with(Messages::SUCCESS, Messages::LINK[Messages::CREATED]);\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n ]);\n $file = new Mediasocial;\n $file->name = $request->name;\n $file->link = $request->link;\n $file->save();\n\n return redirect('social');\n }",
"public function save_links($data){\n\t\t$this->db->insert('links', $data);\n\t\treturn $insert_id = $this->db->insert_id();\n\t}",
"public function update(){\n $facebook = $_POST['facebook'];\n $linkedin = $_POST['linkedin'];\n $twitter = $_POST['twitter'];\n $youtube = $_POST['youtube'];\n $id = $_POST['hiddenid'];\n\t\t $sql= $this->link->query(\"UPDATE category SET facebook='$facebook',linkedin='$linkedin',twitter='$twitter ',youtube='$youtube' WHERE id=$id\");\n if($sql){\n\t\t echo \"<script>alert('Link Update')</script>\";\n\t\t echo \"<script>window.location.href = './social.php'</script>\";\n exit;\n\t }\n\t}",
"function Links_Add(){\n\t\t\n\t\t\n\t\tif(isset($_POST['linkadd'])){\n\t\t\t\n\t\t\n\t\t\n\t\t$values = \"'\".$_POST['fb'].\"','\".$_POST['tw'].\"','\".$_POST['lk'].\"','\".$_POST['insta'].\"','\".$_POST['com'].\"','\".$_POST['doctor'].\"'\";\n\t\t\t\n\t\t\t$this->Add('links',$values,'Social-Links?List&m');\n\t\t\t\n\t\t\t\n\t\t}\n\t}",
"function linkblog_save_post( $post_id ) {\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\treturn;\n\n\t// verify data came from the linkblog meta box\n\tif ( !wp_verify_nonce( $_POST['linkblog_noncename'], plugin_basename( __FILE__ ) ) )\n\t\treturn; \n\n\t// Check user permissions\n\tif ( 'post' == $_POST['post_type'] ) {\n\t\tif ( !current_user_can( 'edit_page', $post_id ) )\n\t\t\treturn;\n\t} else {\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\n\t\t\treturn;\n\t}\n\n\t$linkblog_data = $_POST['linkblog_url'];\n\n\tif ($linkblog_data == \"\") {\n\t\treturn;\n\t} else {\n\t\tupdate_post_meta($post_id, 'linkblog_url', $linkblog_data);\n\t}\n\n}",
"function videos_save_link( $post_id ){\n\tif ( !isset( $_POST['yt_link_box_nonce'] ) || !wp_verify_nonce( $_POST['yt_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post->ID;\n}\n //save value\n if ( isset( $_REQUEST['yt_link'] ) ) {\n\tupdate_post_meta( $post_id, '_yt_link', sanitize_text_field( $_POST['yt_link'] ) );\n}\n \n}",
"public function store(LinkInsertRequest $request)\n {\n // //自动验证\n // $this->validate($request,[\n // 'links_name'=>'required|regex:/[\\W\\w]{2,6}/|unique:links',\n // 'links_url'=>'required|active_url'//active_url验证路径是否有效\n // ],[\n // 'links_name.required' => '站点名称必填',\n // 'links_name.unique' => '站点名称已存在',\n // 'links_name.regex' => '站点名称不正确',\n // 'links_url.required' => 'URL地址必填',\n // 'links_url.active_url' => 'URL地址无效',\n // ]);\n //接受数据 处理数据\n $link = new Link;\n $link -> links_name = $request -> input('links_name','');\n $link -> links_url = $request -> input('links_url','');\n $link -> links_status = $request -> input('links_status','');\n $res = $link -> save();\n //判断是否添加成功\n if($res){\n //成功\n return redirect('/admin/links')->with('success','添加成功');\n }else{\n return back()->with('error','添加失败');\n }\n }",
"public function store(StoreLink $request)\n {\n $user = Auth::user();\n\n $link = new Link();\n $link->fill($request->all());\n $link->user_id = $user->id;\n $link->code = $this->generateCode();\n $link->save();\n\n return redirect()->route('home');\n }",
"protected function save($url)\n {\n $shortLink = Generator::getRandomString();\n\n $item = array(\n 'created' => new \\MongoDate(),\n 'key' => $shortLink,\n 'target' => $url\n );\n\n $this->getCollection(self::MONGO_COLLECTION)->insert($item);\n\n $this->set(\"link\", 'http://' . $_SERVER['SERVER_NAME'] . '/' . $shortLink);\n }",
"public function store(Request $request)\n { \n $request->validate([\n 'url' => 'required|unique:links,url,NULL,id,deleted_at,NULL',\n 'title' => ['required', 'max:255', new MinimalWords(2)],\n 'body' => ['required', new MinimalWords(5)],\n 'tags' => 'required',\n ]);\n\n $user = Auth::user(); \n \n $link = $user->links()->create([\n 'title' => $request->title,\n 'url' => cleanUrl($request->url),\n 'slug' => generateSlug($request->title, new Link),\n 'body' => $request->body,\n 'tags' => $request->tags,\n 'media' => $request->media,\n 'owner' => $request->owner,\n 'thumbnail' => $request->thumbnail,\n 'draft' => Auth::user()->isAdmin() ? false : true, //if admin auto publish\n 'original_published_at' => $request->original_published_at ?? Carbon::now(),\n ]); \n\n //change session token\n $request->session()->regenerateToken();\n return redirect('/link/' . $link->slug)->with('success', 'Link berhasil disubmit. Akan kami review');\n }",
"public function update(Request $request, Social $social)\n {\n $request->validate([\n \"name\" => \"required\",\n \"link\" => \"required\",\n //\"logo\" => \"mimes:jpeg,png,jpg|max:2048\",\n ]);\n\n\n// if ($request->logo){\n// Storage::disk('public')->delete($social->logo);\n// $logo = Storage::disk('public')->putFile('social/', new File($request->logo));\n// $social->logo = $logo;\n// }\n\n $social->name = $request->name;\n $social->link = $request->link;\n $social->save();\n\n return redirect(self::ROUTE);\n }",
"public function store(Request $request)\n {\n // Validation //\n $validation = Validator::make($request->all(), [\n 'icon' => 'required',\n 'url' => 'required'\n ]);\n\n // Check if it fails //\n if( $validation->fails() ){\n return redirect()->back()->withInput()\n ->with('errors', $validation->errors() );\n }\n\n $social = new Social;\n $social->icon = $request->input('icon');\n $social->url = $request->input('url');\n $social->save();\n\n return redirect('/socials')->with('message','You just created a social media icon!');\n }",
"public function save()\r\n {\r\n $changes = array();\r\n\tforeach( $this->saveable_fields as $field )\r\n\t{\r\n\t $changes[ $field ] = $this->$field;\r\n\t}\r\n\t$this->registry->getObject('db')->insertRecords( 'links', $changes );\r\n\t$uid = $this->registry->getObject('db')->lastInsertID();\r\n\treturn $uid; \r\n }",
"function owa_post_link($link) {\r\n\r\n\t$owa = owa_getInstance();\r\n\r\n\treturn $owa->add_link_tracking($link);\r\n\t\t\r\n}",
"public function store(Request $request)\n {\n $request->validate([\n 'name'=>['required', 'string'],\n 'url'=>['required', 'url']\n ]);\n\n $user = Auth::user();\n\n $link = new Link([\n 'name'=> $request->input('name'),\n 'url'=>$request->input('url'),\n 'user_id'=>$user->id,\n ]);\n\n $link->save();\n\n return redirect()->route('links.index')->with('status', 'Link Added Correctly!');\n }",
"function save_extra_user_profile_fields( $user_id ) {\n if ( !current_user_can( 'edit_user', $user_id ) ) { \n return false; \n }\n\n\n $socialLinks=array(\"twitter\" => $_POST['twitter'] , \"facebook\" => $_POST['facebook'],\"instagram\" => $_POST['instagram']);\n\n \n update_user_meta(\n $user_id,\n 'social_links',\n $socialLinks\n );\n}",
"public function store(LinkRequest $request)\n {\n if(no_permission('createLink')){\n return view(config('program.no_permission_to_view'));\n }\n $link = new Link();\n $link->name = $request->name;\n $link->title = $request->title;\n $link->url = $request->url;\n $link->orders = $request->orders;\n $link->status = $request->status;\n if($link->save()){\n $message = [\n 'code' => 1,\n 'message' => '推荐网址添加成功'\n ];\n }else{\n $message = [\n 'code' => 1,\n 'message' => '推荐网址添加失败,请稍后重试'\n ];\n }\n return response()->json($message);\n }",
"function save($ref){\n //this primarily means add/update links\n\n //lookup user id.\n DB::db_query(\"user_id_lookup\", \"SELECT id FROM \\\"user\\\" WHERE username='\".$_SESSION[\"username\"].\"';\");\n if(DB::db_check_result(\"user_id_lookup\") > 0){\n $user_id = DB::db_get_field(\"user_id_lookup\", \"id\"); \n if($user_id == \"\") error(\"Bad User id.\"); \n }\n \n //lookup reference id\n DB::db_query(\"reference_id_lookup\", \"SELECT id FROM reference WHERE reference_id='\".$ref->reference_id.\"';\");\n if(DB::db_check_result(\"reference_id_lookup\") > 0){\n $reference_id = DB::db_get_field(\"reference_id_lookup\", \"id\");\n if($reference_id == \"\") error(\"Bad Reference id.\"); \n }\n\n if(!isset($ref->id)){\n \n //this means we are inserting so we need to: look up the\n //inserted reference's id, look up the users id, then\n //insert the REFERENCE_OF_USER link as appropriate.\n\n $link = new Link;\n $link->from_id = $reference_id;\n $link->to_id = $user_id;\n $link->type = LINK_REFERENCE_OF_USER;\n $link->save();\n \n }\n\n /* This is not being used atm as resource_id is in the reference table\n\n //we are updating hence we need to: check if the\n //REFERENCE_FROM_RESOURCE appropriate link exists, if it doesn't\n //then add it.\n\n if($ref->resource_id != \"\" && $ref->resource_id != \"-1\"){\n\n echo \"here\";\n \n\n DB::db_query(\"link_id_lookup\", \"SELECT id FROM links WHERE from_id='\".$ref->reference_id.\"' \n AND to_id='\".$ref->resource_id.\"' \n AND type='\".LINK_REFERENCE_FROM_RESOURCE.\"';\");\n if(DB::db_num_rows(\"link_id_lookup\") <= 0){\n \n $link = new Link;\n $link->id = $link_id;\n $link->from_id = $reference_id;\n $link->to_id = $ref->resource_id;\n $link->type = LINK_REFERENCE_FROM_RESOURCE;\n $link->save(); \n \n }\n \n } */\n \n }",
"protected function link_user_to_site($domain)\n\t{\n\t\t$this->db->insert('linked', array('user_id' => session('user_id'), 'domain_id' => $domain->id, 'created' => date(\"Y-m-d H:i:s\")));\n\t}",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'expanded_link' => 'required|url|unique:links,expanded_link',\n 'go_link' => 'required|unique:links,go_link',\n ]);\n\n $link = new Link();\n\n $link->expanded_link = $request->input('expanded_link');\n $link->go_link = $request->input('go_link');\n $link->member_id = $request->member->id;\n\n $link->save();\n\n return response()->json($link);\n }",
"public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }",
"public static function addnew(Link $link)\n {\n $ID=$user->ID;\n $PhysicalAddress=$Link->PhysicalAddress;\n $FriendlyAddress=$Link->FriendlyAddress;\n date_default_timezone_set(\"Africa/Cairo\");\n $today = date(\"Y-m-d H:i:s\");\n DB::add(\"links\",\"PhysicalAddress,FriendlyAddress,CreatedDateTime,LastUpdatedDateTime,IsDeleted\",\"'$PhysicalAddress','$FriendlyAddress','$today','$today',0\");\n \n \n // $conn->close();\n //header(\"Location:AddLink.php\");\n }",
"function register_block_core_social_link()\n {\n }",
"public function store()\n {\n $this->user_id = Auth::user()->id;\n\n $validatedDate = $this->validate([\n 'title' => 'required',\n 'original_url' => 'required',\n 'platform_id' => 'required',\n 'user_id' => 'required'\n ]);\n \n Url::create($validatedDate);\n \n session()->flash('message', 'Shorten URL Created Successfully.');\n \n $this->resetInputFields();\n }",
"function save()\n\t{\n\t\t// Check for request forgeries.\n\t\tJRequest::checkToken() or jexit(JText::_('Invalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Get the posted values from the request.\n\t\t$data = JRequest::getVar('jform', array(), 'post', 'array');\n\n\t\t// Populate the row id from the session.\n\t\t$data['id'] = (int) $app->getUserState('redirect.edit.link.id');\n\n\t\t// Get the model and attempt to validate the posted data.\n\t\t$model = & $this->getModel('Link', 'RedirectModel');\n\t\t$return\t= $model->validate($data);\n\n\t\t// Check for validation errors.\n\t\tif ($return === false)\n\t\t{\n\t\t\t// Get the validation messages.\n\t\t\t$errors\t= $model->getErrors();\n\n\t\t\t// Push up to three validation messages out to the user.\n\t\t\tfor ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)\n\t\t\t{\n\t\t\t\tif (JError::isError($errors[$i])) {\n\t\t\t\t\t$app->enqueueMessage($errors[$i]->getMessage(), 'notice');\n\t\t\t\t} else {\n\t\t\t\t\t$app->enqueueMessage($errors[$i], 'notice');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save the data in the session.\n\t\t\t$app->setUserState('redirect.edit.link.data', $data);\n\n\t\t\t// Redirect back to the edit screen.\n\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t\t\treturn false;\n\t\t}\n\n\t\t// Attempt to save the data.\n\t\t$return\t= $model->save($data);\n\n\t\t// Check for errors.\n\t\tif ($return === false)\n\t\t{\n\t\t\t// Save the data in the session.\n\t\t\t$app->setUserState('redirect.edit.link.data', $data);\n\n\t\t\t// Redirect back to the edit screen.\n\t\t\t$this->setMessage(JText::sprintf('Redirect_Link_Save_Failed', $model->getError()), 'notice');\n\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t\t\treturn false;\n\t\t}\n\n\t\t// Redirect the user and adjust session state based on the chosen task.\n\t\tswitch ($this->_task)\n\t\t{\n\t\t\tcase 'apply':\n\t\t\t\t// Redirect back to the edit screen.\n\t\t\t\t$this->setMessage(JText::_('Redirect_Link_Save_Success'));\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t\t\t\tbreak;\n\n\t\t\tcase 'save2new':\n\t\t\t\t// Clear the link id from the session.\n\t\t\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t\t\t// Redirect back to the edit screen.\n\t\t\t\t$this->setMessage(JText::_('Redirect_Link_Save_Success'));\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Clear the link id from the session.\n\t\t\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t\t\t// Redirect to the list screen.\n\t\t\t\t$this->setMessage(JText::_('Redirect_Link_Save_Success'));\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', false));\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Flush the data from the session.\n\t\t$app->setUserState('redirect.edit.link.data', null);\n\t}",
"public function save_tokens_user($data)\n {\n $this->db->insert('social_media', $data);\n }",
"public function setSocialUrl(string $newSocialUrl): void {\n\t\t// verify the string is 500 characters\n\t\t$newSocialUrl = trim($newSocialUrl);\n\t\t$newSocialUrl = filter_var($newSocialUrl, FILTER_VALIDATE_URL);\n\t\tif(empty($newSocialUrl) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"Social Url link is empty or insecure.\"));\n\t\t}\n\n\t\t// verify the string is validated\n\t\tif(strlen($newSocialUrl) > 500) {\n\t\t\tthrow(new \\RangeException(\"Social Url is too large, limit 500 characters\"));\n\t\t}\n// store the social url link\n\t\t$this->socialUrl = $newSocialUrl;\n\t}",
"public function store(Request $request)\n {\n \t$this->validate($request, [\n 'link' => 'required|unique:short_links,link|url',\n ],[\n 'link.url'=>'Please Enter Proper URL Like http://www.example.com OR https://www.example.com'\n\n ]);\n\n \n $input['link'] = $request->link;\n $input['code'] = Str::random(5);\n\n\n \n ShortLink::create($input);\n \n return redirect('/')\n ->with('success', 'Shorten Link Generated Successfully!');\n }",
"public function store(Request $request)\n {\n $rules = [\n 'name' => 'required',\n 'icon' => 'required',\n 'link1' => 'required',\n 'link2' => 'required',\n 'target_url' => 'required',\n 'sort' => 'required'\n ];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n } else {\n $social = new Social();\n $social->fill($request->except('_token'));\n $social->save();\n\n return redirect()->route('admin.socials.create')->with('successful','Social successfully created.');\n }\n }",
"public function AddSocial(){\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n $id_empresa = 1;\n $facebook = trim($_POST['facebook']);\n $twitter = trim($_POST['twitter']);\n $google_plus = trim($_POST['google_plus']);\n $linkedin = trim($_POST['linkedin']);\n $instagram = trim($_POST['instagram']);\n $pinterest = trim($_POST['pinterest']);\n $whatsapp = trim($_POST['whatsapp']);\n\n $columnas = array(\"id_empresa\", \"facebook\", \"twitter\", \"google_plus\", \"linkedin\", \"instagram\", \"pinterest\", \"whatsapp\");\n $datos = array($id_empresa, $facebook, $twitter, $google_plus, $linkedin, $instagram, $pinterest, $whatsapp);\n\n //ejecyta la insercion\n if($this->ConfigModelo->insert('red_social', $columnas, $datos)){\n\n $_SESSION[\"success\"]=true;\n redireccionar('pages/contacto');\n\n }else{\n echo false;\n }\n\n }else{\n\n $columnas = \"\";\n $datos = \"\";\n\n }\n\n }",
"public function setLink($link);",
"public function editSocialAccounts()\n {\n $data = [\n 'facebook_url' => inputPost('facebook_url'),\n 'twitter_url' => inputPost('twitter_url'),\n 'instagram_url' => inputPost('instagram_url'),\n 'pinterest_url' => inputPost('pinterest_url'),\n 'linkedin_url' => inputPost('linkedin_url'),\n 'vk_url' => inputPost('vk_url'),\n 'telegram_url' => inputPost('telegram_url'),\n 'youtube_url' => inputPost('youtube_url')\n ];\n return $this->builder->where('id', cleanNumber(user()->id))->update($data);\n }",
"public function publish() {\n // Check for request forgeries.\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n // Initialise variables.\n $app = JFactory::getApplication();\n $model = $this->getModel('Link', 'LinksModel');\n\n // Get the user data.\n $data = JFactory::getApplication()->input->get('jform', array(), 'array');\n\n // Attempt to save the data.\n $return = $model->publish($data['id'], $data['state']);\n\n // Check for errors.\n if ($return === false) {\n $this->setMessage(JText::sprintf('Save failed', $model->getError()), 'warning');\n } else {\n // Check in the profile.\n if ($return) {\n $model->checkin($return);\n }\n\n // Clear the profile id from the session.\n $app->setUserState('com_entrusters.edit.bid.id', null);\n\n // Redirect to the list screen.\n $this->setMessage(JText::_('COM_ENTRUSTERS_ITEM_SAVED_SUCCESSFULLY'));\n }\n\n // Clear the profile id from the session.\n $app->setUserState('com_links.edit.link.id', null);\n\n // Flush the data from the session.\n $app->setUserState('com_links.edit.link.data', null);\n\n // Redirect to the list screen.\n $this->setMessage(JText::_('COM_LINKS_ITEM_SAVED_SUCCESSFULLY'));\n $menu = & JSite::getMenu();\n $item = $menu->getActive();\n $this->setRedirect(JRoute::_($item->link, false));\n }",
"function updateUserSocialController(){\n\t\t\t$this->load->model('User_model');\n\t\t\t$id = $_POST[\"id\"];\n\t\t\t$facebook = $_POST[\"facebook\"]; \n\t\t\t$googleplus = $_POST[\"googleplus\"]; \n\t\t\t$linkedIn = $_POST[\"linkedIn\"];\n\t\t\t$twitter = $_POST[\"twitter\"];\n\t\t\t$website = $_POST[\"website\"];\n\t\t\tif($this->User_model->updateUserSocialModel($id,$facebook,$googleplus,$linkedIn,$twitter,$website)){\n\t\t\t \techo 'added';\n\t\t\t}else{\n\t\t\t\techo 'Failed';\n\t\t\t}\n\t\t\t \n\t\t}",
"public function store(Request $request, Social_Icon $icon)\n {\n $icon->icon = $request->icon;\n $icon->link = $request->link;\n $icon->save();\n\n return redirect()->route('admin.social.index')->withSuccess('New Icon created successfully!');\n }",
"public function store(Request $request)\n {\n $request->validate([\n \"name\" => \"required\",\n \"link\" => \"required\",\n // \"logo\" => \"required|image|mimes:jpeg,png,jpg|max:2048\",\n ]);\n\n //$logo = Storage::disk('public')->putFile('social/', new File($request->logo));\n\n $social = new Social;\n $social->name = $request->name;\n $social->link = $request->link;\n // $social->logo = $logo;\n $social->save();\n\n return redirect(self::ROUTE);\n }",
"public function created(Link $link)\n {\n $link->slug = Generate::slug($link->id);\n $link->name = $link->name ?? $link->slug;\n $link->domain = $link->domain ?? env('DEFAULT_SHORT_DOMAIN', 'ur.bn');\n $link->link_type_id = $link->link_type_id ?? 10;\n $link->save();\n }",
"function save()\n\t{\n\t\t$this->store() ;\n\t\t$link = 'index.php?option=com_arts_curriculum';\n\t\t$this->setRedirect( $link, $this->msg);\n\t}",
"function postSocial(Request $request)\n {\n $validator = Validators::backendValidate($request,\"settings_social\");\n // Check the validator if there's no error\n if($validator === true){\n Configuration::UpdateSocialLinks($request);\n return response()->json([\"result\" => 'success']);\n }\n return response()->json([\"result\" => 'failed', \"errors\" => $validator->errors()->messages()]);\n }",
"public function onSave(Model $user)\n {\n $model = UserMeta::query()->firstOrNew(['user_id' => $user->id, 'name' => 'url']);\n $model->value = input('url');\n return $model->save();\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'url' => 'required',\n 'main_filter_selector' => 'required',\n 'website_id' => 'required',\n ]);\n\n $link = new Link();\n $link->url = $request->get('url');\n $link->main_filter_selector = $request->get('main_filter_selector');\n $link->website_id = $request->get('website_id');\n $link->save();\n return redirect()->route('links.index');\n }",
"function kp_save_portfolio_link_data( $post_id )\n{\n if ( !isset( $_POST[ 'kp_portfolio_link_meta_box_nonce' ] ) ) {\n return;\n }\n // Check is meta box is generated by WP\n if ( !wp_verify_nonce( $_POST[ 'kp_portfolio_link_meta_box_nonce' ], 'kp_save_portfolio_link_data' ) ) {\n return;\n }\n // Disable auto saving by WP\n if ( defined( 'DOING_AUTO_SAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n // User permissions\n if ( !current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n // Check if field is set and have value\n if ( !isset( $_POST[ 'kp_portfolio_link_field' ] ) ) {\n return;\n }\n\n $data = sanitize_text_field( $_POST[ 'kp_portfolio_link_field' ] );\n\n update_post_meta( $post_id, '_link', $data );\n}",
"public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required|max:255',\n ]);\n\n $link = new Link();\n $link->title = $request->input('title');\n\n $link->save();\n\n return redirect()->route('admin_links_edit', ['link' => $link->id]);\n }",
"public function save($services, $parameters, $request, $link)\n {\n // save the values \n $services->getManager()->persist($this);\n }",
"public function setLink(string $value): Save\n {\n $this->link = $value;\n return $this;\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'link' => 'required|url'\n ]);\n\n Link::create([\n 'link' => $request->link,\n 'code' => rand(10,99) . str_random(4)\n ]);\n\n return redirect()->route('generate.shorten.link');\n }",
"public\n function actionSave()\n {\n $model = new Message();\n if ($model->load(Yii::$app->request->post())) {\n // получаем изображение для последующего сохранения\n $file = UploadedFile::getInstance($model, 'link');\n if ($file && $file->tempName) {\n $fileName = self::_saveFile($model, $file);\n if ($fileName) {\n $model->link = $fileName;\n }\n }\n if ($model->save(false)) {\n return $this->redirect('index');\n }\n }\n return $this->redirect('index');\n }",
"public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'link' => 'required',\n 'icon' => 'required',\n 'color'=> 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect()->back()\n ->withErrors($validator)\n ->withInput();\n }\n else{\n $social = New SocialMedia();\n $social->name = $request->name;\n $social->link = $request->link;\n $social->icon = $request->icon;\n $social->color = $request->color;\n $social->status = 1;\n\n $social->save();\n\n $notification = array(\n 'message' => 'Social Media Add Successfully!',\n 'alert-type' => 'success'\n );\n\n return redirect()->route('social.index')->with($notification);\n\n }\n }",
"public function store(Request $request)\n { // 保存数据\n $result = $this->link->create($request->all());\n // 如果存在 $result; \n if ($result) {\n return response()->json(['info'=>'添加友情链接成功']); // 返回一组json数据\n }\n return response()->json(['info'=>'添加友情链接失败']); \n }",
"function insertar_link(){\t\n\t\t$this->accion=\"Datos del Nuevo Enlace\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\"){\n\t\t\t$this->asignar_valores();\n\t\t\t$sql=\"SELECT * FROM link WHERE nombre_cat='999999'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\tif($resultado=mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=1;\n\t\t\t}else{\n\t\t\t\t$sql=\"INSERT INTO link VALUES ('', '$this->tipo', '$this->nombre', '$this->etiqueta', '$this->claves', '$this->descripcion', '$this->prioridad','$this->icono')\";\n\t\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t\theader(\"location:/admin/link/\");\n\t\t\t\texit();\n\t\t\t}\n\t\t}\t\t\t\n\t}",
"public function store(LinkStore $request)\n {\n Link::create($request->only('name', 'url'));\n\n return back()->withNotify('Bağlantı Oluşturuldu!');\n }",
"public function save()\n {\n $this->checkModel();\n if (!is_null($this->profile)) $this->saved = $this->profile->save();\n }",
"public function linkArticleAndSave($idArticleToLink = null)\n {\n Dao_Articles::update()->where('id', '=', $this->id)\n ->set('linked_article', $idArticleToLink)\n ->clearcache($this->id)\n ->execute();\n\n $this->linked_article = $idArticleToLink;\n }",
"public function actionLink($id)\n {\n $model = $this->findModel($id);\n\n if (Yii::$app->user->id == $model->user_id) {\n return $this->redirect(['update', 'id' => $id]);\n }\n\n $socialMediaModels = SocialMedia::find()->where(['event_id' => $id])->orderBy('id')->all();\n\n // make \"linked\" link for hashtags\n foreach ($socialMediaModels as $socialMediaModel) {\n if ($socialMediaModel->site_name == 'twitter') {\n $url_regex = '/(http|https)?:?(\\/\\/)?(w*\\.)?twitter\\.com\\/hashtag\\/[a-zA-Z0-9\\_\\-]*\\?src=hash/';\n if (!preg_match($url_regex, $socialMediaModel->url)) {\n $socialMediaModel->url = preg_replace(\n '/#?(\\w+)/i',\n 'https://twitter.com/hashtag/$1?src=hash',\n $socialMediaModel->url);\n }\n }\n }\n\n $linkModel = new SocialMedia();\n\n $postData = Yii::$app->request->post();\n\n if ($linkModel->load($postData) && $linkModel->validate()) {\n if ($linkModel->url == '') {\n $linkModel->delete();\n } else {\n $linkModel->event_id = $model->id;\n try {\n $linkModel->save();\n } catch (IntegrityException $e) {\n throw new \\InvalidArgumentException('Url/Hashtag already exists');\n }\n }\n\n // delete cache of this event and create new cache\n Yii::$app->cache->delete('socialmedia' . $id);\n $socialMediaModels = SocialMedia::find()->where(['event_id' => $id])->orderBy('id')->all();\n $this->findSocialMedia($id, $socialMediaModels);\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('link', ['model' => $model, 'linkModel' => $linkModel, 'socialMediaModels' => $socialMediaModels]);\n }",
"public function insert_page_link($data){\n $this->db->insert($data,'links');\n\n }",
"public function update(Request $request, $id)\n {\n //validation\n $validateData = $request->validate([\n 'icon_class' => 'required',\n 'name' => 'required',\n 'link' => 'required|url'\n ]);\n \n //saving data on database\n $sociallink = Social_link::find($id);\n $sociallink->icon_class = $request->icon_class;\n $sociallink->name = $request->name;\n $sociallink->link = $request->link;\n $sociallink->save();\n toastr()->success('Social link updated successfully!');\n return redirect()->back();\n \n }",
"function save() {\n \n\t if ($this->id == NULL) {\n\t \t\n\t\t mysql_query(\"INSERT INTO `videothumbs` ( `videoid`, `url`) VALUES ( '\".$this->videoid.\"', '\".$this->url.\"');\") or die(\"Query failed with error: \".mysql_error());\n\t\t $this->id = mysql_insert_id();\n\t \n\t } else {\n\t\t\t\t\n\t\t mysql_query(\"UPDATE `videothumbs` SET `videoid` = '\".$this->videoid.\"', `url` = '\".$this->url.\"' WHERE `id` = \".$this->id.\";\") or die(\"Query failed with error: \".mysql_error());\n\t }\n\t \n }",
"function save(){\n\t\tglobal $sql;\n\t\tsettype($newsid,'int');\n\t\tsettype($linkid,'int');\n\t\tsettype($productid,'int');\t\t\n\t\tif($this->type=='news'){\n\t\t\t$sql = 'INSERT INTO `'.DB_TABLE_PREFIX.'newslink`(`newsid`,`linkid`,`ctrl`) VALUES('.$this->newsid.','.$this->linkid.','.$this->ctrl.')';\t\t\t\n\t\t}else{\n\t\t\t$sql = 'INSERT INTO `'.DB_TABLE_PREFIX.'productnewslink`(`productid`,`newsid`,`ctrl`,`from`) VALUES('.$this->productid.','.$this->newsid.','.$this->ctrl.','.$this->from.')';\n\t\t}\t\t\n\t\t_trace($sql);\t\t\t\n\t\tmysql_query($sql);\n\t}",
"function save(iEntityComment $entity);",
"public function social_network(){\r\n\t\tif($this->logged_in){\r\n\t\t\t\r\n\t\t\t$networks = Kohana::config('social_network.networks');\r\n\t\t\t$save_data = $this->input->post('save_data',null);\r\n\t\t\tif($save_data){\r\n\t\t\t\tforeach($networks as $network){\r\n\t\t\t\t\t$fieldname = str_replace(\".\",\"\",$network);\r\n\t\t\t\t\t$this->user->$fieldname = $this->input->post($fieldname, null, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->user->save();\r\n\t\t\t\techo json_encode(array('msg'=>'ok', 'data'=>''));\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\r\n\t\t\t$view = new View('social_network');\r\n\t\t\t$view->networks = $networks;\r\n\t\t\t$view->lang = Kohana::lang('user');\r\n\t\t\t$view->user = $this->user;\r\n\t\t\r\n\t\t\t$view->render(TRUE);\r\n\t\t} else Kohana::show_404();\r\n\t}",
"function url_save($post_ID) {\n global $post;\n\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n return $post_id;\n }\n \n if (isset($_POST)) {\n update_post_meta( $post_ID, '_url_name', strip_tags( $_POST['url_name'] ) );\n }\n}",
"public function store(ShareRequest $request)\n {\n try {\n $model = new Share($request->all());\n $model->save();\n \n FlashMessages::add('success', trans('messages.save_ok'));\n \n return Redirect::route('admin.'.$this->module.'.index');\n } catch (Exception $e) {\n FlashMessages::add('error', trans('messages.save_failed'));\n \n return Redirect::back()->withInput();\n }\n }",
"function cd_meta_box_garoe_url_video_save( $post_id )\n{\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n if( !current_user_can( 'edit_post' ) ) return;\n \n // now we can actually save the data\n $allowed = array( \n 'a' => array( // on allow a tags\n 'href' => array() // and those anchors can only have href attribute\n )\n );\n \n // Make sure your data is set before trying to save it\n if( isset( $_POST['mb_garoe_url_video_text'] ) )\n update_post_meta( $post_id, 'mb_garoe_url_video_text', wp_kses( $_POST['mb_garoe_url_video_text'], $allowed ) );\n}",
"public function shareLink($link, $options=null) {\n\t\t$this->construct();\n\t\tif (!$this->canWrite()) return false;\n\n\t\t// Validate Link URL\n\t\t$link = filter_var($link, FILTER_VALIDATE_URL);\n\t\tif (empty($link)) return false;\n\t\t$scheme = parse_url($link, PHP_URL_SCHEME);\n\t\tif (!in_array($scheme, array(\n\t\t\t'http','https','ssl',\n\t\t))) return false;\n\n\t\ttry {\n\t\t\tlist($headers, $fb_response) = httpWorker::post(self::base_uri . self::getURL('feed', 'me'), array(\n\t\t\t\t'access_token' => $_SESSION['tokens']['fb'],\n\t\t\t\t'link' => $link,\n\t\t\t));\n\t\t} catch (Exception $e) {\n\t\t}\n\t\treturn false;\n\t}",
"public function save()\n {\n \tif($this->announcement_id == null)\n \t{\n \t\t$this->db->insert(\"Announcements\", array(\n \t\t\t\t\"title\" => $this->title,\n \t\t\t\t\"content\" => $this->content,\n \t\t\t\"posted_by\" => $this->posted_by\n \t\t));\n \t\t$this->announcement_id = $this->db->insert_id();\n \t}\t\n \telse\n \t{\n \t\t$update_data = array(\n \t\t\t\"title\" => $this->title,\n\t\t\t\t \"content\" => $this->content,\n \t\t\t\"posted_by\" => $this->posted_by\n \t);\n \t\t$this->db->where(\"announcement_id\", $this->announcement_id);\n \t\t$this->db->update(\"Announcements\", $update_data);\n \t}\n }",
"public function store(Request $request)\n {\n $domain = Domain::where('status','aktif')->first();\n $shortlink = createshortlink(domain($domain));\n Slink::create([\n 'link_original' => $request->link_original,\n 'link_short' => $shortlink,\n 'view' => 0,\n ]);\n\n \n return redirect('/')->with('link',$shortlink);\n }",
"function sendLink($input) {\n\t$input = dbEscapeArray($input);\n\t$_SESSION[id] = intval($_SESSION[id]);\t\n\tif(!isset($input[nsfw])) { $input[nsfw] = 0; }\n\telseif($input[nsfw] == \"on\") { $input[nsfw] = 1; }\t\n\t\t\n\t// extract hostname from URL\n\t$url = parse_url($input[url]);\n\t$domain = $url[host];\n\t// omit www from the hostname\n\tif(substr($domain,0,3) == \"www\") {\n\t\t$domain = substr($domain,4);\n\t}\n\t\n\tif(!isset($input[cat])) { $input[cat] = \"main\"; } // Use main category by default\n\tif($input[cat] == \"\") { $input[cat] = \"main\"; }\n\t\n\t// create the category if it doesn't previously exist in the database\n\tif(!categoryExists($input[cat])) {\n\t\tdbQuery(\"INSERT INTO categories (name) VALUES ('$input[cat]')\");\n\t}\t\n\t\n\tif(intval($input[edit])) { // Check if we're editing or submitting\n\t\t$query = \"UPDATE links SET title='$input[title]', link='$input[url]', domain='$domain', \n\t\t\t category='$input[cat]', nsfw=$input[nsfw] WHERE id=$input[edit] AND user=$_SESSION[id]\";\n\t}\n\t\n\telse {\n\t\t$query = \"INSERT INTO links (title,link,domain,category,user,nsfw)\n\t\t\t VALUES ('$input[title]','$input[url]','$domain','$input[cat]',$_SESSION[id],$input[nsfw])\";\n\t}\n\n\t$id = dbQueryId($query);\n\t\n\tvote($_SESSION[id],$id,'link',1); // Auto-upvote own submissions\n\treturn($id);\n}",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();"
] | [
"0.6902558",
"0.6663171",
"0.661495",
"0.6479066",
"0.642856",
"0.6296211",
"0.6106395",
"0.61031204",
"0.6099806",
"0.608838",
"0.60785156",
"0.60551065",
"0.6016186",
"0.5989445",
"0.59639096",
"0.5891851",
"0.5839289",
"0.5836313",
"0.583255",
"0.5828308",
"0.5827811",
"0.580003",
"0.5794896",
"0.57601345",
"0.57557565",
"0.5753248",
"0.57517856",
"0.5728316",
"0.56957996",
"0.56279176",
"0.5623342",
"0.56213266",
"0.56158817",
"0.56029004",
"0.5590271",
"0.5564566",
"0.5548238",
"0.5543956",
"0.55408806",
"0.55377185",
"0.5509676",
"0.5508611",
"0.5498414",
"0.54954344",
"0.5489147",
"0.5452118",
"0.54315305",
"0.5425835",
"0.54202956",
"0.54189193",
"0.541417",
"0.5402253",
"0.53939015",
"0.5380676",
"0.5380096",
"0.5372472",
"0.5369831",
"0.53569525",
"0.5346714",
"0.5332582",
"0.53281134",
"0.5310387",
"0.5297009",
"0.529511",
"0.529389",
"0.52813977",
"0.5279251",
"0.52755356",
"0.52668625",
"0.52548224",
"0.5249033",
"0.5221226",
"0.5219305",
"0.51989836",
"0.51981634",
"0.51808834",
"0.5175011",
"0.5173576",
"0.51636213",
"0.515669",
"0.5156181",
"0.515409",
"0.5152822",
"0.5146829",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598",
"0.5140598"
] | 0.6787638 | 1 |
Get the profile of a ministry. | public function getProfile()
{
ProfileResource::withoutWrapping();
MinistryResource::withoutWrapping();
if (request()->has('complete') && request()->complete) {
return new ProfileResource(auth()->user());
} else {
return new MinistryResource(auth()->user());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function GetProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function profile() {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}",
"public function getProfile()\n {\n $profile = new \\login\\user\\Profile($this->db);\n if (array_key_exists('profile_id', $this->data)) {\n $profile->loadFromId($this->data['profile_id']);\n }\n return $profile;\n }",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"public function profile(): string\n {\n if ($this->profile) {\n return $this->profile;\n }\n\n return $this->app['opx.profile'] ?? 'default';\n }",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"public function getUserProfile();",
"function getProfileName() {\n\t\treturn $this->_ProfileName;\n\t}",
"public function getProfile()\n {\n return $this->request('me');\n }",
"abstract protected function getUserProfile();",
"function getProfile($prj_id, $usr_id)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getProfile($usr_id);\n }",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"public function getProfileImage()\n {\n if ($this instanceof \\humhub\\modules\\space\\models\\Space) {\n return new \\humhub\\libs\\ProfileImage($this->guid, 'default_space');\n }\n return new \\humhub\\libs\\ProfileImage($this->guid);\n }",
"public function getProfile()\n {\n return $this->hasOne(Profile::className(), ['id' => 'profile_id']);\n }",
"public function profile()\n { \n $user = Auth::user();\n $profile = $user->student;\n return $user;\n \n }",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getProf(){\n return $this->prof;\n }",
"public function getProfile()\n {\n return $this->hasOne(Profile::className(), ['user_id' => 'id']);\n }",
"function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}",
"private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }",
"public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }",
"public function getProfileName()\n\t\t{\n\t\t return $this->profileName;\n\t\t}",
"public function getIdProf()\n {\n return $this->idProf;\n }",
"protected function getSimulatingUser()\n {\n // Ideally, return Profile\n }",
"public function getProfileImg()\n {\n return $this->profile_img;\n }",
"private function GetInstructorProfile($WH_ID=0)\n\t{\n $record = $this->SQL->GetRecord(array(\n 'table' => $GLOBALS['TABLE_instructor_profile'],\n 'keys' => '*',\n 'where' => \"wh_id='$WH_ID' AND active=1\",\n ));\n if ($this->Show_Query) echo \"<br /><br />LAST QUERY = \" . $this->SQL->Db_Last_Query;\n \n $this->profile = array(\n\t\t\t'name' => \"{$record['first_name']} {$record['last_name']}\",\n 'picture' => $record['primary_pictures_id'], //'instructor_53456.gif',\n //'location' => \"{$record['location_city']}, {$record['location_state']}\",\n //'experience' => $record['experience_years'],\n 'description' => $record['profile'],\n 'types' => $record['yoga_types'],\n\t\t);\n\t}",
"public function getProfileName() {\n\t\treturn ($this->profileName);\n\t}",
"public function getProfileImg()\n {\n return $this->profileImg;\n }",
"protected function getUserProfile() {\n $profile = (new FacebookRequest(\n $this->fbSession, 'GET', '/me'\n ))->execute()->getGraphObject(GraphUser::className());\n //return\n return $profile;\n }",
"static function getProfile($profile_id)\n\t{\n\t\t$profile = ORM::for_table('PROFILE')->where('profile_id', $profile_id)->find_array();\n\n\t\treturn $profile;\n\t}",
"protected function getResourceObject()\n {\n return new Profile($this->api);\n }",
"public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function get_user() {\r\n return $this->util_model->get_data(\r\n 'schools', \r\n array('unitname') \r\n );\r\n }",
"public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }",
"public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }",
"public function profile() {\n return $this->hasOne(Profile::class);\n }",
"private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }",
"public function getSeniorContributors()\n {\n $query=\"select identifier FROM \".$this->_name.\" WHERE profile_type ='senior' AND status = 'Active'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }",
"public function profile()\n {\n return $this->hasOne(Profiles::class);\n }",
"public function profile()\n\t{\n\t\treturn $this->hasOne('Profile');\n\t}",
"function get_profile_usrid($usrid){\r\n\t\r\n}",
"protected function getProfileImage()\n {\n $path = $this->_getImageBasePath() . $this->_getImageName();\n\n if(!file_exists($this->_getFullImagePath($path))) {\n //reszise and return path to new resized image\n //@todo resize\n $originImage = $this->_getImageName(false);\n if(file_exists($this->_getFullImagePath($originImage))) {\n //resize it and return path to resized image\n //if it can't resized, return default image\n } else {\n return $this->_getDefaultImage();\n }\n } else {\n return $path;\n }\n\n\n }",
"public function profile()\n {\n return $this->hasOne(Profile::class);\n }",
"public function profile()\n {\n return $this->hasOne(Profile::class);\n }",
"public function profile()\n {\n return $this->hasOne(Profile::class);\n }",
"public function profileDetails()\n {\n $processReaction = $this->userEngine->prepareProfileDetails();\n\n return __processResponse($processReaction, [], null, true);\n }",
"public function userProfile() {\n\t\t\t$request = $this->api(\"GET\", \"/me\");\n\t\t\t\n\t\t\t$request->execute();\n\t\t\t$response = $request->responseObject();\n\t\t\t$response->id = $response->ID;\n\t\t\treturn $response;\n\t\t}",
"public function profile()\n {\n return $this->morphTo();\n }",
"public function loadProfileInformation() {\n\t\t\t$procedure = \"get\" . $this->mode_ . \"Information\"; \n\t\t\t$this->profileInformation_ = $this->dbHandler_->call($procedure, \"%d\", array($this->id_));\n\t\t}",
"public function show()\n\t{\n\t\t// get user model\n\t\tif (Auth::check()) {\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\treturn $profile;\n\t\t} else {\n\t\t\treturn 'fail';\n\t\t}\n\t}",
"public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"public function getProfileId() {\n\t\treturn($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }",
"public function getCurrentProfile(){\n\n try{\n\n if( $this->hasToken() ){\n\n $account = $this->asObj( '/profile' );\n\n return $account->data;\n\n }\n else\n throw new ClientException(\"You need an authorization token, in order to request a profile.\");\n\n }\n catch (ResourceNotFoundException $e){\n //account does not exist\n return NULL;\n }\n\n }",
"public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"function profile ($user_id) {\n global $sql;\n $res = $sql->sql_select_array_query(\"SELECT * FROM `profile` WHERE user_id = '{$user_id}'\");\n return count($res) > 0 ? $res[0] : null;\n }",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function getSellerProfile() {\n return $this->scopeConfig->getValue ( static::XML_SELLER_PROFILE, ScopeInterface::SCOPE_STORE );\n }",
"public function getUsername()\n {\n return $this->userProf;\n }",
"function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->getProfile( $this->api->getCurrentUserId() );\r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t}\r\n\r\n\t\tif ( ! is_object( $data ) )\r\n\t\t{\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalide response.\", 6 );\r\n\t\t} \r\n\r\n\t\t$this->user->profile->identifier = $this->api->getCurrentUserId();\r\n\t\t$this->user->profile->displayName \t= @ $data->basicprofile->name;\r\n\t\t$this->user->profile->description \t= @ $data->aboutme;\r\n\t\t$this->user->profile->gender \t= @ $data->basicprofile->gender;\r\n\t\t$this->user->profile->photoURL \t= @ $data->basicprofile->image;\r\n\t\t$this->user->profile->profileURL \t= @ $data->basicprofile->webUri;\r\n\t\t$this->user->profile->age \t\t\t= @ $data->age;\r\n\t\t$this->user->profile->country \t\t= @ $data->country;\r\n\t\t$this->user->profile->region \t\t= @ $data->region;\r\n\t\t$this->user->profile->city \t\t\t= @ $data->city;\r\n\t\t$this->user->profile->zip \t\t\t= @ $data->postalcode;\r\n\r\n\t\treturn $this->user->profile;\r\n\t}",
"public function getUserProfileName(): string {\n\t\treturn ($this->userProfileName);\n\t}",
"public function getManageProfile() {\n\t\treturn $this->manageProfile;\n\t}",
"public function getProfileId() {\n\t\treturn $this->profileId;\n\t}",
"public function get_profil()\n {\n return $this->_profil;\n }",
"public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }",
"private function getSpotifyProfile()\r\n {\r\n Application::$app->checkSpotifyToken();\r\n $curl = curl_init();\r\n\r\n curl_setopt_array($curl, array(\r\n CURLOPT_URL => 'https://api.spotify.com/v1/me',\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_ENCODING => '',\r\n CURLOPT_MAXREDIRS => 10,\r\n CURLOPT_TIMEOUT => 0,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n CURLOPT_CUSTOMREQUEST => 'GET',\r\n CURLOPT_HTTPHEADER => array(\r\n 'Accept: application/json',\r\n 'Content-Type: application/json',\r\n 'Authorization: Bearer ' . $_SESSION['user_token']\r\n ),\r\n ));\r\n\r\n $response = curl_exec($curl);\r\n curl_close($curl);\r\n\r\n return json_decode($response, true);\r\n }",
"function getProfile($serverAuthentication, $serverUser)\n\t{\n\t\treturn runQuery(\"profile\", \"\", \"\", \"\", \"\", $serverAuthentication, $serverUser);\n\t}",
"function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"public function getNetworkProfile()\n {\n return $this->network_profile;\n }",
"public function profile()\n {\n return $this->morphOne('App\\Profile', 'profileable');\n }",
"public function userProfile()\n {\n return $this->hasOne(config('aggregator.namespace').'UserProfile');\n }",
"public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"public function profile()\n\t{\n\t\treturn $this->hasOne('App\\Models\\UserProfile', 'user_id', 'id');\n\t}",
"public function profile()\n {\n return $this->hasOne('Profile');\n }",
"public function get_profile($user_profile_data){\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to get contents of user profile\n\t\t$user_profile_data = UserProfileHelper::get_user_profile($user_id);\n\t\treturn $user_profile_data;\n\t}",
"public function getHealthProfile()\n {\n return $this->hasOne(HealthProfile::className(), ['id' => 'healthProfileId']);\n }",
"public function getProfileType()\n {\n return $this->profile_type;\n }",
"public function getAvatar()\n\t{\n\t\treturn $this->instance->profile;\n\t}",
"public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}",
"public function showProfile()\n\t{\n\t\t$data = array(\n\t\t\t'profile' => $this->profile,\n\t\t\t'socialMediaAccounts' => $this->profileService->getSocialMediaAccountsForProfile($this->profile)->toArray(),\n\t\t\t'socialMediaMax' => Config::get('profile.social_media.max'),\n\t\t\t'socialMediaTypes' => $this->profileService->getSocialMediaTypes(),\n\t\t\t'maxQuote' => $this->profile->program->type->name == 'mbo' ? 75 : 175\n\t\t);\n\n\t\treturn new ProfileView($data);\n\t}",
"public function getUserProfile() {\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT p.firstName, p.lastName, p.dob, p.addressFirst, p.addressSecond, p.city, p.postcode, p.mobile, p.bio\n FROM users AS u\n JOIN profiles AS p ON p.userId = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }\n }",
"function get_profile_usrnm($usrname){\r\n\t\r\n}"
] | [
"0.7252904",
"0.7218533",
"0.72170365",
"0.71874017",
"0.71874017",
"0.71874017",
"0.7146581",
"0.7062818",
"0.70142835",
"0.6878982",
"0.68507767",
"0.68255955",
"0.65607464",
"0.64877933",
"0.64717084",
"0.6462159",
"0.644256",
"0.64342093",
"0.64283407",
"0.6377093",
"0.6339305",
"0.6293175",
"0.6281647",
"0.6277666",
"0.62676674",
"0.6261266",
"0.626018",
"0.62457794",
"0.6239794",
"0.62274295",
"0.6197861",
"0.61936086",
"0.6190443",
"0.61559784",
"0.6144778",
"0.6116705",
"0.6113618",
"0.6102845",
"0.6101474",
"0.6098363",
"0.60855395",
"0.6085219",
"0.60445946",
"0.6042524",
"0.6037693",
"0.6014402",
"0.6010008",
"0.6010008",
"0.60043913",
"0.5974869",
"0.5973191",
"0.59723926",
"0.5957581",
"0.59558004",
"0.5952688",
"0.59517527",
"0.59517527",
"0.59517527",
"0.59494483",
"0.5936401",
"0.59319156",
"0.5927446",
"0.590432",
"0.58966434",
"0.5891198",
"0.5873896",
"0.587295",
"0.587295",
"0.5872532",
"0.5866804",
"0.58654904",
"0.5864973",
"0.58592016",
"0.5857777",
"0.58563346",
"0.5853437",
"0.58476955",
"0.58448666",
"0.5843645",
"0.5842235",
"0.5839212",
"0.58194226",
"0.58169764",
"0.5809968",
"0.5806781",
"0.5801283",
"0.58008015",
"0.57890344",
"0.57880324",
"0.5764932",
"0.5763814",
"0.5758959",
"0.5754096",
"0.5748644",
"0.5747408",
"0.5743329",
"0.5729568",
"0.5728196",
"0.5727701",
"0.5725888"
] | 0.7170489 | 6 |
Changes the profile pic. | public function updatePhoto(UpdateImageRequest $request, ImageManager $imageManager)
{
if (auth()->user()->image()->exists()) {
$this->deleteFiles(auth()->user());
}
$fileName = str_shuffle(auth()->user()->id.time().time()).'.png';
$ogSave = storage_path('app/public/profile/original/').$fileName;
$imageManager->make($request->image)->save($ogSave);
$image = auth()->user()->image()->updateOrCreate([], [
'name' => $fileName,
]);
event(new ImageSaved($image));
return $this->successResponse('Photo changed, refresh page to effect changes');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function picture()\n\t\t{\n\t\t\tif(!Auth::check())\n\t\t\t\treturn 'fail';\n\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\t$profile->picture = Input::get('picture');\n\n\t\t\tif ($profile->save())\n\t\t\t\treturn 'success';\n\t\t}",
"public function changeuserpicture(){\n\t\t$this->load->model('front/customer_model');\n\t\t$id=$this->input->get('id');\n\t\t$data=$this->customer_model->edit_userpicture($id);\n\t\t$this->load->view('front/change_userpicture',$data);\n\t}",
"private function changeAvatar()\n {\n try\n {\n global $userquery; \n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($_FILES['avatar_file']['name']))\n throw_error_msg(\"provide avatar_file\");\n\n $array['userid'] = userid();\n $userquery->update_user_avatar_bg($array);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $user_info = format_users($array['userid']);\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 }",
"public function showProfilePic()\n {\n \n \n }",
"public function updateProfilePicture(Request $request){\n \tif($request->hasFile('avatar')){\n \t\t$avatar = $request->file('avatar');\n \t\t$filename = preg_replace('/\\s+/', '', Auth::user()->name) . time() . '.' . $avatar->getClientOriginalExtension();\n\n \t\t// Delete current image before uploading new image\n if (Auth::user()->avatar !== 'default.jpg') {\n $file = public_path('/assets-admin/img/uploads/avatars/' . Auth::user()->avatar);\n if (File::exists($file)) {\n unlink($file);\n }\n }\n\n \t\tImage::make($avatar)->resize(300, 300)->save( public_path('/assets-admin/img/uploads/avatars/' . $filename ) );\n\n \t\t$user = Auth::user();\n \t\t$user->avatar = $filename;\n \t\t$user->save();\n \t}\n\n \treturn view('privateviews.users.profile', array('user' => Auth::user()) );\n\n }",
"public function changeprofilepic ( $id = 0 )\n {\n $data = array();\n\n // get data\n $userInfo = Users::getRecordById($id);\n $data['userInfo'] = $userInfo;\n $userContact = Contact::getRecordById($id);\n $data['userContact'] = $userContact;\n $userMd = MDUsers::getRecordById($id);\n $data['userMd'] = $userMd;\n $data['profile_completeness'] = Users::computeProfileCompleteness($id);\n\n return view($this->viewPath.'profile_picture')->with($data);\n }",
"public function changeAvatar($file)\n\t{\n\t\t$photoname = Helper::makeUuid() . '.png';\n\t\tImage::make($file)->resize(300,300)->save(storage_path() . '/hphotos/xpf1/' . $photoname);\n\t\t//$file->move(storage_path() . '/hphotos/xpf1/',$photoname);\n\t\t$this->instance->profile = $photoname;\n\t\t$this->instance->save();\n\t}",
"public function Updateprofile_pic($profile, $date, $id){\r\n\t\t\t$sql = \"Update \".$this->tables['User'].\" set profile_pic = '\".$profile.\"',pic_update_date = '\".$date.\"' Where Id = '\".$id.\"'\";\r\n $this->query($sql,0);\r\n\t\t}",
"function UserPicture(){\r\n echo \"<img class='user_image' id='user_image' src='../RSAS.net/profile_pictures/$this->picture' onclick='my_account()' />\";\r\n }",
"function setProfilePicture(){ \n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\tpr($this->data);\n\t\t\t\tpr($data); \n\t\t\t\t//print_R($this->data)\n\t\t\t\techo $this->webroot.'/webroot/images/adv1.jpg';\n\t\t\t\t$string\t= base64_encode(file_get_contents('http://softprodigy.in/iWrestled/webroot/images/adv1.jpg'));\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\n\t\t\t\tpr($string);die;\n\t\t\t\tif(isset($string) && $string !='' && $string !='NULL'){//pr('ok');die;\n\t\t\t\t\t$imageName\t\t= $this->createImage($string);\n\t\t\t\t\t$imageDirectory\t\t= '';\n\t\t\t\t\t$thumbDirectory\t\t= 'img/upload_userImages';\n\t\t\t\t\t$thumbWidth\t\t\t= 300;\n\t\t\t\t\t$this->createThumbnail($imageDirectory, $imageName, $thumbDirectory, $thumbWidth);\n\t\t\t\t\t$requiredData['profilePicture']\t= \t$imageName;\n\t\t\t\t\tunlink($imageName);\n\t\t\t\t\t//pr($token);die('ok');\n\t\t\t\t\t$data['User']['id'] = $this->data['User']['playerId'];\n\t\t\t\t\t$data['User']['secToken'] = $this->data['User']['secToken'];\n\t\t\t\t\t$details = $this->User->find('first', array('conditions' => array('User.id' => $data['User']['id'],'User.secToken' => $data['User']['secToken'])));//pr($details);die;\n\t\t\t\t\tif(!empty($details)){\n\t\t\t\t\t\n\t\t\t\t\t$query\t\t= \"UPDATE users set image = '\".$requiredData['profilePicture'].\"' WHERE id = '\".$playerId.\"' and secToken = '\".$token.\"' \";\n\t//pr($query);die;\n\t\t\t\t\t$resource\t= mysql_query($query);\n\t\t\t\t\tif($resource){\n\t\t\t\t\t\t$response['error']\t\t= 0;\n\t\t\t\t\t\t$response['response']['msg']\t= \"profilePicture Successfully changed.\";\n\t\t\t\t\t\t$response['response']['profilePicture']\t= PROFILE_IMAGE_URL.'upload_userImages/'.$requiredData['profilePicture'];\t\t\t\t$response['response']['message']\t= 'setProfilePicture successfully';\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\n\t\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t\t\t$response['response']['message']\t= \"setProfilePicture Un-successfully\";\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\telse{\n\t\t\t\t\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdie;\t\t\n\t\t\t}",
"public function changeProfilePicture(Request $request)\n {\n $user = User::where('id', $request->id)->first();\n $image_path = public_path().'/'.$user->avatar;\n\n $image = $request->file('avatar');\n $input['imagename'] = time().'.'.$image->getClientOriginalExtension();\n \n $destinationPath = public_path('/images/avatars');\n ini_set('memory_limit', '256M');\n $img = Image::make($image->getRealPath());\n $img->resize(400, null, function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationPath.'/'.$input['imagename']);\n\n $avatar = 'images/avatars/'.$input['imagename'];\n\n $user->avatar = $avatar;\n $user->save();\n\n unlink($image_path);\n\n if($user)\n {\n return response()->json([\n 'status' => 'true',\n 'msg' => 'success'\n ]) ;\n }\n else\n {\n return response()->json([\n 'status' => 'false',\n 'msg' => 'error'\n ]) ;\n }\n }",
"function setProfilePicture($a_status)\n\t{\n\t\t$this->ppic = (bool)$a_status;\n\t}",
"public function testUpdateAvatarImage()\n {\n }",
"public function profilePicture()\n {\n if ($this->picture) {\n return \"/storage/{$this->picture}\";\n }\n\n return 'http://i.pravatar.cc/200';\n }",
"public function setAvatar($avatar){\n\t\t$pictureName = 'default.png';\n\t\t\n\t\tif ($avatar){\n\t\t\t$pictureName = $this->saveImage($avatar);\n\t\t}\n\t\t$this->avatar = $pictureName;\n\t}",
"public function changeProfilePicture (Request $request) \n {\n \t$photo_name = $request->photo_name;\n\t\t\n\n\t\tif (is_null($photo_name)) {\n\t\t\treturn response()->json(['status' => 'error', 'errors' => [trans_choice('app.photo_name_is_required',1)]]);\n\t\t}\n\n\t\t$auth_user = Auth::user();\n\t\t$photo_user_id = $this->profileRepo->getUserIdByPhotoName ($photo_name);\n\n\t\tif($photo_user_id != $auth_user->id) {\n\t\t\treturn response()->json(['status' => 'error', 'errors' => [trans_choice('app.unable_to_set_profile_pic',1)]]);\n\t\t}\n\n\n\t\t$this->profileRepo->save_crop_resize_photo(\n\t\t\tpublic_path('/uploads/others/original/'.$photo_name),\n\t\t\t $photo_name, \n\t\t\t $request->crop_width, \n\t\t\t $request->crop_height, \n\t\t\t $request->crop_x, \n\t\t\t $request->crop_y\n\t\t);\n\n\t\t$this->profileRepo->changeProfilePicture ($auth_user->id, $photo_name);\n\n\t\t$image_paths = [\n\t\t\tasset('/uploads/others/thumbnails/'.$photo_name),\n\t\t\tasset('/uploads/others/'.$photo_name),\n\t\t\tasset('/uploads/others/original/'.$photo_name),\n\t\t\tasset('/uploads/others/encounters/'.$photo_name),\n\t\t\t\n\t\t];\n\n\t\treturn response()->json(['status' => 'success', 'photo' => $image_paths]);\n \t\n }",
"public function updatePicture(Request $request)\n {\n $user = User::findOrFail(auth()->user()->id);\n\n\n\n //dd('radi');\n\n\n // Get current user\n if($request->has('country')&&$request->country!='Choose'){\n $user->country=$request->country;\n }\n $user->save();\n if($request->has('bio')&&$request->bio!=\"\"){\n $user->bio=$request->bio;\n //dd($request->bio);\n }\n $user->save();\n\n // Check if a profile image has been uploaded\n\n if ($request->has('profile_image')&&$request->profile_image!=null) {\n $request->validate([\n 'profile_image' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048'\n ]);\n // Get image file\n $image = $request->file('profile_image');\n // Make a image name based on user name and current timestamp\n $name = str_slug($request->input('name')).'_'.time();\n // Define folder path\n $folder = '/uploads/images/';\n // Make a file path where image will be stored [ folder path + file name + file extension]\n $filePath = $folder . $name. '.' . $image->getClientOriginalExtension();\n // Upload image\n $this->uploadOne($image, $folder, 'public', $name);\n // Set user profile image path in database to filePath\n $user->profile_image = $filePath;\n }\n // Persist user record to database\n $user->save();\n\n // Return user back and show a flash message\n return redirect()->back()->with(['status' => 'Profile updated successfully.']);\n }",
"function update_pic($value)\n\t\t{\n\t\t\t$value = \"'\".$value.\"'\";\n\t\t\t// Todo: Where clause to include user_id\n\t\t\t$sql = $this->conn_id->query('select * from users ORDER BY user_id DESC LIMIT 1');\n\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\t$sql = $this->conn_id->prepare(\"UPDATE users SET profilepic = \".$value.\" where user_id = ?\");\n\t\t\t$sql->execute(array($r[0]['user_id']));\n\t\t\t$affected_rows = $sql->rowCount();\n\t\t\treturn $affected_rows;\n\t\t}",
"public function actionAvatar()\n {\n $players=Player::find()->active()->all();\n foreach($players as $player)\n {\n $robohash=new \\app\\models\\Robohash($player->profile->id,'set1');\n $image=$robohash->generate_image();\n if(get_resource_type($image)=== 'gd')\n {\n $dst_img=\\Yii::getAlias('@app/web/images/avatars/'.$player->profile->id.'.png');\n imagepng($image,$dst_img);\n imagedestroy($image);\n $player->profile->avatar=$player->profile->id.'.png';\n $player->profile->save(false);\n }\n }\n }",
"private function updateProfileImage($cleaned) {\n\t\t$value = $cleaned['profileImage'];\n\t\t$purify = Utils::purify($value);\t\t\n\t\tif ($purify == $value && @getImageSize($purify) != false) {\n\t\t\t$this -> user-> setData(\"profileImage\", $value);\n\t\t\t$this -> user-> write();\n\t\t\techo \"SUCCESS \". $purify;\n\t\t\treturn;\n\t\t} \n\t\techo \"Sorry, that image URL is invalid.\";\n\t}",
"public function getProfileImage() {\r\n $profileImage = SystemSetting::getByKey(\"ARC_USER_IMAGE\", $this->id);\r\n if (!empty($profileImage->value)) {\r\n return system\\Helper::arcGetPath() . \"assets/profile/\" . $profileImage->value;\r\n }\r\n return system\\Helper::arcGetPath() . \"assets/profile/placeholder.png\";\r\n }",
"public function addProfileImage() {\n\n\t\t\n\t\t$upload_path = LITHIUM_APP_PATH.\"/resources/tmp/images/\";\n $temp_file = Upload::handleUpload('test',$upload_path);\n\n $thumb = new \\app\\libraries\\jiles\\images\\Thumbnail($upload_path.$temp_file);\n\t\t$file_name = $this->_session['_id'].'.jpg';\n $thumb->createThumbnail(null,200);\n\n\t $thumb->save(LITHIUM_APP_PATH.\"/webroot/img/members/profile/\".$file_name);\n\n $thumb->createThumbnail(50,50);\n\n\t\t\n $thumb->save(LITHIUM_APP_PATH.\"/webroot/img/members/small/\".$file_name);\n \n \n // add time stamp on so that the picture will refresh in the view.\n\t\t\n $result = array(\"success\"=>true,\"file\"=>\"/img/members/profile/\".$file_name.\"?\".strtotime('now'));\n echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);\n \n\t\t die();\n\t\t\t\n\t\t\n\t}",
"function profile_pic($doctor_id) {\r\n \r\n $srch = Doctor::getDoctores();\r\n $srch->addCondition('doctor_id', \"=\", $doctor_id);\r\n $doctor_data = $srch->fetch();\r\n\r\n if (intval($doctor_data['doctor_id']) < 1) {\r\n die(\"Invalid Request\");\r\n }\r\n\r\n\r\n $response = \"\";\r\n\r\n if ($_FILES['fileupload']['name'] != \"\" && $_FILES['fileupload']['error'] == 0) {\r\n $isUpload = uploadContributionFile($_FILES['fileupload']['tmp_name'], $_FILES['fileupload']['name'], $response, \"doc_profile/\");\r\n\r\n if ($isUpload) {\r\n $fls = new Files();\r\n\r\n //Check if previous file\r\n\r\n $record = $fls->getFile($doctor_id, Files::DOCTOR_PROFILE);\r\n if (intval($record['file_id']) > 0) {\r\n $dat['file_id'] = $record['file_id'];\r\n $filepath = $record['file_path'];\r\n }\r\n\r\n $dat['file_record_type'] = Files::DOCTOR_PROFILE;\r\n $dat['file_record_id'] = $doctor_id;\r\n $dat['file_path'] = $response;\r\n $dat['file_display_name'] = $_FILES['fileupload']['name'];\r\n $dat['file_display_order'] = 0;\r\n\t\t\t\t\r\n $file_id = $fls->addFile($dat);\r\n\r\n Message::addMessage(\"Profile picture is successfully changed\");\r\n $removeFilePath = CONF_INSTALLATION_PATH . 'user-uploads/' . $filepath;\r\n unlink($removeFilePath);\r\n\t\t\t\tdieJsonSuccess(Message::getHtml());\r\n } else {\r\n\t\t\t\t Message::addErrorMessage($response);\r\n\t\t\t\tdieJsonError(Message::getHtml());\r\n \r\n }\r\n } else {\r\n Message::addErrorMessage(\"Error While changing the profile picture.\");\r\n\t\t\t//Message::addErrorMessage($this->Banners->getError());\r\n\t\t\tdieJsonError(Message::getHtml());\r\n }\r\n\r\n //redirectUser(generateUrl('doctors'));\r\n }",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function update_profile_pic(Request $request) {\n \t$base64_encoded_image = $request->imagebase64;\n \t//get the base64 code\n \t$data = explode(';', $base64_encoded_image)[1];\n $data = explode(',', $data)[1];\n $profile_pictures_path = public_path() . '/images/profile_pictures/';\n $image_name = time() . strtolower(Auth::user()->first_name . '_' . Auth::user()->last_name) . '.png';\n\n //decode the data\n $data = base64_decode($data);\n //save the data\n $total_path = $profile_pictures_path . $image_name;\n file_put_contents($total_path, $data);\n\n //update the user model\n Auth::user()->image = $image_name;\n Auth::user()->save();\n\n return redirect()->back();\n }",
"public function cacheProfilePic(TwitterProfile $profile)\n {\n $this->filesystem->copy(\n $profile->profile_image_url,\n $this->getProfilePicLocalPath($profile)\n );\n }",
"public function getProfilePicture();",
"protected function updateProfilePicture($image)\n {\n $oldId = $this->account->getRelation('user')->getAttribute('profile_picture_id');\n\n $this->account->getRelation('user')->update(['profile_picture_id' => $image->getAttribute('id')]);\n\n $this->deleteOldProfilePicture($oldId);\n }",
"function form_upload_picture() {\n $user = $this->ion_auth->user()->row();\n $this->load->view('portofolio/form_update_foto', $user);\n }",
"public function profileimageAction() {\n\t\ttry{\t\t\t\n\t\t\t$this->view->UserProfileImage = $this->session->UserProfileImage; //$UserProfileImage['0']['image_path'];\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}",
"public function setUserProfileImage($userId)\r\n {\r\n\t\t$ssQuery =Doctrine_Query::create()\r\n ->update('Users')\r\n ->set('ProfilePic', '?', \"\")\r\n ->where('id = ?', $userId)\r\n ->execute();\r\n\r\n return true;\r\n }",
"protected function defaultProfilePhotoUrl()\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=252f3f&background=EBF4FF';\n }",
"public function getImageProfile() {\n\t\t$basePath = Yii::getAlias ( '@web' );\n\t\t\n\t\t$usuarioFacebook = $this->entUsuariosFacebook;\n\t\t\n\t\tif(empty($usuarioFacebook)){\n\t\t\tif ($this->txt_imagen) {\n\t\t\t\treturn $basePath . '/profiles/' . $this->txt_token.\"/\". $this->txt_imagen;\n\t\t\t}\n\t\t\t\n\t\t\treturn $basePath . '/webAssets/images/site/user.png';\n\t\t}\n\t\t\n\t\treturn 'http://graph.facebook.com/'.$usuarioFacebook->id_facebook.'/picture';\n\t\t\n\t}",
"public function updatePic(Request $request)\n {\n \t$file = $request->file('profile-pic');\n //The public directory for profile images\n \t$destinationPath = public_path().'\\images\\\\';\n \t\n //Move the file to the destination path\n \t//$file->move($destinationPath,$file->getClientOriginalName());\n\n //To crop image\n // Image::make($file)->crop(226, 226)->save($destinationPath.$file->getClientOriginalName());\n Image::make($file)->resize(226, 226)->save($destinationPath.$file->getClientOriginalName());\n\n //Updates the profile picture path in the user table\n \t$isUploaded = $this->userRepo->updateProfilePic($request->all()['user_id'], 'images\\\\'.$file->getClientOriginalName());\n \tif($isUploaded)\n \t{\n \t\treturn redirect()->route('profile-page')->with('status', \"Profile Picture successfully updated.\");\n \t}\n \treturn redirect()->route('profile-page')->with('status', \"Error in uploading. Please contact your administrator.\");\n \t\n }",
"public function getProfileImg()\n {\n return $this->profileImg;\n }",
"public function testProfilePrototypeUpdateImage()\n {\n\n }",
"public function update_avatar(Request $request){\n\n if($request->hasFile('avatar')){\n $avatar = $request->file('avatar');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save(public_path('/dist/img/' . $filename));\n\n $user = Auth::user();\n $user->avatar = $filename;\n $user->save();\n }\n\n return view('usuario.profile', array('user' => Auth::user()) );\n }",
"function showAvatar()\n {\n $avatar_size = $this->avatarSize();\n\n $avatar = $this->profile->getAvatar($avatar_size);\n\n $this->out->element('img', array('src' => ($avatar) ?\n $avatar->displayUrl() :\n Avatar::defaultImage($avatar_size),\n 'class' => 'avatar photo',\n 'width' => $avatar_size,\n 'height' => $avatar_size,\n 'alt' =>\n ($this->profile->fullname) ?\n $this->profile->fullname :\n $this->profile->nickname));\n }",
"public function uploadProfilePicture()\n {\n // nécessaire de le nettoyer pour éviter les problèmes de sécurité\n\n // move copie le fichier présent chez le client dans le répertoire indiqué.\n $this->file->move($this->getUploadRootDir(), $this->file->getClientOriginalName());\n\n // On sauvegarde le nom de fichier\n $this->nomImage = $this->file->getClientOriginalName();\n\n // La propriété file ne servira plus\n $this->file = null;\n }",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function setPicture($picture) {\n $this->picture = $picture;\n }",
"protected function _getProfilePicturePath()\n {\n if ($this->_properties['profile_picture_dir'] && $this->getOriginal('profile_picture')) {\n return '../files/users/profile_picture/' . $this->_properties['profile_picture_dir'] . '/square_' . $this->getOriginal('profile_picture'); \n }\n return 'default-profile_picture.png';\n }",
"function saveUserPic($img,$action)\n\t\t{\n\t\t\t//checking that product with order id is present or not\n\t\t\tif($action == 'pro')\n\t\t\t{\n\t\t\t\t//update user profile pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'profile_image', 'files/pro-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t\telseif($action == 'cov')\n\t\t\t{\n\t\t\t\t//update user cover pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'cover_image', 'files/cov-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t}",
"public function update_picture(Request $request)\n {\n $cropData = $request->input('cropData');\n $image = Image::make($request->input('file'));\n $image->crop(round($cropData['width']), round($cropData['height']), round($cropData['x']), round($cropData['y']))\n ->resize(250, 250, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n // save uploaded image\n do {\n $filename = str_random(12);\n } while (file_exists(public_path('/uploads/user-pictures/') . $filename . '.png'));\n if (!file_exists(public_path('/uploads/user-pictures')))\n mkdir(public_path('/uploads/user-pictures'), 0755, true);\n $image->save(public_path('/uploads/user-pictures/') . $filename . '.png', 80);\n\n // delete old profile picture\n if (Auth::user()->picture && file_exists(public_path('/uploads/user-pictures/') . Auth::user()->picture))\n unlink(public_path('/uploads/user-pictures/') . Auth::user()->picture);\n\n // update profile picture\n Auth::user()->picture = $filename . '.png';\n Auth::user()->save();\n\n // set response and flash messages\n $request->session()->flash('alerts', [\n (object) [\n 'type' => 'success',\n 'title' => trans('chronos.scaffolding::alerts.Success.'),\n 'message' => trans('chronos.scaffolding::alerts.Profile picture successfully updated.'),\n ]\n ]);\n\n echo json_encode([\n 'redirect' => route('chronos.auth.profile')\n ]);\n }",
"public function saveAvatar(Profile $profile, $avatar)\n {\n $profile->avatar_path = $avatar->basename;\n $profile->save();\n }",
"public function changeProfilePicture() {\r\n $data = $this->common_model->commonFunction();\r\n $data['user_session'] = $this->session->userdata('user_account');\r\n $user_id = $data['user_session']['user_id'];\r\n\r\n $config['allowed_types'] = 'gif|jpg|png|jpeg';\r\n $config['upload_path'] = './media/front/img/user-profile-pictures/';\r\n $config['max_size'] = 1024 * 3;\r\n $config['file_name'] = rand();\r\n $this->load->library('upload', $config);\r\n $this->upload->initialize($config);\r\n if ($_FILES['uploadprofile']['name'] != '') {\r\n\r\n if (!$this->upload->do_upload('uploadprofile')) {\r\n $error = $this->upload->display_errors();\r\n $this->session->set_userdata('image_error', $error);\r\n } else {\r\n $thumb_file = explode('.', $this->input->post('old_logo'));\r\n $absolute_path = $this->common_model->absolutePath();\r\n $data = $this->upload->data();\r\n $logo_name = $data['file_name'];\r\n\r\n /* create thumbnail start here */\r\n $this->load->library('image_lib');\r\n $config['image_library'] = 'gd2';\r\n $config['source_image'] = './media/front/img/user-profile-pictures/' . $data['file_name'];\r\n $config['create_thumb'] = TRUE;\r\n $config['maintain_ratio'] = TRUE;\r\n $config['width'] = 100;\r\n $config['height'] = 100;\r\n $config['new_image'] = './media/front/img/user-profile-pictures/thumb/' . $data['file_name'];\r\n\r\n /* create thumbnail start here */\r\n $this->load->library('image_lib');\r\n $config['image_library'] = 'gd2';\r\n $config['source_image'] = './media/front/img/user-profile-pictures/' . $data['file_name'];\r\n $config['maintain_ratio'] = TRUE;\r\n $config['width'] = 100;\r\n $config['height'] = 100;\r\n\r\n $config['new_image'] = './media/front/img/user-profile-pictures/thumb/' . $data['file_name'];\r\n\r\n $this->image_lib->initialize($config);\r\n if (!$this->image_lib->resize()) {\r\n $error = $this->image_lib->display_errors();\r\n $this->session->set_userdata('image_error', $error);\r\n }\r\n\r\n $profile_image = array(\"profile_picture\" => $data['file_name']);\r\n\r\n #condition to update record\tfor the user status\r\n $condition_array = array('user_id' => $user_id);\r\n $this->common_model->updateRow('mst_users', $profile_image, $condition_array);\r\n }\r\n }\r\n\r\n $profile_image = array(\"profile_picture\" => $data['file_name']);\r\n #condition to update record\tfor the user status\r\n $condition_array = array('user_id' => $user_id);\r\n $this->common_model->updateRow('mst_users', $profile_image, $condition_array);\r\n }",
"public function getProfileImg()\n {\n return $this->profile_img;\n }",
"function profile(){\r\n $_FILES['userfile']['name'] = $_SESSION['fname'].\".jpeg\";\r\n $uploaddir = 'upload/';\r\n $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);\r\n move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile);\r\n }",
"public function setProfile(Profile $profile): void\n {\n $this->profile = $profile;\n }",
"public function UpdateProfilePicture($id, $file) {\n //Get Database\n $_database = $this->ConnectDatabase();\n //Create Data\n $_data = array($file, $id);\n //Call and return Database Function\n return $this->CallDatabase(\n\t\t\t$_database, $_data, function($_pdo, $_parameters) {\n\t\t\t\t$set = \"url_profile = ?\";\n\t\t\t\t//Create Query\n\t\t\t\t$_query = $_pdo->prepare(\"\n\t\t\t\t\tUPDATE `Users`\n\t\t\t\t\tSET \" . $set . \"\n\t\t\t\t\tWHERE id = ?\n\t\t\t\t\");\n\t\t\t\t//Execute Query\n\t\t\t\t$_query->execute($_parameters);\n\t\t\t\t//Tratamento da resposta\n\t\t\t\tif (is_null($_query->errorInfo())) {\n\t\t\t\t\t$this->_response[\"status\"] = false;\n\t\t\t\t\t$this->_response[\"error\"] = $_query->errorInfo();\n\t\t\t\t} else {\n\t\t\t\t\t$this->_response[\"status\"] = true;\n\t\t\t\t}\n\t\t\t\treturn $this->_response;\n\t\t\t}\n );\n\t}",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function update_avatar(Request $request){\n\n // Handle the user upload of avatar\n if($request->hasFile('avatar')){\n\n $avatar = $request->file('avatar');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save(('uploads/avatars/' . $filename ) );\n\n $user = Auth::user();\n $user->avatar = $filename;\n $user->name = $request->get('name');\n $user->save();\n }\n\n return view('profile', array('user' => Auth::user()) );\n\n }",
"public function update_avatar(Request $request){\n if($request->hasFile('avatar')){\n $avatar = $request->file('avatar');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save( public_path('/images/avatar/' . $filename ) );\n $user = Auth::user();\n $user->avatar = $filename;\n $user->save();\n }\n return view('configPerfil', array('user' => Auth::user()) );\n\n }",
"public function change_profile_image()\n {\n $user_id = $this->user_id;\n\n $config['upload_path'] = 'assets/uploads/user_profiles/';\n $config['allowed_types'] = 'jpg|jpeg|png|gif';\n $config['file_name'] = $_FILES['image']['name'];\n \n $this->load->library('upload',$config);\n $this->upload->initialize($config);\n \n if($this->upload->do_upload('image'))\n {\n $uploadData = $this->upload->data();\n $data['image'] = $config['upload_path'].$uploadData['file_name'];\n }\n else\n {\n $data['image'] = '';\n }\n\n $this->db->set($data)->where('id',$user_id)->update('users');\n\n\n $message = array(\n 'status' => 1,\n 'message' => 'Profile Picture Update Successfully :)'\n );\n\n $this->session->set_userdata($message);\n\n redirect('home/user_profile');\n\n }",
"public function update_avatar(Request $request){\n if($request->hasFile('foto_perfil')){\n $avatar = $request->file('foto_perfil');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n $avatar->resize(300, 300)->save( public_path('/storage/foto_perfil/' . $filename ) );\n $user = Auth::user();\n $user->avatar = $filename;\n $user->save();\n }\n\n dd($user);\n return view('profile', ['user' => Auth::user()] );\n }",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"public function updating(Profile $article)\n {\n \t$profile->avatar = 'https://www.gravatar.com/avatar/'.md5($profile->gravatar_email);\n }",
"function change_picture($data, $pic) {\n $data = str_replace('data:image/png;base64', '', $data);\n $data = str_replace(' ', '+', $data);\n $data = base64_decode($data);\n $source_img = imagecreatefromstring($data);\n $file = '../users/'.$_SESSION['username'].'/'.$pic.'.jpg';\n imagejpeg($source_img, $file,75);\n imagedestroy($source_img);\n http_response_code(200);\n}",
"public function update_profileImage() {\n \n $data = $_POST['image'];\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n $data = base64_decode($data);\n $imageName = time().'.png';\n\n file_put_contents('files/uploads/users/'.$imageName, $data);\n $data = $this->request->data;\n $id = $this->Auth->user('id');\n $profile_image = $imageName;\n if (!empty($profile_image)) {\n $ext = substr(strtolower(strrchr($profile_image, '.')), 1);\n $arr_ext = array(\n 'jpg',\n 'jpeg',\n 'gif',\n 'png',\n );\n if (in_array($ext, $arr_ext)) {\n move_uploaded_file($profile_image, WWW_ROOT . 'files/uploads/users/' . $profile_image);\n \n $data['profile_image'] = $profile_image;\n $update = $this->User->updateUser($id, $data);\n if ($update == 1) {\n $this->Session->write('Auth.User.profile_image', $profile_image);\n die();\n }\n }\n }\n \n \n \n }",
"public function setProfileImg($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->profile_img !== $v) {\n $this->profile_img = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_PROFILE_IMG] = true;\n }\n\n return $this;\n }",
"public function avatar() {\n $data = array();\n if (!$this->user->is_logged_in()) {\n redirect(\"/account/info\");\n }\n\n $this->user->get_user($this->user->getMyId());\n $data['user'] = $this->user;\n\n $this->load->helper('form');\n $this->load->library('form_validation');\n $this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\n $hidden_fields = array(\n 'user_id' => $this->user->getMyId(),\n 'set_avatar' => 'set_avatar',\n );\n $data['hidden'] = $hidden_fields;\n $data['avatars'] = $this->user->get_all_avatars();\n if ($this->input->post('set_avatar') == 'set_avatar') {\n if ($this->form_validation->run('account/avatar') === FALSE) {\n $this->load->view('account/avatar', $data);\n\n }\n else {\n $id = $this->user->update_avatar();\n redirect('account/profile_complete');\n }\n }\n else {\n $this->load->view('account/avatar', $data);\n }\n }",
"public function update_avatar(Request $request){\n \n if($request->hasFile('avatar')){\n $avatar=$request->file('avatar');\n $filename=time() .'.' .$avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300,300)->save(public_path('images/avatars/' .$filename));\n\n $user = Auth::user();\n $user ->avatar =$filename;\n $user->save();\n }\n return redirect('user/settings')->with(['response'=>'Profile Image Updated Successfully'] );\n }",
"public function outputAvatarImage()\n\t{\n\t\techo $this->app->html->img($this->avatar_url, $this->avatar_width, $this->avatar_height, $this->username);\n\t}",
"public function profilePicPath()\n {\n \treturn $this->defaultProfilePicPath;\n }",
"protected function defaultProfilePhotoUrl(): string\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';\n }",
"public function update_profile(Request $request) {\n //Validsmo el archivo, sus formatos, y su tamaño maximo de 2MB\n $this->validate($request, [\n 'avatar' => 'required|image|mimes:jpg,png,jpeg,gif,svg|max:2048',\n ]);\n \n //Lo sube a la carpeta de avatares\n $filename = Auth::id().'_'.time().'.'.$request->avatar->getClientOriginalExtension();\n $request->avatar->move(public_path('uploads/avatars'), $filename);\n \n //Termina guardando lo anterior en la base de datos\n $user = Auth::user();\n $user->avatar = $filename;\n $user->save();\n \n //Mandamos Mensaje de Confirmación\n Flash('¡ La Foto de Perfil a cambiado !')->success();\n //Redireccionamos\n return redirect()->route('users.index');\n }",
"public function reloadProfile($profile){\n $this->setProfileInfo($profile);\n $this->loadProfileFiles($profile);\n }",
"public function updateAvatar(Request $request){\n \tif($request->hasFile('avatar')){\n \t\t$avatar = $request->file('avatar');\n \t\t$filename = preg_replace('/\\s+/', '', Auth::user()->name) . time() . '.' . $avatar->getClientOriginalExtension();\n\n \t\t// Delete current image before uploading new image\n if (Auth::user()->avatar !== 'default.jpg') {\n $file = public_path('/uploads/avatars/' . Auth::user()->avatar);\n if (File::exists($file)) {\n unlink($file);\n }\n }\n\n \t\tImage::make($avatar)->resize(300, 300)->save( public_path('/uploads/avatars/' . $filename ) );\n\n \t\t$user = Auth::user();\n \t\t$user->avatar = $filename;\n \t\t$user->save();\n \t}\n\n \t//return view('user.profile', array('user' => Auth::user()) );\n return back();\n\n }",
"public function updateProfile($userbio){ \n\n if ($_FILES['profilephoto']['error'] == 0) {\n # start file upload\n $filesize = $_FILES['profilephoto']['size'];\n $filename = $_FILES['profilephoto']['name'];\n $filetype = $_FILES['profilephoto']['type'];\n $filetempname = $_FILES['profilephoto']['tmp_name'];\n\n //specify the destination folder to upload files to \n $folder = \"profilephotos/\";\n\n //limit file size, check file type (extensions)\n if($filesize > 2097152){\n $error[] = 'File size must be exactly or less than 2MB!';\n }\n //GET FILE EXTENSION\n $file_ext = explode('.', $filename);\n $file_ext = strtolower(end($file_ext)); // to get last element in an array and to lowercase\n\n //specify the extensions allowed\n\n $extensions = array('png', 'jpeg', 'gif', 'jpg', 'bmp', 'svg', );\n\n if (in_array($file_ext , $extensions) === false){\n $error[] = 'Extension not allowed';\n }\n\n //change the filename\n $filename = time().\"_\";\n $destination = $folder.$filename.\".\". $file_ext;\n\n // var_dump($destination);\n\n //now check if there is no error and upload the file\n if(!empty($error)){\n var_dump($error);\n }\n else{\n //otherwise, upload profile picture\n move_uploaded_file($filetempname, $destination);\n\n // update photograph column in users based on userid\n $userid = $_SESSION['myuserid'];\n //write query to update the table column\n $sql = \"UPDATE users SET user_biography = '$userbio', photo = '$destination' WHERE user_id = '$userid';\";\n $result = $this->dbobj->dbcon->query($sql);\n\n if ($this->dbobj->dbcon->affected_rows == 1) { \n //create session variable\n \n $result = \"<div class='alert alert-success'> Image uploaded!</div>\";\n\n }\n else{\n $result = \"<div class='alert alert-danger'> No image uploaded!</div>\". $this->dbobj->dbcon->error;\n\n }\n\n }\n\n \n }\n else {\n $result = \"<div class='alert alert-danger'> You have not uploaded any image!</div>\";\n }\n\n\n return $result;\n }",
"public function profilePicture($size = 200)\n {\n // use Gravatar\n $hash = md5(strtolower(trim($this->email)));\n\n return \"https://secure.gravatar.com/avatar/$hash?s=$size&d=mm\";\n }",
"public function setAvatarUrl($value)\n {\n $this->avatar = end(explode('/', $value));\n }",
"public function changeProfile(Request $request)\n {\n\n if ($this->tokenStorage->getToken()->getUsername() !== \"anon.\")\n {\n // Logged in, continue\n\n $user = $this->tokenStorage->getToken()->getUser();\n\n if ($request->isMethod('POST'))\n {\n $image = $request->files->get('profile');\n\n $this->profileChange->changeProfile($user, $image);\n }\n \n // Redirect to homepage\n return new RedirectResponse($this->router->generate(\"user_dashboard\"));\n }\n else\n {\n // Not logged in, redirect\n\n return new RedirectResponse($this->router->generate(\"user_login\"));\n }\n }",
"function user_profile_pic()\n {\n $data['fetch_category'] = $this->Admin_model->category();\n $data['fetch_sub_category'] = $this->Admin_model->sub_category();\n $data['accepted_projects'] = $this->Admin_model->accepted_projects();\n\n $data['fetch_tags'] = $this->Admin_model->fetch_tags();\n $data['basic_info'] = $this->Admin_model->basic_info();\n\n //...........for view page.................//\n\n $this->load->view('include/header', $data);\n $this->load->view('user_profile_pic', $data);\n $this->load->view('include/footer', $data);\n }",
"public function update_avatar(Request $request){\n\n // Handle the user upload of avatar\n $this->validate($request, [\n 'photo' => 'required|image|mimes:jpeg,png,jpg,gif,svg',\n ]);\n if($request->hasFile('photo')){\n $avatar = $request->file('photo');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n //$path = $_FILES['photo']['type'];\n //$ext = pathinfo($path, PATHINFO_EXTENSION);\n //dd($path);\n Image::make($avatar)->resize(300, 300)->save(public_path('/uploads/avatars/' . $filename ));\n\n $user = Auth::user();\n $img_path = url('/uploads/avatars/'.$filename);\n $user->photo = $img_path;\n $user->save();\n }\n // Session::flash('success', 'Photo de profile changée avec succès.');\n //return view('etudiants.profile', array('user' => Auth::user()) );\n //return back();\n\n }",
"public function update_profile() {\n\t\tloggedOnly();\n\n\t\t// Busca o usuario\n\t\t$user = auth();\n\n\t\t// Pega o email\n\t\t$email = $this->input->post( 'email' ) ? \n\t\t\t\t $this->input->post( 'email' ) :\n\t\t\t\t $user->email;\n\n\t\t// Verifica se o email foi alterado\n\t\tif( $email !== $user->email ) {\n\n\t\t\t// Verifica se o email é unico\n\t\t\tif( $this->User->email( $email ) ) {\n\t\t\t\treturn reject( 'E-mail ja cadastrado no sistema' );\n\t\t\t}\n\t\t\t\n\t\t\t// Seta o email\n\t\t\t$user->email = $email;\n\t\t}\n\n\t\t// Verifica se a senha foi alterada\n\t\tif( $password = $this->input->post( 'password' ) ) {\n\t\t\t$user->setPassword( $password );\n\t\t}\n\n\t\t// seta o nome\n\t\t$user->name = $this->input->post( 'name' ) ? \n\t\t\t\t\t $this->input->post( 'name' ) : \n\t\t\t\t\t $user->name;\n\n\t\t// Verifica se a foto foi alterada\n\t\tif( $base64 = $this->input->post( 'image' ) ) {\n\n\t\t\t// Guarda a imagem\n\t\t\tif( $midia_id = $this->__saveUserImage( $base64 ) ) {\n\t\t\t\t$user->midia_id = $midia_id;\n\t\t\t} else return reject( 'Erro ao salvar a imagem do usuário' );\n\t\t}\n\n\t\t// salvar a alteração\n\t\tif( $user->save() ) {\n\t\t\treturn resolve( $user->authData() );\n\t\t} else return reject( 'Erro ao realizar a ação' );\n\t}",
"public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }",
"function update_avatar ( $ID, $student_or_staff='student' ) {\n\tglobal $access_token, $canvas_base_url;\n\t\n\t$url=$canvas_base_url.\"/api/v1/users/sis_user_id:\".$ID.\".json\";\n\t\n\t$nine_digit = str_pad($ID, 9, \"0\", STR_PAD_LEFT);\n\n\tif ($student_or_staff == 'staff') {\n\t\t$avatar_url = 'https://www.YOURINSTITUTION.edu/path/to/employee/pics/'.$ID;\n\t}\n\telse {\n\t\t$avatar_url = 'https://www.YOURINSTITUTION.edu/path/to/student/pics/'.$nine_digit.'.jpg';\n\t}\n\n\tsystem(\"curl $url -X PUT -F 'user[avatar][url]=$avatar_url' -H 'Authorization: Bearer $access_token'\");\n\t\n}",
"public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}",
"private function setAvatar(Avatar $avatar) {\n $this->avatar = $avatar;\n }",
"function profile_picture($user_id, $base_url)\n\t{\n\t\tglobal $msg, $profile_img_path;\n\t\t\n\t\t$app_path = $profile_img_path;\n\n\t\t$path = 'messages/images/';\n\t\t$result = $msg->user_profile_picture($user_id, $base_url);\n\n\t\tif(file_exists($app_path.$path.$result))\n\t\t{\n\t\t\treturn $base_url.$path.$result;\t\n\t\t} else {\n\t\t\treturn $base_url.$path.'default.jpg';\t\n\t\t}\n\t}",
"public function setProfileImg($profileImg)\n {\n $this->profileImg = $profileImg;\n\n return $this;\n }",
"public function getSpotifyProfilePicture()\n {\n return $this->spotifyProfilePicture;\n }",
"public function updateUserProfilePicture(Request $request)\n {\n $data= Validator::make($request->all(), [\n 'id' => 'required',\n 'avatar' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n if ($data->fails()) {\n return response()->json([\n 'status' => 400,\n 'message' => 'All fields are required',\n 'data'=> []\n ], 400);\n }\n\n if($request->id != $request->userID){\n return response()->json([\n 'status' => 400,\n 'message' => 'Not authorized to carry out this action',\n 'data'=> []\n ], 400);\n }\n\n $name = $request->id.\".jpg\";\n $path = Storage::disk('public')->putFileAs('avatars', $request->file('avatar'), $name, 'public');\n\n User::find($request->id)->update([\n 'pictureUrl' => Storage::disk('public')->url('avatars/'.$name)\n ]);\n $user = User::find($request->id);\n $user->followers = Follow::where('userId', $user->id)->count();\n $user->following = Follow::where('followedBy', $user->id)->count();\n $user->recipes = Recipe::where('userId', $user->id)->count();\n $user->saveCount = Favorite::where('userId', $user->id)->where('commentId', null)->count();\n return response()->json([\n 'status' => 200,\n 'message' => 'User account has been updated',\n 'data' => [\n // User::find($request->id)->only('id', 'name', 'email', 'phoneNumber','bio', 'pictureUrl'),\n $user\n ]\n ], 200);\n }",
"public function setAvatar(string $avatar);",
"public function update(Request $request, usuario $user)\n {\n $user->fill($request->except('profile_picture'));\n if($request->hasFile('profile_picture')){\n $file=$request->file('profile_picture');\n $name=time().$file->getClientOriginalName();\n $user->profile_picture=$name;\n $file->move(public_path().'/images/',$name);\n }\n\n \n $user->save();\n\n return 'Updated';\n }",
"public function getRiderProfilePictureAttribute()\n {\n $profile_picture=ProfilePicture::where('user_id',$this->attributes['user_id'])->first();\n return isset($profile_picture)?$profile_picture->src:url('images/user.jpeg');\n }",
"public function getProfileAvatar()\n {\n return view('profilePicture');\n }",
"public function updateAvatar ($photo) \n {\n \n // tries to retrieve the original type of the image by reading the base64 encoded image upload data\n $type = explode('/', explode(':', substr($photo, 0, strpos($photo, ';')))[1])[1];\n\n if (empty($type) || !in_array(strtolower($type), ['jpg', 'jpeg', 'png', 'bmp', 'gif'])) {\n throw new \\Exception(\"Unsupported image format\");\n }\n\n $name = $this->slug . '.' . explode('/', explode(':', substr($photo, 0, strpos($photo, ';')))[1])[1];\n $filePath = storage_path('app/public/media/profile/').$name; \n $url = '/storage/media/profile/' . $name; \n\n \\Image::make($photo)->save($filePath);\n \n $this->avatar = $url;\n $this->save();\n \n return $url;\n }",
"public function setProfileUrl($url)\n {\n if ($url) {\n $this->profileUrl = preg_replace(\"#(\\/+)$#\", \"\", $url) . \"/\";\n }\n }",
"public function updateUserProfile()\n { \n $user = $this->session->userdata(\"loggedIn\")['id'];\n $this->User_Model->updateUserProfile($this->input->post());\n $data= $this->User_Model->getUserData($user);\n $data = $data['profile_picture'];\n $data = str_replace(base_url(),\"\",$data);\n unlink($data);\n $path = 'uploadFolders/user_' . $user;\n $profilePictureFolderPath = $path.\"/profilePicture\";\n $profilePicture =$profilePictureFolderPath.\"/\".$_FILES['newProfilePicture']['name'];\n // $pathOfPicture = 'uploadFolders/user_'.$user.\"/profilePicture/\";\n if($_FILES['newProfilePicture'])\n {\n $newFile = $_FILES['newProfilePicture']['tmp_name'];\n move_uploaded_file($newFile,$profilePicture);\n $updatedProfilePicture = base_url().$profilePicture;\n $this->User_Model->setProfilePicture($user,$updatedProfilePicture);\n }\n \n }",
"public function deletePicture()\n {\n $tenant = Tenant::where('idPerson', '=', \\Auth::user()->idPerson)->first();\n $tenant->profile_picture = NULL;\n $tenant->save();\n\n }",
"public function SaveProfileImg() {\n $file_name = $_SESSION['user_id'] . \"-\" . time() . \"-\" . $this->ImageName;\n $file_size = $this->ImageSize;\n $file_tmp = $this->ImageTmpName;\n $tmp = explode('.', $file_name);\n $file_ext = end($tmp);\n $expensions = array(\"jpeg\", \"jpg\", \"png\", \"gif\");\n \n if (in_array($file_ext, $expensions) === false) {\n throw new Exception(\"extension not allowed, please choose a JPEG or PNG or GIF file.\");\n }\n \n if ($file_size > 2097152) {\n throw new Exception('File size must be excately 2 MB');\n }\n \n if (empty($errors) == true) {\n move_uploaded_file($file_tmp, \"data/profile/\" . $file_name);\n return \"data/profile/\" . $file_name;\n } else {\n echo \"Error\";\n }\n }",
"public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'bday', 'mood'), $_POST);\n\n $arg['id'] = $_POST[\"user\"];\n\n if (count($arg) == 1)\n parent::returnWithErr(\"You should pass the profile 1 entry at least to update.\");\n\n $user = $this->Mdl_Users->update($arg);\n\n if ($user == null)\n parent::returnWithErr(\"Profile has not been updated.\");\n\n parent::returnWithoutErr(\"Profile has been updated successfully.\", $user);\n }",
"public function getProfileImageURL()\n {\n return 'https://avatars3.githubusercontent.com/u/4479918?v=4&s=460';\n }",
"function updateUserProfilePicture($id, $image)\n{\n global $db;\n $command = \"UPDATE `user_accounts` SET `profilePicture` = ? WHERE `id` = ?\";\n $stmt = $db->prepare($command);\n return $stmt->execute(array($image, $id));\n}",
"public function myprofileAction()\n {\n \tZend_Registry::set('Category', Category::ACCOUNT);\n \tZend_Registry::set('SubCategory', SubCategory::NONE);\n\n $album = $this->_user->getProfileAlbum();\n if(!$album->isReadableBy($this->_user, $this->_acl)){\n $album = null;\n \t}\n\n $blog = $this->_user->getBlog();\n if(!$blog->isReadableBy($this->_user, $this->_acl)){\n $blog = null;\n \t}\n\n $this->view->profilee = $this->_user;\n $this->view->album = $album;\n $this->view->blog = $blog;\n $this->view->medias = $album->getItemSet();\n\n $this->renderScript('user/profile.phtml');\n }",
"function updateProfile($mysqli,$profile){\r\n $query = \"UPDATE `profiles` SET FirstName = '\".$profile->firstName.\"', LastName = '\".$profile->lastName.\"', Gender = '\".$profile->gender.\"', Birthday = '\".$profile->birthday.\"', Weight = '\".$profile->weight.\"', \r\n Height = '\".$profile->height.\"', Bio = '\".$profile->bio.\"', Prof_Pic_URL = '\".$profile->profPicURL.\"' WHERE UserID = \".$profile->userID;\r\n $mysqli->query($query);\r\n }",
"public function updateProfilePhoto(null|string $photo): void\n {\n tap($this->profile_photo_path, function ($previous) use ($photo) {\n $this->forceFill([\n 'profile_photo_path' => $photo,\n ])->save();\n\n if ($previous && ! $photo) {\n Storage::disk($this->profilePhotoDisk())->delete($previous);\n }\n });\n }",
"public function actionUpdateProfile($id)\n {\n Url::remember('', 'actions-redirect');\n $user = $this->findModel($id);\n $profile = $user->profile;\n $path = Yii::$app->params['userimagePath']; \n //$oldimage=Yii::$app->basePath . $path . $profile->user_image;\n \n $username=\\backend\\models\\User::find()->select(\"username\")->where(['id'=>$profile['user_id']])->asArray()->one();\n $user_name=$username['username'];\n \n \n\n if ($profile == null) {\n $profile = Yii::createObject(\\backend\\models\\Profile::className());\n $profile->link('user', $user);\n }\n\n $this->performAjaxValidation($profile);\n \n $request=Yii::$app->request->post();\n \n $session = Yii::$app->session;\n // $userPermission= $session->set('userPermission');\n \n if($request)\n {\n $profile->mobile=$request[\"Profile\"][\"mobile\"];\n $profile->phone=$request[\"Profile\"][\"phone\"];\n $profile->fax=$request[\"Profile\"][\"fax\"];\n $image = \\yii\\web\\UploadedFile::getInstance($profile, 'user_image');\n if (isset($image))\n {\n \n if(in_array($image->extension,[ 'png','jpg','jpeg','bmp','gif']))\n {\n $randstring = uniqid();\n $fullpath = Yii::$app->basePath . $path . $randstring. '.' . $image->extension;\n /* if(isset($profile->user_image) && $profile->user_image!=\"noimage.png\" && file_exists($oldimage))\n {\n unlink($oldimage);\n }*/\n $image->saveAs($fullpath);\n $profile->user_image=$randstring. '.' . $image->extension;\n \n //$session->set(\"user_image\", $profile->user_image);\n }\n else\n {\n $error = \"Invalid File Format\";\n return $this->render('_profile', ['profile' => $profile,'user'=> $user, 'error' => $error]);\n }\n }\n \n }\n \n if ($profile->load(Yii::$app->request->post()) && $profile->save()) {\n \n //var_dump($profile->user_image);die;\n $session = Yii::$app->session; \n $userPermission=json_decode($session->get('userPermission'));\n if($userPermission->user_id==$id)\n {\n $userPermission->user_image=$profile->user_image;\n\n $jsonstring= json_encode($userPermission); \n $session->set('userPermission', $jsonstring);\n \n }\n \n Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Profile details have been updated'));\n\n return $this->refresh();\n \n }\n return $this->render('_profile', [\n 'user' => $user,\n 'profile' => $profile,\n ]);\n }",
"public function updateProfile(Request $request, $id)\n {\n $user = User::find($id);\n $file = $request->file('file');\n $imagen = getimagesize($file); //Sacamos la información\n $width = $imagen[0]; //Ancho\n $height = $imagen[1]; \n\n if($height > '600' || $width > '400'){\n $height = $height / 2;\n $width = $width / 2;\n }\n if($height > '800' || $width > '600'){\n $height = $height / 2.5;\n $width = $width / 2.5;\n }\n if($height > '1000' || $width > '900'){\n $height = $height / 3;\n $width = $width / 3;\n }\n\n\n\n $img = Image::make($file);\n $img->resize($width, $height);\n $img->encode('jpg');\n Storage::disk('s3')->put( $id.'temporal.jpg', (string) $img, 'public');\n $filename = $id.'temporal.jpg';\n $path = Storage::cloud()->url($filename);\n $path2= 'https://s3.amazonaws.com/'. env('S3_BUCKET') .'/'. $filename;\n\n \n $user->profile_photo = $path2; \n \n if($user->save()){\n Session(['val' => 'true']);\n return redirect('/user/edit/complete');\n }\n }",
"public function setAvatar($avatar)\n {\n $this->avatar = $avatar;\n }"
] | [
"0.7237525",
"0.722816",
"0.7164345",
"0.7089643",
"0.7079475",
"0.70403266",
"0.6979016",
"0.6962133",
"0.6915768",
"0.6878279",
"0.687328",
"0.6857128",
"0.67138314",
"0.66511095",
"0.65908563",
"0.6582444",
"0.65433943",
"0.6532345",
"0.6530047",
"0.6526524",
"0.6507338",
"0.65021944",
"0.6497704",
"0.6434788",
"0.6430082",
"0.6429859",
"0.6423967",
"0.64156675",
"0.64148563",
"0.6384615",
"0.63292474",
"0.6325286",
"0.63227",
"0.6317525",
"0.6308926",
"0.6305557",
"0.6299247",
"0.6288349",
"0.62865007",
"0.6274276",
"0.62737906",
"0.6262561",
"0.62611693",
"0.62546426",
"0.6249047",
"0.6245753",
"0.62443316",
"0.6240516",
"0.62253803",
"0.6211267",
"0.62097365",
"0.6191788",
"0.6175993",
"0.61590415",
"0.61550903",
"0.6152743",
"0.61380124",
"0.6127132",
"0.6121359",
"0.6114273",
"0.6103574",
"0.6098323",
"0.6086819",
"0.6080175",
"0.60782903",
"0.6077049",
"0.6068681",
"0.6051691",
"0.60497683",
"0.60422707",
"0.6041668",
"0.603648",
"0.6031689",
"0.60287195",
"0.6027169",
"0.60245305",
"0.6012939",
"0.60100675",
"0.60085994",
"0.5989433",
"0.59893095",
"0.5989284",
"0.59854263",
"0.5981205",
"0.5978562",
"0.59753984",
"0.59695804",
"0.5967722",
"0.5967204",
"0.5965571",
"0.5964447",
"0.59505564",
"0.59408236",
"0.594028",
"0.59327775",
"0.5908755",
"0.59069645",
"0.5900981",
"0.58947694",
"0.58867204",
"0.5868329"
] | 0.0 | -1 |
Saves the church services. | private function saveServices(Request $request, Ministry $ministry)
{
if ($request->has('services')) {
DB::table('fg_daily_services')
->whereIn('id', $ministry->services()->pluck('id')->toArray())
->delete();
$services = array_map(function ($service) {
return array_merge($service, [
'id' => str_shuffle((string) Str::uuid()),
'ministry_id' => auth()->user()->id,
'created_at' => now(),
'updated_at' => now(),
]);
}, $request->services);
$ministry->services()->insert($services);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saving(Service $Service)\n {\n //code...\n }",
"function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$name]->initially_was_account) {\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }",
"public function saved(Service $Service)\n {\n //code...\n }",
"public function store()\n\t{\n\t\t//Creamos un nuevo servicio\n\t\t$service = new Service();\n\n\t\t//Colocamos el titulo, la descripcion corta, descción larga y si es premium\n\t\t$service->name = Input::get('name');\n\t\t$service->value = Input::get('value');\n\t\t$service->description = Input::get('description');\n\t\t$service->status = Input::get('status');\n\n\t\t//Guardamos y retornamos a la lista de servicios\n\t\t$service->save();\n\t\t\n\t\t//Redireccionamos\n\t\treturn Redirect::to('services');\n\t}",
"public function save()\n {\n $this->save_meta_value('_sim_service_price', $this->service_price);\n $this->save_meta_value('_sim_service_price_registered', $this->service_price_registered);\n $this->save_meta_value('_sim_service_hide_price', $this->service_hide_price);\n }",
"function saveService()\n {\n $this->dialogObject->save_object();\n $msgs = $this->dialogObject->check();\n if (count($msgs)) {\n foreach ($msgs as $msg) {\n msg_dialog::display(_(\"Error\"), $msg, ERROR_DIALOG);\n }\n } else {\n $this->plugins[$this->current] = $this->dialogObject;\n $tmp = get_object_vars($this->dialogObject);\n foreach ($tmp as $name => $value) {\n $this->plugins[$this->current]->$name = $value;\n }\n $this->closeDialogs();\n $this->backup = NULL;\n $this->updateActionMenu();\n }\n }",
"public function store()\n {\n $service = new Service;\n $service->name = Input::get('name');\n $service->icon = Input::get('icon');\n $service->description = Input::get('description');\n $service->long_desc = Input::get('long_desc');\n $service->img_detail = Input::get('img_detail');\n $service->save();\n\n return Redirect::to('/admin/services');\n }",
"public function store(Request $request)\n {\n //validate the user form data \n $request->validate([\n 'Title'=>'required', \n 'type'=>'required',\n 'date'=> 'required',\n 'venue'=> 'required',\n 'address'=>'required', \n 'preacher'=>'required',\n 'sermon_title'=>'required', \n 'bible_references'=>'required',\n 'givings'=> 'required',\n 'attendees'=> 'required',\n 'sermon_notes'=> 'required',\n 'first_timers'=>'required|nullable',\n ]);\n\n \n\n\n\n\n //inserting data into the database \n $services = new Service();\n $services->Title = $request->input('Title');\n $services->type = $request->input('type');\n $services->date = $request->input('date');\n\n $services->venue = $request->input('venue');\n $services->address = $request->input('address');\n\n $services->preacher = $request->input('preacher');\n \n $services->sermon_title = $request->input('sermon_title');\n \n $services->bible_references = $request->input('bible_references');\n \n $services->sermon_notes = $request->input('sermon_notes');\n $services->attendees = $request->input('attendees');\n $services->first_timers= $request->input('first_timers');\n $services->givings = $request->input('givings');\n \n \n \n\n \n $services->save();\n\n //redirecting to the user dashboard after creating a new service\n return redirect('/admin');\n }",
"public function save()\n {\n $this->save_meta_value('_sim_city_main_info', $this->city_main_info);\n\n $this->save_meta_value('_sim_city_shops', $this->city_shops);\n }",
"public function store()\n\t{\n//\t\t$validator = Validator::make($data = Input::all(), Subscription::$rules);\n\n//\t\tif ($validator->fails())\n//\t\t{\n//\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n//\t\t}\n//\t\tSubscription::create($data);\n\n $serviceId = Input::get('service_name');\n// $clientName = Client::findOrNew(null,['name' => Input::get('client_name')]);\n $clientName = Client::firstOrCreate(['name' => Input::get('client_name')]);\n if($clientName instanceof \\Illuminate\\Database\\Eloquent\\Model ){\n $clientName->save();\n $clientName->services()->sync([intval($serviceId+1) ]);\n $period = 0;\n switch(intval(Input::get('period'))){\n case 1:\n $period = Cb::now()->addMonth();\n break;\n case 6:\n $period = Cb::now()->addMonths(6);\n break;\n case 12:\n $period = Cb::now()->addMonths(12);\n break;\n\n }\n $clientName->services()->updateExistingPivot(intval($serviceId+1), [ 'expires_at' => $period ]);\n\n }\n return Redirect::route('subscriptions.index');\n\t}",
"public function store()\r\n\t{\r\n\t\t// validate\r\n\t\t// read more on validation at http://laravel.com/docs/validation\r\n\t\t$rules = array (\r\n\t\t\t'name' => 'required|unique:services,name',\r\n\t\t\t'estimated_days' => 'required|numeric|min:1'\r\n\t\t);\r\n\r\n\t\t$validator = Validator::make(Input::all(), $rules);\r\n\r\n\t\t//process\r\n\t\tif ($validator->fails()) {\r\n\t\t\treturn Redirect::to('services/create')\r\n\t\t\t\t->withErrors($validator)\r\n\t\t\t\t->withInput();\r\n\t\t} else {\r\n\t\t\t// store service\r\n\t\t\t$service = new Service();\r\n\t\t\t$service->name \t \t= Input::get('name');\r\n\t\t\t$service->estimated_days\t= Input::get('estimated_days');\r\n\t\t\t$service->organization_id = Auth::user()->organization_id;\r\n\t\t\t$service->is_active = 1;\r\n\t\t\t$service->database = Input::get('database');\r\n\t\t\t$service->tabel = Input::get('tabel');\r\n\t\t\t$service->save();\r\n\r\n\r\n\t\t\t// redirect\r\n\t\t\tSession::flash('message', 'Successfully created service');\r\n\t\t\treturn Redirect::to('services/'.$service->id);\r\n\t\t}\r\n\t}",
"public function run()\r\n {\r\n $services = App\\service::all();\r\n\r\n foreach ($services as $service)\r\n {\r\n $service->stylists()->save(\\App\\service::find(1));\r\n $service->stylists()->save(\\App\\service::find(2));\r\n $service->stylists()->save(\\App\\service::find(3));\r\n }\r\n\r\n }",
"public function save() \n {\n $oForwarding = oxNew('fcpoforwarding');\n $aForwardings = $this->_oFcpoHelper->fcpoGetRequestParameter(\"editval\");\n if(is_array($aForwardings) && count($aForwardings) > 0) {\n $oForwarding->fcpoUpdateForwardings($aForwardings);\n }\n }",
"public function store()\n {\n $this->form_validation->set_rules('typeacces', 'Type acces', 'required');\n $this->form_validation->set_rules('Identifiant', 'Identifiant', 'required');\n $this->form_validation->set_rules('motdepass', 'mot de passe', 'required');\n\n $serveurid = $this->input->post('serveur_id');\n if ($this->form_validation->run()) {\n $service = new stdClass();\n $service->name = $this->input->post('typeacces');\n $service->identifiant = $this->input->post('Identifiant');\n $service->password = $this->input->post('motdepass');\n $service->serveur_id = $this->input->post('serveur_id');\n $id = $this->Status_model->addservice($service);\n if ($id != null) {\n $this->session->set_flashdata('succus', 'Nouvel Service est bien enregistrer.');\n redirect('Status/show/' . $serveurid);\n }\n } else {\n $this->session->set_flashdata('error', 'Veuillez remplir tous les champs.');\n redirect('Status/create/' . $serveurid);\n }\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'city' => ['required',],\n 'sub_area' => ['required'],\n 'service_title' => ['required'],\n 'price' => ['required', 'regex:/^[0-9]+$/', 'numeric'],\n 'address' => ['required'],\n 'number' => ['required', 'regex:/^[0-9]+$/', 'digits_between:11,11', 'numeric'],\n 'description' => ['required']\n ]);\n $cable = new cable_provider_service;\n $cable->title = $request->get('service_title');\n $cable->price_month = $request->get('price');\n $cable->address = $request->get('address');\n $cable->phone_number = $request->get('number');\n $cable->city_id = $request->get('city');\n $cable->sub_area_id = $request->get('sub_area');\n $cable->favourite = 'no';\n $cable->verified = 'no';\n $cable->status = 'Avl';\n $cable->description = $request->input('description');\n $so = service_owner::where('user_id',Auth::user()->id)->first();\n $cable->service_provider_id =$so->id;\n $cable->save();\n return redirect('/my-services');\n }",
"public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, Service::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->service->create($input);\n\n\t\t\treturn Redirect::route('services.index');\n\t\t}\n\n\t\treturn Redirect::route('services.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}",
"public function saveServices(Services $service, $request)\n {\n $image = $request->has('banner') ? $request->file('banner') : null;\n $service->storeImage($image, ['width' => 230 , 'height' => 230]);\n $service->name = $request->input('name');\n $service->slug = str_slug($request->input('name'));\n $service->category_type_id = $request->input('category_type');\n $service->description = $request->input('description');\n $service->sequence = $service->sequence ?? Services::count() + 1;\n $service->save();\n return $service;\n }",
"public function store(CreatePatent_ServicesRequest $request)\n {\n $input = $request->all();\n\n $patentServices = $this->patentServicesRepository->createPost($request);\n\n Flash::success('Patent Services saved successfully.');\n\n return redirect(route('patentServices.index'));\n }",
"public function store(Request $request)\n {\n $place = new touristPlacesModel;\n $place->pl_name = $request->input('pl_name');\n $place->pl_details = $request->input('pl_details');\n $place->pl_address = $request->input('pl_address');\n $place->pl_phone_number = $request->input('pl_phone_number');\n $place->pl_latitude = $request->input('pl_latitude');\n $place->pl_longitude = $request->input('pl_longitude');\n $place->pl_status = \"Active\";\n $place->user_id = $request->input('user_id');\n $place->save();\n\n $lastPlaces = DB::table('vnt_tourist_places')->orderBy('id', 'desc')->first();\n $convert = (array)$lastPlaces;\n $id_place = $convert['id'];\n\n\n $vnt_services = new servicesModel;\n $vnt_services->sv_description = $request->input('sv_description');\n $vnt_services->sv_open = $request->input('sv_open');\n $vnt_services->sv_close = $request->input('sv_close');\n $vnt_services->sv_highest_price = $request->input('sv_highest_price');\n $vnt_services->sv_lowest_price = $request->input('sv_lowest_price');\n $vnt_services->sv_phone_number = $request->input('sv_phone_number');\n $vnt_services->sv_status = \"Active\";\n $vnt_services->sv_types = $request->input('sv_types');\n $vnt_services->tourist_places_id =$id_place;\n $vnt_services->save();\n $lastServices = DB::table('vnt_services')->orderBy('id', 'desc')->first();\n $convert = (array)$lastServices;\n $id_service = $convert['id'];\n $id_type = $convert['sv_types'];\n\n \n\n if($id_type == 1)\n {\n $vnt_eating = new eatingModel;\n $vnt_eating->eat_name = $request->input('eat_name');\n $vnt_eating->eat_status = \"Active\";\n $vnt_eating->service_id = $id_service;\n if($vnt_eating->save()){\n return json_encode(\"status:200\");\n }\n else\n {\n return json_encode(\"status:500\");\n }\n\n }\n else if($id_type == 2)\n {\n $vnt_hotels = new hotelsModel;\n $vnt_hotels->hotel_name = $request->input('hotel_name');\n $vnt_hotels->hotel_website = $request->input('hotel_website');\n $vnt_hotels->hotel_number_star = $request->input('hotel_number_star');\n $vnt_hotels->hotel_status = \"Active\";\n $vnt_hotels->service_id = $id_service;\n if($vnt_hotels->save()){\n return json_encode(\"status:200\");\n }\n else\n {\n return json_encode(\"status:500\");\n }\n }\n else if($id_type == 3)\n {\n $vnt_transport = new transportModel;\n $vnt_transport->transport_name = $request->input('transport_name');\n $vnt_transport->transport_status = \"Active\";\n $vnt_transport->service_id = $id_service;\n if($vnt_transport->save()){\n return json_encode(\"status:200\");\n }\n else\n {\n return json_encode(\"status:500\");\n }\n }\n else if($id_type == 4)\n {\n $vnt_sightseeing = new sightseeingModel;\n $vnt_sightseeing->sightseeing_name = $request->input('sightseeing_name');\n $vnt_sightseeing->sightseeing_status\t = \"Active\";\n $vnt_sightseeing->service_id = $id_service;\n if($vnt_sightseeing->save()){\n return json_encode(\"status:200\");\n }\n else\n {\n return json_encode(\"status:500\");\n }\n }\n else if($id_type == 5)\n {\n $vnt_entertainments = new sightseeingModel;\n $vnt_entertainments->entertainments_name = $request->input('entertainments_name');\n $vnt_entertainments->entertainments_status\t\t = \"Active\";\n $vnt_entertainments->service_id = $id_service;\n if($vnt_entertainments->save()){\n return json_encode(\"status:200\");\n }\n else\n {\n return json_encode(\"status:500\");\n }\n }\n\n\n }",
"public function store(ServicesFormRequest $request)\n {\n $service = new \\App\\Services();\n $service->title = $request->get('title');\n $service->summary = $request->get('summary');\n $service->description = $request->get('description');\n $service->price = $request->get('price');\n $service->display_order = $request->get('display_order');\n $service->is_active = $request->has('is_active') ? 1 : 0;\n $service->save();\n @$message .= 'Service added.<br/>';\n $fileprefix = 'service-';\n $filepath = 'pictures/';\n $filename = str_replace('tmp/', '', $request->input('tmp_img_path_main'));\n if (is_file('tmp/' . $filename)) {\n \\File::move('tmp/' . $filename, $filepath . $fileprefix . $filename);\n $service->image = $filepath . $fileprefix . $filename;\n $service->save();\n @$message .= 'Picture saved.<br/>';\n } //is_file('tmp/' . $filename)\n return redirect('admin/services/edit/' . $service->id)->withMessage($message);\n }",
"public function save()\n\t{\n\t\t$this->container->save($this);\n\t}",
"public final function save() {\n }",
"public function store()\n {\n $data=$this->validate(request(),[\n 'name'=>'required',\n 'description'=>'required',\n 'doctor_id'=>'required|exists:departments,id',\n 'department_id'=>'required|exists:departments,id',\n 'detection_price'=>'required',\n 'return_price'=>'required',\n\n ],[],[\n 'name'=> trans('admin.name'),\n 'description'=> trans('admin.description'),\n 'department_id'=> 'القسم',\n 'doctor_id'=> 'الدكتور',\n 'detection_price'=> 'سعر الكشف',\n 'return_price'=> 'سعر الاعادة',\n ]);\n Service::create($data);\n session()->flash('success',trans('admin.record_added'));\n return redirect(url('service'));\n }",
"public function save()\n\t{\n\t\tparent::save();\n\t\t\\IPS\\Widget::deleteCaches( 'donations', 'nexus' );\n\t\tstatic::recountCustomerFields();\n\t}",
"public function save(){\n\t\t// get posted data\n\t\t\n\t\n\t $datas = $_POST;\n\t\tunset($datas['save']);\t\n\t\t\n\t\t\n\t\t\t\t// insert into vendor\n\t\t$result = dbFactory::recordInsert($datas,VSERVICETYPE);\n\t\tif($result == 1){\n\t\t\t$this->flag = 1;\t\t// success\n\t\t\treturn message::setMsg(\"A New Service Type Added Successfully\");\n\t\t}else{\n\t\t\t$this->flag = 2;\t\t// fail\n\t\t\treturn message::setMsg(\"Service Type Creation Failed\",\"0\");\n\t\t}\n\t\t\n\t\t}",
"public function submitNewService()\n {\n $array = [\n 'serviceName' => request()->input('serviceName'),\n 'servicePrice' => request()->input('servicePrice'),\n 'serviceVisits' => request()->input('serviceVisits'),\n 'serviceDesc' => request()->input('serviceDesc'),\n 'serviceBenefit' => request()->input('serviceBenefit')\n ];\n\n DB::table('tbl_services')->insert([\n 'service_name'=>$array['serviceName'],\n 'service_price'=>$array['servicePrice'],\n 'service_visits'=>$array['serviceVisits'],\n 'service_desc'=>$array['serviceDesc'],\n 'service_benefit'=>$array['serviceBenefit']\n ]);\n return redirect('cms/1');\n }",
"protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}",
"protected function save()\n\t{\n\t\t\\XF::app()->session()->set('xenforoUpgradeService', [\n\t\t\t'cookieJar' => $this->getCookies(),\n\t\t\t'email' => $this->email,\n\t\t\t'password' => $this->password,\n\t\t\t'availableProducts' => $this->availableProducts,\n\t\t\t'availableVersions' => $this->availableVersions,\n\t\t\t'selectedLicense' => $this->selectedLicense,\n\t\t\t'selectedProduct' => $this->selectedProduct,\n\t\t\t'selectedVersion' => $this->selectedVersion\n\t\t]);\n\t}",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'code' => 'required|alpha_dash|unique:mst_service|string|max:255',\n 'name' => 'required|string|max:255',\n ]);\n\n DB::beginTransaction();\n try {\n $service = new Service;\n $service->code = strtoupper($request->input('code'));\n $service->name = ucwords($request->input('name'));\n if($request->input('type') != \"-1\"){\n $service->ship_id = $request->input('type');\n }\n $service->user_id = Auth::user()->id;\n $service->branch_id = Auth::user()->branch->id;\n $service->save();\n\n DB::commit();\n return redirect()->route('service.show',$service->id)->with('success', 'Success Created New Service!');\n } catch (\\Exception $e) {\n DB::rollback();\n return redirect()->route('service.create')->with('error', $e->getMessage());\n }\n }",
"public function store(Request $request)\n {\n $service = new Service($request->all());\n $service->doctor_id = session('user_id');\n $service->save();\n return redirect($this->module . '/' . $service->id . '/edit');\n }",
"public final function save()\n {\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'name' => ['required', 'string', 'max:255'],\n \n ]);\n \n \n $request['services'] = collect($request['services'])->implode(\",\");\n \n Client::create($request->all());\n \n \n \n return redirect()->route('clients.index')\n ->with('success','order created successfully.');\n }",
"public function store(Request $request)\n {\n //\n $services = new Services;\n $kind = $request->kind;\n $services->service = $request->service;\n $services->kind = $kind;\n $services->price = $request->price;\n $services->unit = $request->unit;\n $services->save();\n return redirect('admin/services?kind='.$kind);\n }",
"public function store(Request $request)\n {\n $service = new Services();\n\t\t$service->name = $request->input('name');\n\t\t$service->subname = $request->input('subname');\n\t\t$service->description = $request->input('description');\n\t\t$service->price = $request->input('price');\n\t\t$service->disponibility = $request->input('disponibility');\n\t\t$service->image = $request->input('image');\n\t\t$service->save();\n }",
"public function store()\n\t{\n \n\t\t$sservicio = new Sservicio();\n\t\t$sservicio->marca_id = Input::get('marca_id');\n\t\t$sservicio->nombre = Str::title(Str::lower(Input::get('nombre')));\n\t\t$sservicio->save();\n\t\treturn Redirect::to('/sservicios')\n\t\t->with('alert-success', 'Se ha agregado el sservicio.');\n\t\t\n\t}",
"public function store(Request $request) {\n\t\t$workDateArr = explode(' ',$request->input('work_date'));\n\t\t$work_date = date('Y-m-d', strtotime($workDateArr[1].' '.$workDateArr[2].' '.$workDateArr[3]));\n\t\t\n\t\t$service = new JobsList;\n $service->address_2 = $request->input('address_2');\n $service->address_1 = $request->input('address_1');\n $service->city = $request->input('city');\n $service->state = $request->input('state');\n\t\t$service->zip = $request->input('zip');\n\t\t$service->billto = $request->input('billto');\n\t\t$service->orders = $request->input('orders');\n\t\t$service->service_id = $request->input('service_id');\n\t\t$service->technician_id = $request->input('technician_id');\n\t\t$service->service_description = $request->input('service_description');\n\t\t$service->detail = $request->input('detail');\n\t\t$service->work_date = $work_date;\n\t\t$service->time_range = $request->input('time_range');\n\t\t$service->order_time = $request->input('order_time');\n\t\t$service->order_instruction = $request->input('order_instruction');\n\t\t$service->service_instructions = $request->input('service_instructions');\n $service->save();\n\t\techo json_encode($service);\n //return 'Service record successfully created with id ' . $service->id;\n }",
"public function run()\n {\n\n $services = [\n 'Wi-fi',\n 'Posto macchina',\n 'Piscina',\n 'Animali',\n 'Vista mare',\n 'Sauna',\n 'Portineria',\n 'Cucina',\n 'Possibilità di fumare',\n 'Ascensore',\n 'Cassaforte',\n 'Tv',\n 'Aria condizionata',\n 'Kit di pronto-soccorso',\n 'Lavatrice'\n\n ];\n\n foreach ($services as $service) {\n \n $new_service = new Service();\n\n $new_service->name = $service;\n\n $new_service->save();\n\n }\n }",
"public function store(ServiceRequest $request)\n {\n $price = str_replace(',', '', $request->input('price'));\n $request->merge(['price' => $price]);\n $service = Service::create($request->all());\n foreach ($request->input('sections') as $section) {\n $service->sections()->create([\n 'title' => $section['title'],\n 'content' => $section['content']\n ]);\n }\n session()->flash('flash_message', 'Se ha agregado el servicio: '.$service->title);\n return redirect('servicios');\n }",
"public function save ()\n {\n $this->objMysql->_insert (\"calendar.calendar_holidays\", [\n \"CALENDAR_UID\" => $this->calendar_uid,\n \"CALENDAR_HOLIDAY_NAME\" => $this->calendar_holiday_name,\n \"CALENDAR_HOLIDAY_START\" => $this->calendar_holiday_start,\n \"CALENDAR_HOLIDAY_END\" => $this->calendar_holiday_end\n ]\n );\n }",
"public function save_service_info($data){\r\n $query = \"INSERT INTO tbl_aboutus_service (service_icon, service_title, service_desc, publication_status)\"\r\n . \"VALUES('$data[service_icon]', '$data[service_title]', '$data[service_desc]', '$data[publication_status]')\";\r\n\r\n if (mysqli_query($this->db_connect, $query)) {\r\n $message = \"Service Information Save Successfully!\";\r\n return $message;\r\n\r\n } else {\r\n die(\"Query Problem! \" . mysqli_error($this->db_connect));\r\n }\r\n }",
"public function store(ServiceCreateRequest $request)\n {\n Service::create([\n 'name' => $request->name,\n 'image' => $request->image ? $request->file('image')->store('public') : \"public/no_image.png\",\n 'service_type' => $request->service_type,\n 'client' => $request->idClient,\n 'start_date' => $request->start_date,\n 'end_date' => $request->end_date,\n 'observations' => $request->observations\n ]);\n return redirect()->route('client.show', ['id' => $request->idClient])->with('success', 'Servicio creado correctamente');\n }",
"public function save()\n\t{\n\t\t$this->webservice()->setRequestPath('/' . $this->getPath() . '/' . $this->getItemId() . '.ws');\n\t\t$this->webservice()->setRequestMethod('put');\n\t\t\n\t\t$this->webservice()->setPostData(json_encode($this->getJson()));\n\t\treturn $this->makeRequestReturnResult();\n\t}",
"public function store(ServiceRequest $request)\n {\n // generar cotizacion\n $getServices = Service::orderBy('id', 'desc') -> first();\n \n if (isset($getServices -> id)) {\n $service_id_serial = $getServices -> id + 1;\n } else {\n $service_id_serial = 1;\n }\n $folio = str_pad($service_id_serial, 6, \"0\", STR_PAD_LEFT);\n $nombre_unico = substr(md5(time().$folio),0,5);\n\n $service = new Service($request->except('_token'));\n $service->folio = $nombre_unico;\n $service->save();\n\n return redirect(route('service.index'));\n }",
"public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $holiday = Holidays::findFirstByid($id);\n\n if (!$holiday) {\n $this->flash->error(\"holiday does not exist \" . $id);\n\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $holiday->date = $this->request->getPost(\"date\");\n $holiday->name = $this->request->getPost(\"name\");\n \n\n if (!$holiday->save()) {\n\n foreach ($holiday->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'edit',\n 'params' => [$holiday->id]\n ]);\n\n return;\n }\n\n $this->flash->success(\"Запись успешно изменена\");\n\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'index'\n ]);\n }",
"public function store(CreateServiciosCrmsXLandingRequest $request)\n {\n \t$landing = Landing::find($request['landing_id']);\n\n\t // Se eliminan los campos y los servicios actuales\n\t foreach ( $landing->landingsCamposServicios as $campo ) {\n\t\t\t$campo->delete();\n\t }\n\n\t foreach ( $landing->serviciosCrmsXLandings as $servicioXLanding ) {\n\t\t\t$servicioXLanding->delete();\n\t }\n\n\t if (!isset($request['eliminar'])) {\n\n\t\t $request['estado'] = true;\n\t\t $input = $request->all();\n\t\t $servicioCrmXLanding = $this->serviciosCrmsXLandingRepository->create($input);\n\n\t\t $campos = CampoServicioCrm::where('servicio_crm_id', $request['servicios_crm_id'])->get();\n\n\t\t foreach ($campos as $campo) {\n\t\t\t $asociacion = new LandingsCamposServicio();\n\t\t\t $asociacion->campos_servicios_crm_id = $campo->id;\n\t\t\t $asociacion->landing_id = $request['landing_id'];\n\t\t\t $asociacion->estado = true;\n\t\t\t if (isset($request[$campo->nombre])) {\n\t\t\t\t $asociacion->campo_formulario = $request[$campo->nombre];\n\t\t\t }\n\t\t\t $asociacion->save();\n\t\t }\n\n\t\t Flash::success('Configuracion guardada con exito');\n\n\t\t return redirect(route('admin.landings.index'));\n\t } else {\n\t\t Flash::success('Configuracion eliminada con exito');\n\n\t\t return redirect(route('admin.landings.index'));\n\t }\n }",
"public function run()\n {\n $service = Service::create([\n 'description' => 'نحن موجودون في قلب كوالالمبور بالقرب من مجمع التسوق Ampang Point مع راحة البنوك التجارية ومكتب البريد. متاجر الكتب والسوبر ماركت والمقاهي والمطاعم على مرمى حجر.',\n ]);\n\n $school = School::findOrFail(1);\n $service->school()->associate($school);\n $service->save();\n }",
"public function store(Request $request)\n {\n //\n $this->validate($request, [\n 'code' => 'required|max:10',\n 'name' => 'required|max:30',\n 'cost' => ['required', 'regex:/^\\d{1,10}((,|.)\\d{2})?$/'],\n 'finposition' => 'required|numeric',\n ]);\n\n $service = new Service([\n 'code' => $request->code,\n 'name' => $request->name,\n 'cost' => $this->replCommas($request->cost),\n ]);\n\n $service->finposition()->associate($request->finposition);\n\n $service->save();\n\n return 0;\n }",
"public function store() {\n \n $insert = $this->model->create($this->request->all());\n if ($insert) {\n \n if ($this->request->has('zones')) {\n $zones = $this->request['zones'];\n for ($i = 0; $i < count($zones); $i++) {\n $newz = new Shipmentzone();\n $newz->shipment_id = $insert->id;\n $newz->zone_id = $zones[$i];\n $newz->save();\n }\n }\n \\Session::flash('flash_message', 'shipments method added successfully added.'); //<--FLASH MESSAGE\n \n return redirect('admin/shipments');\n\n } else {\n \\Session::flash('flash_message', 'shipments method not complete, Try agin later '); //<--FLASH MESSAGE\n return redirect('admin/shipments');\n }\n }",
"public function store(Request $request)\n {\n $services=new Services;\n $services = Services::findOrNew($request->service_id);\n\n $services->service_name=$request->servicename;\n $services->sort_index=$request->sortIndex;\n $services->service_passenger_count=$request->numberOfPassengers;\n $services->service_luggage_count=$request->numberOfLuggages;\n $services->service_discription=$request->equivalent;\n $services->service_category=$request->bookingDotComCategory;\n \n\n if($request->serviceimg){\n $file = $request->file('serviceimg');\n $input['serviceimg'] = $file->getClientOriginalName();\n $file->move(public_path('images/fleet/service'),$file->getClientOriginalName());\n $services->service_photo=$input['serviceimg'];\n }\n $servicessave=$services->save();\n if($servicessave == 1) {\n $success = true;\n $message = \"Service Data Saved Successfully\";\n } else {\n $success = false;\n $message = \"Data not Saved Successfully\";\n }\n return response()->json([\n 'success' => $success,\n 'message' => $message,\n ]);\n }",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"public function store()\n {\n $this->preStoreActions($this->data);\n\n //check all the fields\n $this->validate();\n\n //save to the database\n $this->save();\n\n //do broadcast\n //$this->broadcastUpdate(\"Updated Menu for - \".Str::limit($this->accountName,50));\n\n //tidy up\n $this->afterStore($this->data['id'] ?? '');\n\n //run a user specific method IF installed and needed after save\n $this->afterStoreActions($this->data);\n }",
"public function save()\n {\n // Save each initialised region\n foreach ($this->regions as $key => $region) {\n $region->save();\n unset($this->regions[$key]);\n }\n }",
"function save_MB_eight_service($POST_ID){\n\tif ( ! isset( $_POST['MB_eight_service_nonce'] ) )\n\t\treturn $POST_ID;\n\n\t$nonce = $_POST['MB_eight_service_nonce'];\n\n\t// Verify that the nonce is valid.\n\tif ( !wp_verify_nonce( $nonce, 'MB_eight_service_nonce' ) )\n\t\treturn $POST_ID;\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 $POST_ID;\n\n\t// Check the user's permissions.\n\tif(!current_user_can('edit_post', $POST_ID))\n\t\treturn $POST_ID;\n\n\n\t$old = get_post_meta($POST_ID, 'repeat_eight_services', true);\n\t$new = array();\n\n\t$numb_eight_services = $_POST['numb_eight_service'];\n\t$name_eight_services = $_POST['name_eight_service'];\n\t$price_eight_services = $_POST['price_eight_service'];\n\n\t$count = count( $numb_eight_services );\n\n\tfor($i = 0; $i < $count; $i++) {\n\t\tif($numb_eight_services[$i] != '') :\n\t\t\t$new[$i]['numb_eight_service'] = stripslashes( strip_tags( $numb_eight_services[$i]));\n\n\t\tif($name_eight_services[$i] == '')\n\t\t\t$new[$i]['name_eight_service'] = '';\n\t\telse\n\t\t\t$new[$i]['name_eight_service'] = stripslashes( $name_eight_services[$i]); // and however you want to sanitize\n\n\t\tif($price_eight_services[$i] == '')\n\t\t\t$new[$i]['price_eight_service'] = '';\n\t\telse\n\t\t\t\t$new[$i]['price_eight_service'] = stripslashes( $price_eight_services[$i]); // and however you want to sanitize\n\t\tendif;\n\t}\n\n\n\t// Title : titre_eight service\n\tif(isset($_POST['titre_eight_service'])){\n update_post_meta($POST_ID, 'titre_eight_service', $_POST['titre_eight_service']);\n }\n\n\t// Radio : affiche_eight_servie\n\tif(isset($_POST['display_eight_service'])){\n\t update_post_meta($POST_ID, 'display_eight_service', $_POST['display_eight_service']);\n\t}\n\n\t// repeatable : repeat_eight_service\n\tif(!empty($new) && $new != $old)\n\t\tupdate_post_meta($POST_ID, 'repeat_eight_services', $new);\n\telseif(empty($new) && $old)\n\t\tdelete_post_meta( $POST_ID, 'repeat_eight_services', $old);\n\n}",
"public function store()\n {\n $this->contractForm->validate(Input::all());\n\n $this->execute(\n new CreateContractCommand(Input::only($this->contractForm->fields))\n );\n\n return Redirect::to('contracts');\n }",
"public function store()\n\t{\n\t\t$input = Input::all();\n $projection = Projection::find($input['projection']);\n\n Auth::user()->participant->assignProjection($projection, $input['places']);\n $projection->bookPlaces($input['places']);\n return Redirect::route('profile')->with('flash_message', 'Vos places de projection ont bien été réservée. Merci!');\n\t}",
"function save()\n\t{\n\t\t$this->store() ;\n\t\t$link = 'index.php?option=com_arts_curriculum';\n\t\t$this->setRedirect( $link, $this->msg);\n\t}",
"public function store(Request $request)\r\n {\r\n \r\n $service = Service::create([\r\n 'name' => $request->input('name'),\r\n 'description' => $request->input('description'),\r\n 'parent_id' => $request->input('parent_id'),\r\n 'status' => $request->input('status'),\r\n ]);\r\n\r\n\r\n if($service){\r\n if ( isset( $request['image'] ) ) {\r\n try {\r\n $media = new Media();\r\n $media->upload( $service, $request['image'], '/uploads/service/' );\r\n } catch (Exception $e) {\r\n\r\n return $e;\r\n }\r\n }\r\n\r\n\r\n\r\n if ( isset( $request['locations'] ) ) {\r\n $location_titles = $request['locations']['location'];\r\n\r\n $locationsKeys = array_keys($location_titles);\r\n\r\n // Create specification\r\n foreach ($locationsKeys as $location) {\r\n $service->locations()->create([\r\n 'service_id' => $service->id,\r\n 'location' => $location_titles[$location],\r\n ]);\r\n }\r\n }\r\n\r\n if ( isset( $request['times'] ) ) {\r\n $time_titles = $request['times']['time'];\r\n\r\n $timesKeys = array_keys($time_titles);\r\n\r\n // Create specification\r\n foreach ($timesKeys as $time) {\r\n $service->times()->create([\r\n 'service_id' => $service->id,\r\n 'time' => $time_titles[$time],\r\n ]);\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n return redirect()->back()\r\n ->with('success' , 'Service created successfully');\r\n }\r\n\r\n return back()->withInput()->with('errors', 'Error creating new Service');\r\n }",
"function service_save_postdata( $post_id ) {\r\n\r\n // verify if this is an auto save routine. \r\n // If it is our form has not been submitted, so we dont want to do anything\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \r\n return;\r\n\r\n // verify this came from the our screen and with proper authorization,\r\n // because save_post can be triggered at other times\r\n if ( ( isset ( $_POST['service_contact_noncename'] ) ) && ( ! wp_verify_nonce( $_POST['service_contact_noncename'], plugin_basename( __FILE__ ) ) ) )\r\n return;\r\n\r\n // Check permissions\r\n if ( ( isset ( $_POST['post_type'] ) ) && ( 'page' == $_POST['post_type'] ) ) {\r\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\r\n return;\r\n } \r\n }\r\n else {\r\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\r\n return;\r\n }\r\n }\r\n update_post_meta( $post_id, 'service_content_home', $_POST['service_content_home'] );\r\n update_post_meta( $post_id, 'service_page_inquiries', $_POST['service_page_inquiries'] );\r\n update_post_meta( $post_id, 'service_page_contact', $_POST['service_page_contact'] );\r\n update_post_meta( $post_id, 'service_page_link', $_POST['service_page_link'] );\r\n}",
"public function saveAction() {\n $request = $this->getRequest();\n if($request->isPost()) {\n $params = $request->getPost();\n if(!array_key_exists('company_id', $params)) {\n Default_Model_Company::create($params);\n } else {\n Default_Model_Company::update($params);\n }\n }\n \n $this->_redirect($this->view->actions['index']);\n }",
"public function save()\n {\n }",
"public function save()\n {\n $this->variableApi->set('ZikulaRoutesModule', 'routeEntriesPerPage', $this->getRouteEntriesPerPage());\n }",
"public function store(ServicosRequest $request)\n {\n $novo_servico = $request->all();\n Servico::create($novo_servico);\n\n return redirect('servicos');\n }",
"public function saveWebservice() {\n\n $registry = Zend_Registry::getInstance();\n $em = $registry->entitymanager;\n $data = $this->getRequest()->getParams();\n\n if(isset($data['webserviceId']) && $data['webserviceId'] > 0) {\n $serviceObj = $em->find('TWebservice',$data['webserviceId']);\n $serviceObj->setWebserviceId($data['webserviceId']);\n } else {\n $serviceObj = new TWebservice();\n }\n\n $serviceObj->setWebserviceName($data['WB_Name']);\n $serviceObj->setWebserviceUrl($data['WB_Url']);\n\n $Client = $em->find('TClient', $data['clientId']);\n\n $serviceObj->setClientId($Client);\n $em->persist($serviceObj);\n $em->flush();\n\n return true;\n }",
"public function store(Request $request)\n {\n $this->validator($request->all())->validate();\n $newFileName=$this->manageImageFile(request('img'),'portfolio');\n\n $services;\n if(strpos(request('service_id'), ',')){\n $services = explode(\",\", request('service_id'));\n }\n else{\n $services=request('service_id');\n }\n\n $portfolio=new Portfolio();\n $portfolio->img=$newFileName;\n $portfolio->empresa_solicitante=request('empresa_solicitante');\n $portfolio->project_name=request('project_name');\n $portfolio->description=request('description');\n $portfolio->service_id=request('service_id');\n $portfolio->save();\n\n\n if(is_array($services)){\n foreach($services as $servic){\n $existService=$this->getServiceIf($servic);\n\n $portfolio->services()->attach($existService->id);\n }\n }\n else{\n $existService=$this->getServiceIf($services);\n $portfolio->services()->attach($existService->id);\n }\n\n $portToAdd=$this->getPortfolio($portfolio->id);\n return $portToAdd;\n }",
"function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'service_name' => 'required',\n 'address' => 'required',\n 'type' => 'required',\n ], [\n 'service_name.required' => 'Título es requerido',\n 'address.required' => 'Dirección es requerida',\n 'type.required' => 'Tipo es requerida',\n ]);\n\n\n $service = new Service();\n $service->service_name = $request->get('service_name');\n $service->address = $request->get('address');\n $service->telephone = $request->get('telephone');\n $service->type = $request->get(\"type\");\n $service->save();\n\n return response() -> json([\n \"success\" => true,\n \"services\" => $service\n ], 200);\n }",
"public function store()\n\t{\n\t\t$n=new Webservice;\n\t\t$n->name=Input::get('name');\n\t\t$n->url=Input::get('url');\n\t\t$n->description=Input::get('description');\n\t\t$n->save();\n\t\treturn 'success';\n\t}",
"public function store(AccountClientFormRequest $request)\n {\n $input = $request->input();\n $input['city_area'] = $request->input('city_area_new');\n\n $account = new AccountClient;\n $account->setAttribute('active', 0);\n $account->save($input);\n flash('Client Created!');\n return redirect('/cabinet/account-client');\n }",
"public function store()\n\t{\n\t\t$travelPlan = new Travelplan;\n\n\t\t$travelPlan->agency_id = Input::get(\"agency_id\");\n\t\t$travelPlan->location_id = Input::get(\"location_id\");\n\t\t$travelPlan->destination_id = Input::get(\"destination_id\");\n\t\t$travelPlan->price = Input::get(\"price\");\n\n\t\t$pickup_date = Input::get(\"pickup_date\");\n\t\t$travel_date = Carbon::parse($pickup_date);\n\t\t$date_formatted = $travel_date->toFormattedDateString();\n\t\t$travel_date = $travel_date->toDateString();\n\t\t$travelPlan->pickup_date = $travel_date;\n\t\t\n\t\t\n\n\t\t$travelPlan->pickup_time = Input::get(\"pickup_time\");\n\t\t$travelPlan->pickup_location = Input::get(\"pickup_location\");\n\t\t$travelPlan->dropoff_location = Input::get(\"dropoff_location\");\n\n\t\tif($travelPlan->save())\n\t\t{\n\t\t\t// Store the activity\n\t\t\t$activity = new Activity;\n\t\t\t$activity->type = \" Add New Travel Plan \";\n\t\t\t$activity->details = \"Travel Plan From \".$travelPlan->location_id.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" To \".$travelPlan->destination_id.\" By Agency \".$travelPlan->agency_id.\" Added \";\n\t\t\t$activity->activity_by = Auth::user()->fullName;\n\t\t\t$activity->save();\n\n\t\t\treturn Redirect::to(\"/admin/travelplan\");\n\t\t}\n\n\t}",
"public function store()\n {\n $this->validate();\n\n $cliente = Cliente::create([\n 'sexo_id' => $this->sexo_id,\n 'cedula' => $this->cedula,\n 'nombre_primero' => $this->nombre_primero,\n 'nombre_segundo' => $this->nombre_segundo,\n 'apellido_paterno' => $this->apellido_paterno,\n 'apellido_materno' => $this->apellido_materno,\n 'direccion' => $this->direccion,\n 'correo' => $this->correo,\n 'telefono' => $this->telefono,\n 'fecha_nacimiento' => $this->fecha_nacimiento,\n 'deuda' => $this->deuda,\n ]);\n\n $this->resetInput();\n $this->accion = 1;\n }",
"public function store(Request $request, Service $service)\n {\n $validatedData = request()->validate([\n 'sub_heading1' => 'required',\n 'sub_heading2' => 'required',\n 'content1' => 'required',\n 'content2' => 'required',\n\n ]);\n $service = new Service();\n $service->sub_heading1 = request('sub_heading1');\n $service->content1 = request('content1');\n $service->sub_heading2 = request('sub_heading2');\n $service->content2 = request('content2');\n $service->save();\n return redirect('/services');\n }",
"public function save()\n {\n Session::clear(\"Checkout.PostageID\");\n \n // Extend our save operation\n $this->extend(\"onBeforeSave\");\n\n // Save cart items\n Session::set(\n \"Checkout.ShoppingCart.Items\",\n serialize($this->items)\n );\n\n // Save cart discounts\n Session::set(\n \"Checkout.ShoppingCart.Discount\",\n serialize($this->discount)\n );\n\n // Update available postage\n if ($data = Session::get(\"Form.Form_PostageForm.data\")) {\n $country = $data[\"Country\"];\n $code = $data[\"ZipCode\"];\n $this->setAvailablePostage($country, $code);\n }\n }",
"public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Holiday::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tHoliday::createHoliday($data);\n\n\t\treturn Redirect::route('holidays.index');\n\t}",
"public function store(CreateServiceRequest $request)\n {\n $service = new Service;\n $service->title = $request->title;\n $service->price = $request->price;\n $service->save();\n return redirect('/services');\n }",
"public function save()\n {\n $ins = $this->valores();\n unset($ins[\"idInscription\"]);\n\n $ins['idUser'] = $this->userO->idUser;\n unset($ins[\"userO\"]);\n\n $ins['idProject'] = $this->project->idProject;\n unset($ins[\"project\"]);\n\n if (empty($this->idInscription)) {\n $this->insert($ins);\n $this->idInscription = self::$conn->lastInsertId();\n } else {\n $this->update($this->idInscription, $ins);\n }\n }",
"public function save()\r\n {\r\n \r\n }",
"public function store()\n\t{\n\t\t$this->Model_siswa->store();\n\t}",
"public function store()\n\t{\n\t\t$reserva = new Reserva;\n\t\t$reserva->persona_id = Input::get('persona_id');\n\t\t$reserva->puesto_id = Input::get('puesto_id');\n\t\t$reserva->start_date = Input::get('start_date');\n\t\t$reserva->end_date = Input::get('end_date');\n\t\t$reserva->save();\n\t}",
"public function saveServiceCommissions(Request $request) {\n try {\n if (RequestFacade::ajax()) {\n $response = UserServiceProvider::saveServiceCommissions($request->all());\n return $response;\n }\n abort(404);\n\n } catch (Exception $e) {\n Log::error(__CLASS__ . \"::\" . __METHOD__ . ' ' . $e->getFile() . $e->getLine() . $e->getMessage());\n return Redirect::back();\n }\n }",
"public function store(Request $request)\n {\n \n \n $this->validate($request,[\n 'title' => 'required',\n 'body' => 'required',\n ]);\n\n $project = new project;\n\n $project->title = $request->title;\n\n $project->body = $request->body;\n\n $project->status = $request->status;\n\n $project->save();\n\n $project->clients()->sync($request->clients);\n\n $project->services()->sync($request->services);\n\n\n\n\n return redirect(route('project.index'));\n }",
"public function add_service() {\r\n if (USER_ROLE == ROLE_ONE) {\r\n $result['companies'] = $this->company_model->get_companies_id_name();\r\n $this->load->view('webpages/add_service', $result);\r\n } else {\r\n $this->load->view('webpages/404');\r\n }\r\n }",
"public function save_car_services(){\n echo '<pre>';\n /* Setting rules for part exchange form */\n $this->form_validation->set_rules('form_type', 'Form Type', 'required');\n $this->form_validation->set_rules('reg_num', 'Registration Number', 'required');\n $this->form_validation->set_rules('make_of_car', 'Make Of Car', 'required');\n $this->form_validation->set_rules('model', 'Model', 'required');\n $this->form_validation->set_rules('year', 'Year', 'required');\n $this->form_validation->set_rules('name', 'Name', 'required');\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('phone', 'phone', 'required');\n \n /* Service options are Required*/\n if($this->input->post('form_type') == 'servicing'){\n $this->form_validation->set_rules('want_service[]', 'Atleast One Service', 'required');\n }elseif($this->input->post('form_type') == 'cardignose'){\n $this->form_validation->set_rules('daignose_opt[]', 'Atleast One Option', 'required');\n }\n \n /* Run validation*/\n if($this->form_validation->run() != FALSE){\n \n $data = array(\n 'form_type' => $this->input->post('form_type'),\n 'reg_no' => $this->input->post('reg_num'),\n 'make_of_car' => $this->input->post('make_of_car'),\n 'model' => $this->input->post('model'),\n 'year' => $this->input->post('year'),\n 'mileage' => $this->input->post('mileage'),\n 'name' => $this->input->post('name'),\n 'email' => $this->input->post('email'),\n 'phone' => $this->input->post('phone'),\n );\n \n $cr_id = $this->form_model->save_car_service($data);\n /*If inserted last value exists*/\n if($cr_id){\n /*check form type*/\n if($this->input->post('form_type') == 'servicing'){\n $services = $this->input->post('want_service');\n }elseif($this->input->post('form_type') == 'cardignose'){\n $services = $this->input->post('daignose_opt');\n }\n \n if(isset($services)){\n $c = count($services);\n $form_img = array();\n for($i=0; $i<$c; $i++){\n $form_services[$i]['service'] = $services[$i]; \n $form_services[$i]['car_ser_id'] = $cr_id; \n $form_services[$i]['form_type'] = $this->input->post('form_type'); \n }\n print_r($form_services);\n $flag = $this->form_model->save_car_ser($form_services);\n if(!$flag){\n $msg = 'Some Error Occured Please Try Again';\n $this->session->set_flashdata('error', $msg);\n redirect($_SERVER['HTTP_REFERER']);\n }\n }\n }\n }else{\n /*If Validation is not successful*/\n $err = validation_errors('<div style=\"color: #fff;\">', '</div>');\n $this->session->set_flashdata('error', $err);\n redirect($_SERVER['HTTP_REFERER']);\n }\n $msg = \"Thanks for your book service with us our member of staff will contact you with in 24 hour or call us for immediate booking.\";\n $this->session->set_flashdata('success', $msg);\n redirect('thankyou');\n}",
"public function store(Request $request)\n {\n $request->validate([\n 'serviceType' => 'required','integer',\n 'serviceName' => 'required','regex:/^[a-zA-ZñÑ\\s]+$/',\n ]);\n\n if($request->serviceType == 1)\n {\n ServiceMaintenances::create([\n 'serviceId' => $request->serviceType,\n 'docType' => $request->serviceName\n ]);\n }\n else\n {\n ServiceMaintenances::create([\n 'serviceId' => $request->serviceType,\n 'complainType' => $request->serviceName\n ]);\n }\n\n // ServiceMaintenances::create([\n // 'serviceId' => $request->serviceType,\n // 'docType' => $request->serviceName\n // ]);\n\n return redirect('/services')->with('success', 'Service added!');\n }",
"public function store(RequestsServicioFormRequest $request)\n {\n $servicio = new Servicio;\n $servicio->nombre=$request->get('nombre');\n $servicio->descripcion=$request->get('descripcion');\n $servicio->precio=$request->get('precio');\n $servicio->estado='1';\n $servicio->usuario='1';\n\n $servicio->save();\n\n return Redirect::to('servicio');\n\n }",
"public function store(Request $request, TrafficServiceInterface $traffic_service)\n { \n \tif( null!== $traffic_service->create( $request->all() ) )\n \t{\n \t\treturn redirect('/traffic-manage')->withSuccess('Traffic Generation successfully created');\n \t}\n \treturn redirect()->back()->withError('Please check your data and try again!');\n }",
"public function store(StoreCivilServantRequest $request)\n {\n $this->civil_servants->create([\n 'data' => $request->except('_token','_method'),\n ]);\n\n return redirect()->route('admin.civil_servant.index')->withFlashSuccess(trans('alerts.backend.civil_servants.created'));\n }",
"public function saveSettings()\n {\n $this->store->save($this->data);\n }",
"public function save()\n {\n // For V2.0\n }",
"public function run()\n {\n DB::table('services')->delete();\n $data = [\n \t['title'=>'STRUCTURAL ENGINEERING','slug'=>str_slug('structural engineering'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n \t['title'=>'MECHANICAL HVAC','slug'=>str_slug('mechanical hvac'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n \t['title'=>'ELECTRICAL','slug'=>str_slug('electrical'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n ['title'=>'PLUMBING ENGINEERING','slug'=>str_slug('plumbing engineering'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n ['title'=>'POOL ENGINEERING','slug'=>str_slug('pool engineering'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n ['title'=>'ARTITECTURAL DESIGN & DRAFTING','slug'=>str_slug('architectural design and drafting'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n\n \n \t];\n \\App\\Models\\Service::insert($data);\n }",
"public function store(ShippingCompanyRequest $request)\n {\n $data = $request->except(['country_id', '_token']);\n $shipping_company = $this->shipping_company->create($data);\n $shipping_company->countries()->attach($request->country_id);\n return redirect()->route('admin.shipping_companies.index')->with('success', 'تم أضافة شركة الشحن بنجاح');\n\n }",
"public function store(CreateServiceRequest $request)\n {\n\n DB::beginTransaction();\n try{\n\n $this->saveServices(new Services(), $request);\n DB::commit();\n\n return redirect()->route('services.index')->with('status', 'Created Successfully');\n\n } catch(Exception $e) {\n DB::rollBack();\n Log::error($e->getMessage());\n return response(['status' => \"Can't Store Data\"], 500);\n }\n\n }",
"public function store()\n\t{\t\t\t\n\t\t$redirectTo = Input::get('redirectTo');\n\n $adresse = $this->adresse->create(\n Input::all()\n );\n\n if(!empty($redirectTo))\n {\n return Redirect::to('admin/'.$redirectTo)->with( array('status' => 'success' , 'message' => 'Adresse crée') );\n }\n\n return Redirect::to('admin/adresses/'.$adresse->id)->with( array('status' => 'success' , 'message' => 'Adresse crée') );\n\n\t}",
"private function savePermissions(): void\n {\n $this->client->isPayor = $this->isPayor;\n $this->client->isAgencyBankAccountSetup = $this->isAgencyBankAccountSetup;\n $this->client->canViewDocumentation = $this->canViewDocumentation;\n }",
"public function save() {\n }",
"public function save() {\n }",
"public function store(ServiceRequest $request)\n {\n $service = new Service();\n\n $service->name = $request->input(\"name\");\n $service->price = (float)$request->input(\"price\");\n $service->icon_class_name = $request->input(\"iconClassName\");\n $service->description = $request->input(\"description\");\n\n try {\n $service->save();\n $this->log(\"Admin successfully added service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"insertServiceSuccess\",\"Successfully adding service!\");\n }catch (\\Exception $e){\n \\Log::error($e->getMessage());\n $this->log(\"Error on admin adding service\",$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"insertServiceError\" , \"Server error on adding service, try again later.\")->withInput();\n }\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"public function store(Request $request)\n {\n $service = new Services;\n $tags= $request->input('service_tag');\n $service->title = $request->input('title');\n $service->sub_title = $request->input('sub_title');\n $description = $request->input('description');\n $service->description = $description;\n $service->price = $request->input('price');\n $name = Str::slug($request->input('title'));\n $service_exist = services::where('slug', $name)->first();\n if ($service_exist) {\n $last_record = services::find(\\DB::table('services')->max('id'));\n $incremented_id = $last_record->id + 1;\n $slug = $name . '-' . $incremented_id;\n } else {\n $slug = $name;\n }\n $service->slug = $slug;\n\n $service->image = $request->input('service_image');\n \n \n $service->save();\n foreach($tags as $tag){\n \n $servicetag = new Servicetags;\n $servicetag->service_id= $service->id;\n $servicetag->name=$tag;\n $servicetag->save();\n\n }\n return redirect()->route('services.index')->with('success', 'Service added successfully.');\n }"
] | [
"0.6443643",
"0.63802385",
"0.6373962",
"0.63272166",
"0.62915754",
"0.6189432",
"0.61595356",
"0.612749",
"0.6108377",
"0.60716313",
"0.60668254",
"0.598378",
"0.5923065",
"0.58605856",
"0.586035",
"0.5802011",
"0.5793819",
"0.5715782",
"0.56700677",
"0.5659269",
"0.5608324",
"0.55851114",
"0.55803144",
"0.55686206",
"0.55277264",
"0.5520858",
"0.5500326",
"0.5480275",
"0.54758805",
"0.54742396",
"0.5419746",
"0.5413837",
"0.5412464",
"0.5411982",
"0.5394564",
"0.53827083",
"0.53824395",
"0.5369361",
"0.536311",
"0.53617936",
"0.53399086",
"0.5337498",
"0.53331965",
"0.5322604",
"0.53169435",
"0.5316618",
"0.5308613",
"0.5303213",
"0.5302061",
"0.52918",
"0.52918",
"0.529166",
"0.52883273",
"0.52807784",
"0.5280649",
"0.5274819",
"0.5266719",
"0.5264911",
"0.5236144",
"0.5232338",
"0.5225056",
"0.5223331",
"0.52216387",
"0.52068543",
"0.52036506",
"0.5200953",
"0.5200828",
"0.5200453",
"0.5195679",
"0.51919407",
"0.51807153",
"0.51795",
"0.51787126",
"0.5178436",
"0.5177214",
"0.5168342",
"0.516676",
"0.51667374",
"0.51665956",
"0.5165583",
"0.51522917",
"0.5136756",
"0.51243407",
"0.51201355",
"0.51145095",
"0.51087445",
"0.51043093",
"0.51023316",
"0.50993115",
"0.5098165",
"0.50977826",
"0.5093961",
"0.5092608",
"0.5092143",
"0.5086369",
"0.50860137",
"0.50860137",
"0.5085861",
"0.5085474",
"0.50845754"
] | 0.56735826 | 18 |
Gets the account subscription level. | public function accountType()
{
return auth()->user()->account->level;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }",
"public function getSubscriptionStatus(): string\n {\n return $this->subscriptionStatus;\n }",
"public function getSubscription()\n {\n return $this->subscription;\n }",
"public function getAuthLevel() {\n }",
"protected function get_level()\n {\n return $this->m_voxy_connect->_get_list_voxy_level();\n }",
"public function getPlayerLevel()\n {\n return $this->get(self::_PLAYER_LEVEL);\n }",
"public function getStatus()\n {\n //return the status quote for the user based on their level\n return $this->getStatusQuote();\n }",
"public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }",
"public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }",
"public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }",
"public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }",
"public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }",
"public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }",
"public function getSubscriptionTracking()\n {\n return $this->subscription_tracking;\n }",
"function getGatewaySubscriptionStatus()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->getSubscriptionStatus( $this );\n\t\t\t}\n\t\t}",
"public function getSubscriptionId()\n\t{\n\t\treturn $this->_subscriptionId;\n\t}",
"public static function getUserLevel(){\n if (self::isSuper()){\n return \"super\";\n }\n if (self::isAdmin()){\n return \"admin\";\n }\n if (self::isUser()){\n return \"user\";\n }\n return null;\n }",
"public function getLevel()\n {\n $value = $this->get(self::LEVEL);\n return $value === null ? (integer)$value : $value;\n }",
"function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}",
"public function GetLevel()\n {\n return $this->level;\n }",
"public function getLogLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getAccountEnabled()\n {\n if (array_key_exists(\"accountEnabled\", $this->_propDict)) {\n return $this->_propDict[\"accountEnabled\"];\n } else {\n return null;\n }\n }",
"public function getLevel() {\n return Logger::$LOG_LEVELS[$this->logLevel];\n }",
"public function getLevel() {\n return $this->level;\n }",
"public function getLogLevel()\r\n {\r\n return $this->level;\r\n }",
"public function getLevel()\n {\n return isset($this->level) ? $this->level : null;\n }",
"function getLevel() {\n\t\treturn $this->_level;\n\t}",
"public function getLevel()\n\t{\n $criteria = new CDbCriteria;\n $criteria->condition = \" idUser = $this->idUser \";\n $criteria->order = ' t.level DESC ';\n \n $userCoins = VerifIdentity::model()->find($criteria);\n \n return $userCoins === null ? 1 : $userCoins['level']; \n }",
"public function getSubscriptionTypeId() : int;",
"public function getLevel() {}",
"public function getLevel();",
"public function getLevel();",
"public function getLevel()\n {\n return PMA_Message::$level[$this->getNumber()];\n }",
"public function getSubscriptionId();",
"public function getLevel() {\n return intval($this->level);\n }",
"public function getLevel()\n {\n return$this->level;\n }",
"public function getServiceLevel()\n {\n return $this->serviceLevel;\n }",
"public function getAdminLevel(){\n \n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }",
"public function getOppoLevel()\n {\n return $this->get(self::_OPPO_LEVEL);\n }",
"public function getLevel() : Level {\r\n\r\n return $this->level;\r\n\r\n }",
"public function getAdminLevel()\n {\n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }",
"public function getLevel() {\n\t\treturn isset($this->level) ? (int) $this->level : 1;\n\t}",
"public function get_subscription_status( $subscription ) {\n\t\treturn is_array( $subscription ) && isset( $subscription['status'] ) ? $subscription['status'] : '';\n\t}",
"function get_subscription_status($subc_id)\n {\n $merchant_id= $this->config->item('auth_merchant_id');\n $merchant_trans_key= $this->config->item('auth_transaction_key');\n\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(\"$merchant_id\");\n $merchantAuthentication->setTransactionKey(\"$merchant_trans_key\");\n // $refId = 'ref' . time();\n $request = new AnetAPI\\ARBGetSubscriptionStatusRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n // $request->setRefId($refId);\n $request->setSubscriptionId(\"$subc_id\");\n $controller = new AnetController\\ARBGetSubscriptionStatusController($request);\n //$response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n $response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\"))\n {\n return $response->getStatus();\n \n }\n else\n {\n\n return \"\";\n\n }\n }",
"public function getUserPrivacyLevel(){\n return($this->userPrivacyLevel);\n }",
"function getSubscriptionId(){\n\n $isSubsId = $this->common_model->getsingle(USERS,array('userId'=>$this->session->userdata('userId')));\n\n return !empty($isSubsId) ? $isSubsId->bizSubscriptionId : FALSE;\n \n }",
"private static function getLevel() {\n if (empty(static::$level)) {\n static::$level = Conf::getIniVal(Conf::LOG_LEVEL, 3);\n }\n return static::$level;\n }",
"public function getSubscriptionFullName(): string\n {\n return $this->_subscriptionFullName;\n }",
"public function getSubAccountId() \n {\n $oConfig = $this->_oFcpoHelper->fcpoGetConfig();\n $sReturn = $oConfig->getConfigParam('sFCPOSubAccountID');\n return $sReturn;\n }",
"public function getAccountType()\n {\n return $this->account_type;\n }",
"public function getAccountType()\n {\n return $this->account_type;\n }",
"public function getAccountType()\n {\n return $this->account_type;\n }",
"public function GetSteamLevel()\n {\n $this->setApiDetails(__FUNCTION__, 'v0001');\n\n // Set up the arguments\n $arguments = ['steamId' => $this->steamId];\n\n // Get the client\n $client = $this->getServiceResponse($arguments);\n\n return $client->player_level;\n }",
"public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}",
"public function getLevel(): int {\n return $this->level;\n\n }",
"function getServiceLevel();",
"public function getAccount() {\n return $this->account;\n }",
"public function getAccount()\n {\n return $this->account;\n }",
"public function getAccount()\n {\n return $this->account;\n }",
"public function getAccount()\n {\n return $this->account;\n }",
"public function getAccount()\n {\n return $this->account;\n }",
"public function getAccount()\n {\n return $this->account;\n }",
"public function getAccount()\n {\n return $this->account;\n }",
"public function getSubscription()\n {\n /** @var \\ParadoxLabs\\Subscriptions\\Api\\Data\\SubscriptionInterface $subscription */\n $subscription = $this->registry->registry('current_subscription');\n\n return $subscription;\n }",
"function get_level($blog_id = '') {\r\n\t\tglobal $wpdb;\r\n\r\n\t\tif ( empty( $blog_id ) ) {\r\n\t\t\t$blog_id = $wpdb->blogid;\r\n\t\t}\r\n\r\n\t\t//check cache\r\n\t\tif ( isset($this->level[$blog_id]) )\r\n\t\t return $this->level[$blog_id];\r\n\t\t\r\n\t\tif (!is_pro_site($blog_id))\r\n\t\t\treturn 0;\r\n\t\t\r\n $sql = \"SELECT level FROM {$wpdb->base_prefix}pro_sites WHERE blog_ID = '$blog_id'\";\r\n\r\n\t\t$level = $wpdb->get_var($sql);\r\n\t\tif ($level) {\r\n\t\t $this->level[$blog_id] = $level;\r\n\t\t\treturn $level;\r\n\t\t} else {\r\n\t\t unset($this->level[$blog_id]);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"public function getLevel(): int\n {\n return $this->level;\n }",
"public function getLevel(): int\n {\n return $this->level;\n }",
"public function getSubscription()\n {\n $recruiter = RecruiterProfile::where(['user_id' => Auth::user()->id])->first();\n if ($recruiter['is_subscribed'] == config('constants.ZeroValue')) {\n $result = view('web.subscription', ['activeTab' => '4']);\n } else {\n $result = redirect('jobtemplates');\n }\n return $result;\n }",
"function user_level () {\r\n\t$info = user_info();\r\n\treturn (isset($info[3]) ? $info[3] : 0);\r\n}",
"public function getLogLevel()\n {\n return $this->_logLevel;\n }",
"public function getAccountType()\n {\n return $this->accountType;\n }",
"public function getReadLevel()\n {\n return $this->read_level;\n }",
"public function getPrivacyLevel(): int\n {\n return $this->privacy_level;\n }",
"protected function getLogLevel()\n {\n return $this->_loglevel;\n }",
"public function transactionLevel()\n {\n return $this->transactionCount;\n }",
"public function GetAccountType() {\n return $this->accountType;\n }",
"public function getLogLevel(){\n\n\t\treturn $this->_log_level;\n\t}",
"function getLogLevel()\n {\n return $this->_props['LogLevel'];\n }",
"public function getSubscriptionId() {\n\t\treturn $this->container['subscription_id'];\n\t}",
"public static function currentLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\tif (session()->exists('panichd_filter_currentLevel') and session('panichd_filter_currentLevel')==1){\n\t\t\t\treturn 1;\n\t\t\t}else{\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}else\n\t\t\treturn 1;\n\t}",
"public function getRole()\n {\n return $this->access_level;\n }",
"public function getLevel() : int\n\t{\n\t\treturn $this->level;\n\t}",
"public function getLevelString() {\n\n switch ($this->getLevel()) {\n\n case self::LEVEL_REGISTERED:\n return 'Registered';\n case self::LEVEL_USER:\n return 'User';\n case self::LEVEL_ADMINISTRATOR:\n return 'Administrator';\n default:\n return 'Unknown';\n }\n\n }",
"public function getSubscriptionKey() { return $this->subscriptionKey; }",
"public function getAuthLevels()\n {\n if (empty($this->authLevels))\n {\n $this->loadAuthLevels();\n }\n \n return $this->authLevels;\n }",
"public function getSubAccountId(): string;",
"public function getLogLevel() {\n $log_level = Mage::getStoreConfig(static::XML_PATH_LOG_LEVEL);\n\n return ($log_level !== null) ? intval($log_level) : Zend_Log::INFO;\n }",
"function getLevelTruck()\r\n {\r\n static $level;\r\n if (!isset($level)) $level = new CustomLoggerLevel(LOG4PHP_LEVEL_TRUCK_INT, 'TRUCK', 0);\r\n return $level;\r\n }",
"public function getUserAccessLevel () {\n\t\treturn ($this->userAccessLevel);\n\t}",
"function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}",
"public function getSubscriptionId()\n {\n $value = $this->get(self::SUBSCRIPTION_ID);\n\n return $value === null ? (string) $value : $value;\n }",
"public function getRegionLevel()\n {\n return $this->region_level;\n }",
"function getLevel();"
] | [
"0.65767837",
"0.62155455",
"0.61739105",
"0.6132176",
"0.61315733",
"0.6128359",
"0.5982635",
"0.5865299",
"0.5865299",
"0.5865299",
"0.5865299",
"0.5865299",
"0.5865299",
"0.5801089",
"0.57973486",
"0.5785297",
"0.57735467",
"0.57185656",
"0.5682405",
"0.5655849",
"0.56548065",
"0.5651496",
"0.5651496",
"0.5651496",
"0.5651496",
"0.5651496",
"0.5651496",
"0.5651496",
"0.5644408",
"0.56381893",
"0.5623603",
"0.5619832",
"0.5611303",
"0.56034493",
"0.5594155",
"0.55863225",
"0.55683804",
"0.55562645",
"0.55562645",
"0.55397606",
"0.5524418",
"0.5519641",
"0.5515584",
"0.5514964",
"0.55073386",
"0.5484147",
"0.54666895",
"0.54524744",
"0.5439882",
"0.5438059",
"0.54199696",
"0.5407584",
"0.54029095",
"0.5386255",
"0.53853863",
"0.538285",
"0.5381397",
"0.5381397",
"0.5381397",
"0.5380378",
"0.53688943",
"0.53654844",
"0.5356093",
"0.5354929",
"0.535183",
"0.535183",
"0.535183",
"0.535183",
"0.535183",
"0.535183",
"0.5342984",
"0.53292733",
"0.53250664",
"0.53250664",
"0.5317222",
"0.5304886",
"0.5302353",
"0.52907836",
"0.5287786",
"0.5277959",
"0.52758694",
"0.525227",
"0.5238011",
"0.5225599",
"0.52165914",
"0.52144504",
"0.5207838",
"0.5200945",
"0.51873136",
"0.51825416",
"0.5160039",
"0.51573443",
"0.5157316",
"0.51568145",
"0.5150531",
"0.51469433",
"0.51465833",
"0.5143701",
"0.5141761",
"0.51308113"
] | 0.7017779 | 0 |
Gets the users for a ministry. | public function users(IndexRequest $request)
{
$ministryUsers = auth()->user()
->ministryUsers()
->latest()
//->with(['user.image'])
->where(fn ($ministryUser) => $ministryUser->whereHas('user',
fn ($user) => $user->search(['name', 'email'], $request->filter_text)))
->paginate(Helper::getLimit($request));
//return $ministryUsers;
ResourcesMinistryUser::wrap('users');
return ResourcesMinistryUser::collection($ministryUsers);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }",
"public function getUsers();",
"public function getUsers();",
"public function getUsers();",
"public function getUsers() {\n\t\ttry {\n\t\t\treturn $this->getBounded1MInstance(\"XTUsersRecords\", $filter, $order, $limit, $whereAdd);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}",
"public function ministryUsers()\n {\n return $this->hasMany(MinistryUser::class);\n }",
"function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}",
"private function getUsersMailist() {\n $param = array(\n 'where' => 'registered = 1'\n );\n\n $users = $this->mailist->gets($param);\n\n return $users;\n }",
"public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}",
"function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}",
"function get_users()\n {\n //Unimplemented\n }",
"public function getUsers()\n {\n\t\treturn $this->api->listUsersOfGroup($this->getID());\n }",
"public function getUsers()\n {\n if (empty($this->users)) {\n $this->setUsers();\n }\n }",
"public function getUsers()\n {\n $sql = \"SELECT * FROM users\";\n return $this->get($sql, array());\n }",
"public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }",
"public function getUsers()\n {\n return $this->users->getValues();\n }",
"function getUsers(){\n }",
"function getUsers(){\n }",
"function getUsers() {\n\t\t$users = json_decode(\n\t\t\t\t\tfile_get_contents(\"data/users.json\"),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\treturn $users;\n\t}",
"protected function get_users() {\n\t\t\t$users = wp_cache_get( 'mycred_users' );\n\n\t\t\tif ( false === $users ) {\n\t\t\t\t$users = array();\n\t\t\t\t$blog_users = get_users( array( 'orderby' => 'display_name' ) );\n\t\t\t\tforeach ( $blog_users as $user ) {\n\t\t\t\t\tif ( false === $this->core->exclude_user( $user->ID ) )\n\t\t\t\t\t\t$users[ $user->ID ] = $user->display_name;\n\t\t\t\t}\n\t\t\t\twp_cache_set( 'mycred_users', $users );\n\t\t\t}\n\n\t\t\treturn apply_filters( 'mycred_log_get_users', $users );\n\t\t}",
"public function getUsers(){\n\t\treturn $this->users;\n\t}",
"public function getUsers()\n {\n $st = $this->execute('SELECT * FROM '. self::$prefix .'user ORDER BY `userid`;');\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n $users = array();\n foreach($rs AS $row) {\n $user = new sspmod_janus_User($this->_config->getValue('store'));\n $user->setUid($row['uid']);\n $user->load();\n $users[] = $user;\n }\n \n return $users;\n }",
"function get_users()\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$query = $db->query(\"SELECT * FROM users\");\n\t\t\n\t\treturn $db->results($query);\n\t}",
"private function getUserBatch() {\n\t\t// Include also hidden (disabled) users to the export\n\t\t$hidden_status = access_get_show_hidden_status();\n\t\taccess_show_hidden_entities(true);\n\n\t\t// Ignore access settings to get all users\n\t\telgg_set_ignore_access(true);\n\n\t\t$users = elgg_get_entities(array(\n\t\t\t'type' => 'user',\n\t\t\t'limit' => $this->limit,\n\t\t\t'offset' => $this->offset,\n\t\t));\n\n\t\t// Set access level to normal\n\t\telgg_set_ignore_access(false);\n\n\t\t// Set hidden status to normal\n\t\taccess_show_hidden_entities($hidden_status);\n\n\t\treturn $users;\n\t}",
"public function getUsers() {\n return $this->userHandler->getUsers();\n }",
"public function getUsers()\n {\n return $this->users;\n }",
"public function getUsers() {\n \n // Call getAllUsers method in userDataService and set to variable\n $users = $this->getAllUsers();\n \n // Return array of users\n return $users;\n }",
"protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}",
"public function getUsers() {\n return $this->getRelation(\"users\");\n }",
"public function getUsers()\n {\n return $this->getRelation('users');\n }",
"public function getUserList() {\n return $this->users;\n }",
"function getUsers() {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// now the sql again\n\t\t$sql = \"select users_username from users\";\n\t\t\n\t\t// run the query\n\t\t$result = $dbObject->query($sql);\n\t\t\n\t\t// iterate over the results - we expect a simple array containing\n\t\t// a list of usernames\n\t\t$i = 0;\n\t\t$users = array();\n\t\tforeach($result as $row) {\n\t\t\t$users[$i] = $row[\"username\"];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// now return the list\n\t\treturn $users;\n\t}",
"public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }",
"public function getUsers() {\n return $this->users;\n }",
"public function getUsers() {\n $userDAO = new UserDAO();\n return $userDAO->retrieveUsers();\n }",
"public function getUsers()\n {\n $em = $this->container->get('doctrine')->getEntityManager();\n $builder = $em->getRepository('AppWebBundle:User')->createQueryBuilder('u');\n \n return $builder->getQuery()->getResult();\n }",
"public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }",
"public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}",
"public function getUsers()\n {\n return Security::getUserList();\n }",
"function getUsers()\n\t{\n\t\t// Lets load the files if it doesn't already exist\n\t\tif (empty($this->_users))\n\t\t{\n\t\t\t$query = $this->_buildQueryUsers();\n\t\t\t$this->_users = $query === false\n\t\t\t\t? array()\n\t\t\t\t: $this->_getList($query);\n\t\t}\n\n\t\treturn $this->_users;\n\t}",
"public function getMembers() {\r\n\r\n //statement of resources\r\n $user = array();\r\n\r\n //sql connection\r\n $connect = connection::getInstance();\r\n\r\n //user sql request\r\n $sql = \"SELECT* FROM users\";\r\n //sending request\r\n\r\n\r\n\r\n $req = mysql_query($sql) or die('Erreur SQL !<br>' . $sql . '<br>' . mysql_error());\r\n\r\n while ($data = mysql_fetch_assoc($req)) {\r\n //scenario creation\r\n $data['nameU'] = Users::secure($data['nameU']);\r\n $data['IDU'] = Users::secure($data['IDU']);\r\n $data['typeU'] = Users::secure($data['typeU']);\r\n $data['admin'] = Users::secure($data['admin']);\r\n $data['password'] = Users::secure($data['password']);\r\n\r\n $users[] = new User($data['nameU'], $data['IDU'], $data['typeU'], $data['admin'], $data['password']);\r\n }\r\n\r\n return $users;\r\n }",
"function listUsers() {\n return $this->users;\n }",
"public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }",
"function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}",
"abstract function getNonRegisteredUsers();",
"function getUsers()\n {\n $users = User::where('users.department_info_id', '=', Auth::user()->department_info_id)\n ->where('users.user_type_id', '=', 1)\n ->where('users.status_work', '=', 1)\n ->get();\n return $users;\n }",
"public static function getUsers() {\n\t\t$res = self::$db->query(\"SELECT id, email, username, logins, last_login FROM `\".self::$users_tbl.\"` ORDER BY username\");\n\t\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $row;\n\t}",
"function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }",
"function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }",
"public function users_get()\n\t{\n\t\t$users = [\n\t\t\t['id' => 0, 'name' => 'John', 'email' => '[email protected]'],\n\t\t\t['id' => 1, 'name' => 'Jim', 'email' => '[email protected]'],\n\t\t];\n\n\t\t$id = $this->get('id');\n\n\t\tif ($id === null) {\n\t\t\t// Check if the users data store contains users\n\t\t\tif ($users) {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response($users, 200);\n\t\t\t} else {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No users were found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t} else {\n\t\t\tif (array_key_exists($id, $users)) {\n\t\t\t\t$this->response($users[$id], 200);\n\t\t\t} else {\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No such user found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t}\n\t}",
"function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}",
"public function getAllUsers(){\n\t\treturn $this->user;\n\t}",
"function getUsers()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`customers`\";\n\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $users = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $user = new UserEntity();\n $user->setIdUser($data->idUser);\n $user->setNom_societe($data->Nom_societe);\n $user->setAbreviations($data->Abreviations);\n $user->setAdresse($data->Adresse);\n $user->setTel($data->Tel);\n $user->setEmail($data->Email);\n $user->setSecteur($data->Secteur);\n $user->setCreatedAt($data->createdat);\n\n $users[] = $user;\n }\n\n if ($users) {\n return $users;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }",
"public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }",
"public function users()\n {\n return User::join('group_user', 'group_user.user_id', '=', 'users.id')\n ->join('groups', 'group_user.group_id', '=', 'groups.id')\n ->join('stores', 'stores.group_id', '=', 'groups.id')\n ->where('stores.id', $this->id)\n ->select('users.*')\n ->get();\n }",
"public function getUsers()\r\n {\r\n return $this->hasMany(User::className(), ['id' => 'user_id'])\r\n ->via('glu');\r\n }",
"public function getUsers()\n {\n return $this->hasMany(User::className(), ['id' => 'user_id'])->viaTable('join_user_collector', ['collector_id' => 'id']);\n }",
"function getUsers(){\n $this->users = array();\n foreach($this->userIds as $userId){\n array_push($this->users, new user($userId));\n }\n }",
"public function getUsersList()\n {\n }",
"function GetUsers($set_type = 'all', $get_data = false)\n\t{\n\t\t$where_clause = array('sid' => $this->sid);\n\t\t\n\t\tswitch ($set_type) {\n\t\t\tcase 'active':\n\t\t\t\t$where_clause['status'] = array ('!=', 'closed');\n\t\t\t\t$where_clause['actual_time + INTERVAL '. LC_ALLOWED_IDLE_TIME] = array ('>', 'NOW()');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'all':\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'requester':\n\t\t\t\t$where_clause = array (\n\t\t\t\t\t'#WHERE' => array (\n\t\t\t\t\t\t'sid' => $this->sid\n\t\t\t\t\t),\n\t\t\t\t\t'#ORDER' => 'user_id ASC',\n\t\t\t\t\t'#LIMIT' => 1\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tif (is_array($set_type)) {\n\t\t\t\t\t$where_clause = $set_type;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$r = $this->db->q('SELECT user_id FROM #_PREF_lc_users', $where_clause);\n\t\t$users = array();\n\t\twhile ($ud = $this->db->fetchAssoc($r)) {\n\t\t\t$user = new LcUser($ud['user_id']);\n\t\t\tif ($get_data) $user->getData();\n\t\t\t$users[] = $user;\n\t\t}\n\t\t\n\t\treturn $users;\n\t}",
"public function getUsers()\n {\n $stmt = $this->DB->prepare(\"select user, hash from users\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function get_users()\n {\n $isFetched = $this->User_m->get_users_m();\n \n $res['status'] = $isFetched ? true : false;\n $res['message'] = $isFetched ? 'Users fetched.' : 'Users not found.';\n $res['count'] = $this->count_user();\n $res['data'] = $isFetched;\n \n http_response_code(200);\n\n echo json_encode($res);\n }",
"public function getMembers ()\n {\n $userIds = (array) $this['users']->getValue ();\n\n // Users should already be in the instance pool, so we retrieve them\n // one by one with findPk\n $users = array ();\n foreach ($userIds as $uid)\n $users[] = UserQuery::create ()->findPk($uid);\n\n return $users;\n }",
"public function getAllUser(){\n return $this->users;\n }",
"public function users() {\n\t\treturn $this->users;\n\t}",
"static function getUsers()\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->query('SELECT login, email FROM users');\n\n\t\treturn $request;\n\t}",
"public function getUsers()\n {\n $users = $this->usersController->getUsers();\n echo json_encode($users);\n return $users;\n }",
"function getUsers() {\n $users = $this->users;\n if (is_string($users)) {\n $users = explode(',', $users);\n }\n return $users;\n }",
"public static function getPersonsUsers(){\n return self::getPersonsByRole();\n }",
"public function users()\n {\n return $this->getUsers(\n config('auth.model') ?: config('auth.providers.users.model')\n );\n }",
"public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }",
"public function getUsers(){\n $query = \"SELECT * FROM usuario \";\n return self::getInstance()->consulta($query);\n }",
"public function getUsers()\n\t{\n\t\t$groupUsers = new ArrayObject();\n\t\t$group = $this->getGroup();\n\t\tif ($group != null) {\n\t\t\t$users = $this->groupService->getUsersInGroup($this->getGroup(), true);\n\t\t\t\n\t\n\t foreach ($users as $user) {\n\t $groupUsers[$user->id] = $user;\n\t }\t\n\t\t}\n \n return $groupUsers;\n\t}",
"public function get_users()\r\n\t\t{\r\n\t\t\t$retArr = array();\r\n\r\n\t\t\tif(is_array($this->obj))\r\n\t\t\t{\r\n\t\t\t\treturn $this->obj;\r\n\t\t\t}\r\n\t\t}",
"public function fromMySchool() {\n\t\treturn $this->findUsers()->get();\n\t}",
"public function users()\n\t{\n\t\t$users_table = Config::get('sentry::sentry.table.users');\n\t\t$groups_table = Config::get('sentry::sentry.table.groups');\n\n\t\t$users = DB::connection(static::$db_instance)\n\t\t\t->table($users_table)\n\t\t\t->where(static::$join_table.'.'. static::$group_identifier, '=', $this->group['id'])\n\t\t\t->join(static::$join_table,\n\t\t\t\t\t\tstatic::$join_table.'.user_id', '=', $users_table.'.id')\n\t\t\t->get($users_table.'.*');\n\n\t\tif (count($users) == 0)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Unset password stuff\n\t\tforeach ($users as &$user)\n\t\t{\n\t\t\t$user = get_object_vars($user);\n\t\t\tunset($user['password']);\n\t\t\tunset($user['password_reset_hash']);\n\t\t\tunset($user['activation_hash']);\n\t\t\tunset($user['temp_password']);\n\t\t\tunset($user['remember_me']);\n\t\t}\n\n\t\treturn $users;\n\t}",
"public function getPartinUsersList(){\n return $this->_get(2);\n }",
"public static function getUsers(){\n $query = UserQuery::init()\n ->joinUserStatus()->selectName('status')->endUse();\n //->joinUserDetails()->selectUserId()->selectAddress()->selectZipCode()->selectLocal()->endUse()\n //->joinUserGuard()->selectUserId()->selectUsername()->selectSalt()->selectUserkey()->endUse()\n //->joinUserHasGroup()->selectUserId()->selectUserGroup()->endUse()\n //->joinUserLog()->selectId()->selectUserId()->selectUserEvent()->selectTimestamp()->endUse();\n \n return $query;\n }",
"public function retrieve_users()\n {\n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n \n // Set the conditions for the search query\n if ($search_query && $search_query != '')\n {\n $conditions[] = Utilities::query_to_condition(\n $search_query, \n array(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_USERNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)));\n }\n \n // Only include active users\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_ACTIVE), \n new StaticConditionVariable(1));\n \n // Combine the conditions\n $count = count($conditions);\n if ($count > 1)\n {\n $condition = new AndCondition($conditions);\n }\n \n if ($count == 1)\n {\n $condition = $conditions[0];\n }\n \n $this->user_count = DataManager::count(User::class_name(), $condition);\n $parameters = new DataClassRetrievesParameters(\n $condition, \n 100, \n $this->get_offset(), \n array(\n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)), \n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME))));\n \n return DataManager::retrieves(User::class_name(), $parameters);\n }",
"public function getLTIUsers();",
"public function getUserList()\n {\n return $this->userDao->getUserList();\n }",
"public static function getUsers() {\n return json_decode(file_get_contents(self::$usersFile));\n }",
"public function getUsers() {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT * FROM p5_users WHERE ? ');\n $req->execute(array(1));\n\n return $req;\n $req->closeCursor();\n }",
"public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }",
"function getUsers() {\r\n\t\t\t$sql = \"SELECT users.user_id, users.email, users.student_id, 'Click to change password', users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id\";\r\n\t\t\t$result = $this->query($sql);\r\n\t\t\tif (mysql_num_rows($result) == 0) return false;\r\n\t\t\twhile ($row = mysql_fetch_object($result)) $rows[] = array($row->user_id, $row->email, $row->student_id, \"Click to change\", str_replace(array(1, 0), array(\"Yes\", \"No\"), $row->active), $row->society_name);\r\n\t\t\treturn $rows;\r\n\t\t}",
"function getUsers(){\n\t\t$query = $this->db->get('usuarios');\n\t\tif($query->num_rows() > 0) return $query;\n\t\telse return NULL;\n\t}",
"function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}",
"private function listUsers()\n {\n $users = get_users();\n $user_ids = array();\n\n foreach ($users as $u) {\n $user_ids[] = $u['id'];\n }\n\n if (count($this->ids) != 0) {\n return array_intersect($this->ids, $user_ids);\n } else {\n return $user_ids;\n }\n }",
"public function getUsers(){\n $sql=\"SELECT * FROM users\";\n $select=parent::connect_db()->prepare($sql);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }",
"protected function getUsers() {\n //Get admin user for testing\n $admin = \\App\\User::whereHas('roles', function($query) {\n $query->where('name', 'admin');\n })->get()[0];\n //Get regular user for testing\n $user = \\App\\User::orderBy('id', 'desc')->first();\n\n return compact('admin', 'user');\n }",
"public function findUsers(): iterable;",
"public function getUsers():array\n\t{\n\t\treturn $this->_users;\n\t}",
"public function users(){\n\t\t$user = $this->ion_auth->user()->row();\n\n\t\t$query = $this->db->select()\n\t\t\t\t\t\t\t\t\t\t\t ->from('users')\n\t\t\t\t\t\t\t\t\t\t\t ->where('admin_id',$user->id)\n\t\t\t\t\t\t\t\t\t\t\t ->order_by('id', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t ->get();\n\t\t\treturn $query;\n\t}",
"function getSignupUsers() {\n\t$result = mysql_query(\"SELECT * FROM customer\");\n\t$ret = array();\n\twhile ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n\t array_push($ret, $row);\n\t}\n\n\tmysql_free_result($result);\n\treturn $ret;\n}",
"public function getUsers(){\n\t\t$query = $this->db->get('users');\n\t\treturn $query->result_array();\n\t}",
"function monitor_list_wi_users() {\n $query = \"select distinct(`wf_user`) from `\".GALAXIA_TABLE_PREFIX.\"workitems`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_user'];\n }\n return $ret;\n }",
"public function getUsers()\n {\n $request = \"SELECT user.*, rank.name as rank_name FROM `user` join rank on user.rank = rank.id order by rank.id\";\n $request = $this->connexion->query($request);\n $newsList = $request->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($newsList);\n return $newsList;\n }",
"function users(): array { return $this->users; }",
"public function getUsers()\n {\n $output = $this->adapter->get($this->api . '/user/list');\n\n $users = json_decode($output);\n\n return array_map(function ($users) {\n return new Model\\User($users);\n }, $users);\n }",
"public function retrieveAllUsers () {\n return $this->usersDB;\n }"
] | [
"0.72677183",
"0.72477263",
"0.72477263",
"0.72477263",
"0.7223185",
"0.7187486",
"0.7153664",
"0.7099485",
"0.7098818",
"0.7074578",
"0.7069168",
"0.7061608",
"0.70478547",
"0.70201886",
"0.70101434",
"0.6963096",
"0.693369",
"0.693369",
"0.69154346",
"0.68943554",
"0.6890394",
"0.68811285",
"0.6868807",
"0.6866027",
"0.68525106",
"0.6849766",
"0.68326527",
"0.68201953",
"0.68196714",
"0.68139666",
"0.6798635",
"0.6791821",
"0.6790117",
"0.6772975",
"0.67644626",
"0.6742401",
"0.67200035",
"0.66992456",
"0.6693752",
"0.6683493",
"0.66761845",
"0.66627055",
"0.66473264",
"0.66342795",
"0.66298604",
"0.66231984",
"0.66186637",
"0.66149914",
"0.6603643",
"0.6602564",
"0.66011953",
"0.65942556",
"0.65928864",
"0.6592027",
"0.6587963",
"0.65837276",
"0.6548917",
"0.6538773",
"0.6538054",
"0.6536129",
"0.65261847",
"0.6519416",
"0.6514601",
"0.6509153",
"0.650639",
"0.6498716",
"0.6498638",
"0.6496877",
"0.6495632",
"0.64846534",
"0.64813715",
"0.6466456",
"0.6463241",
"0.64578867",
"0.64525247",
"0.6451701",
"0.643536",
"0.6428391",
"0.64271516",
"0.64263594",
"0.64170986",
"0.6406791",
"0.64005226",
"0.63976437",
"0.63960516",
"0.63864255",
"0.6385591",
"0.63844603",
"0.63782555",
"0.6375901",
"0.6374654",
"0.63721544",
"0.63668454",
"0.6365586",
"0.63636607",
"0.63567144",
"0.6354292",
"0.63539505",
"0.6347876",
"0.6346775"
] | 0.649722 | 67 |
Blocks or unblock a user. | public function toggleActivity(ToggleActivityRequest $request)
{
$ministryUser = auth()->user()->ministryUsers()->where('user_id', $request->user_id)->first();
if ($ministryUser) {
$ministryUser->update($request->validated());
return $this->successResponse('This user`s active status has been changed');
}
return abort(403, 'You are not allowed to alter that user, they do not belong to your following');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function blockUser($user)\r\n {\r\n return $this->exec('block_user ' . $this->escapePeer($user));\r\n }",
"public function blockUser($id)\n {\n $this->db->set('status_id', '1');\n $this->db->where('id', $id);\n $this->db->update('inm_user');\n return true;\n }",
"function changeUserBlock( $cid=null, $block=1, $option ) {\r\n\tglobal $database;\r\n\r\n\t$action = $block ? 'блокировки' : 'разблокировки';\r\n\r\n\tif (count( $cid ) < 1) {\r\n\t\techo \"<script type=\\\"text/javascript\\\"> alert('Выберите объект для $action'); window.history.go(-1);</script>\\n\";\r\n\t\texit;\r\n\t}\r\n\r\n\t$msg = checkUserPermissions( $cid, $action );\r\n\tif ($msg) {\r\n\t\techo \"<script type=\\\"text/javascript\\\"> alert('\".$msg.\"'); window.history.go(-1);</script>\\n\";\r\n\t\texit;\r\n\t}\r\n\r\n\tmosArrayToInts( $cid );\r\n\t$cids = 'id=' . implode( ' OR id=', $cid );\r\n\r\n\t$query = \"UPDATE #__users\"\r\n\t. \"\\n SET block = \" . (int) $block\r\n\t. \"\\n WHERE ( $cids )\"\r\n\t;\r\n\t$database->setQuery( $query );\r\n\tif (!$database->query()) {\r\n\t\techo \"<script> alert('\".$database->getErrorMsg().\"'); window.history.go(-1); </script>\\n\";\r\n\t\texit();\r\n\t}\r\n\r\n\t// if action is to block a user\r\n\tif ( $block == 1 ) {\r\n\t\tforeach( $cid as $id ) {\r\n\t\t// delete user acounts active sessions\r\n\t\t\tlogoutUser( $id, 'users', 'block' );\r\n\t\t}\r\n\t}\r\n\r\n\tmosRedirect( 'index2.php?ca='. $option );\r\n}",
"private function userUnblock()\n\t{\n\t\t// Make sure the payment is complete\n\t\tif($this->state != 'C') return;\n\t\t\n\t\t// Make sure the subscription is enabled\n\t\tif(!$this->enabled) return;\n\t\t\n\t\t// Paid and enabled subscription; enable the user if he's not already enabled\n\t\t$user = JFactory::getUser($this->user_id);\n\t\tif($user->block) {\n\t\t\t// Check the confirmfree component parameter and subscription level's price\n\t\t\t// If it's a free subscription do not activate the user.\n\t\t\tif(!class_exists('AkeebasubsHelperCparams')) {\n\t\t\t\trequire_once JPATH_ADMINISTRATOR.'/components/com_akeebasubs/helpers/cparams.php';\n\t\t\t}\n\t\t\t$confirmfree = AkeebasubsHelperCparams::getParam('confirmfree', 0);\n\t\t\tif($confirmfree) {\n\t\t\t\t$level = FOFModel::getTmpInstance('Levels', 'AkeebasubsModel')\n\t\t\t\t\t->getItem($this->akeebasubs_level_id);\n\t\t\t\tif($level->price < 0.01) {\n\t\t\t\t\t// Do not activate free subscription\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$updates = array(\n\t\t\t\t'block'\t\t\t=> 0,\n\t\t\t\t'activation'\t=> ''\n\t\t\t);\n\t\t\t$user->bind($updates);\n\t\t\t$user->save($updates);\n\t\t}\n\t}",
"public function blockUser($id)\n {\n $this->db->set('status_id', '1');\n $this->db->where('id', $id);\n $this->db->update('temp_user');\n return true;\n }",
"public function blockUser($id) {\n\t\t//Argument 1 must be a string, integer\n\t\tEden_Twitter_Error::i()->argument(1, 'string', 'int');\t\n\t\t\n\t\t//if it is integer\n\t\tif(is_int($id)) {\n\t\t\t//lets put it in our query\n\t\t\t$this->_query['user_id'] = $id;\n\t\t//else it is string\n\t\t} else {\n\t\t\t//lets put it in our query\n\t\t\t$this->_query['screen_name'] = $id;\n\t\t}\n\t\t\n\t\treturn $this->_post(self::URL_CREATE_BLOCKING, $this->_query);\n\t}",
"public function blockUser($id) {\n $this->connect();\n $results = $this->db->query('SELECT * FROM ic_user WHERE id=' . $id);\n if ($row = $results->fetchArray()) {\n\n $blockUserQuery = 'UPDATE ic_user SET active=0 WHERE id=' . $id;\n $this->db->query($blockUserQuery);\n\n $userName = $row['username'];\n return $userName;\n } else {\n return false;\n }\n $db->close();\n unset($db);\n }",
"public function blockUserAccount($id_user)\n {\n $this->_setIdTableValue($id_user);\n return $this->update(\n [\n 'sw_active' => 0\n ]\n );\n }",
"public function block(User $user,$bool = true)\n {\n if($this->isUser($user)) {\n $this->users()->updateExistingPivot($user->id,[\n \"blocked\" => $bool\n ]);\n return $this->save();\n }\n }",
"public function block($id)\n {\n $user = User::findOrFail($id);\n\n if (Auth::user()->id == $id) {\n return response('Unauthorized action.', 403);\n }\n\n if (Gate::allows('admin', auth()->user())) {\n $user->where('users.id', '=', $id)\n ->update(['blocked' => 1]);\n\n return redirect()->action('UserController@index');\n }\n return response('Unauthorized action.', 403);\n }",
"public static function admin_user_block(Request $request, $id = null, $status = null) {\n try {\n $user = User::findorfail($id);\n\n if ($status == 1) {\n\n if ($user->status == 'block')\n return Redirect::back()->withErrors(__('admin_user.user_a_block'))->withInput();\n\n DB::Table('users')->where('id', $user->id)->update(array(\n 'status' => 'block',\n 'updated_at' => new \\DateTime\n ));\n\n return Redirect::back()->with('status', __('admin_user.user_block'));\n }\n else {\n if ($user->status == 'active')\n return Redirect::back()->withErrors(__('admin_user.user_a_unblock'))->withInput();\n\n DB::Table('users')->where('id', $user->id)->update(array(\n 'status' => 'active',\n 'updated_at' => new \\DateTime\n ));\n\n return Redirect::back()->with('status', __('admin_user.user_unblock'));\n }\n } catch (\\Exception $e) {\n return Redirect::back()->witherrors($e->getMessage())->withInput();\n }\n }",
"public static function setUserUnblock(User $user)\n {\n $user->block = 0;\n $user->update();\n return true;\n }",
"public function blockUser(Request $request)\n {\n if (Auth::user()->role_id == 1) {\n $user = Users::findOrFail($request->input('user_id'));\n $user->valid = $request->input('action');\n $user->save();\n $data = array( 'text' => 'success' );\n } else {\n $data = array( 'text' => 'fail' . $request->input('action') );\n }\n return Response::json($data);\n }",
"public static function setUserBlock(User $user)\n {\n $user->block = 1;\n $user->update();\n return true;\n }",
"public function unblockUser($id)\n {\n $this->db->set('status_id', '0');\n $this->db->where('id', $id);\n $this->db->update('inm_user');\n return true;\n }",
"public function unblock($id)\n {\n $user = User::findOrFail($id);\n\n if (Auth::user()->id == $id) {\n return response('Unauthorized action.', 403);\n }\n\n if (Gate::allows('admin', auth()->user())) {\n $user->where('users.id', '=', $id)\n ->update(['blocked' => 0]);\n\n return redirect()->action('UserController@index');\n }\n return response('Unauthorized action.', 403);\n }",
"function approve_block_user($master_user_id, $master_user_type){\n\t\tif( isset($master_user_id) ){\n\t\t\tglobal $base;\n\n\t\t\t$id \t= $base->clear_string($_POST[$master_user_id]);\n\t\t\t$type \t= $base->clear_string($_POST[$master_user_type]);\n\t\t\t\n\t\t\tswitch($type){\n\t\t\t\tcase 'approve_status':\n\t\t\t\t\tuser::do_approve_user($id);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'block_status':\n\t\t\t\t\tuser::do_block_user($id);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t}",
"public function block() {\n $friendship_relation_exists = $this->micro_relation_exists($this->from, $this->to, \"F\");\n $exists = $this->micro_relation_exists($this->from, $this->to, \"B\");\n\n if($friendship_relation_exists) {\n // Unblock\n if($exists) {\n $this->db->query(\"DELETE FROM user_relation WHERE `from` = ? AND `to` = ? AND `status` = ?\"\n ,array(\n $this->from,\n $this->to,\n \"B\"\n ));\n // Block\n } else {\n $this->db->query(\"INSERT INTO user_relation (`from`, `to`, `status`, `since`) \n VALUES (?, ?, ?, ?)\", array(\n $this->from,\n $this->to,\n \"B\",\n date(\"Y/m/d h:i:s\")\n ));\n }\n\n return true;\n }\n\n return false;\n }",
"public function unblockUser($id)\n {\n $this->db->set('status_id', '0');\n $this->db->where('id', $id);\n $this->db->update('temp_user');\n return true;\n }",
"function block(Request $request)\n {\n DB::table('users')\n ->where('id', $request->id)\n ->update([\n 'active' => '0',\n ]); \n\n AuditTrail::create(['user_id' => Auth::user()->id,\n 'username' => Auth::user()->username,\n 'form_name' => 'Account',\n 'activity' => 'Locked ' . 'Account ' . $request->username, \n ]);\n\n return redirect()->back();\n }",
"public function block(User $user,User $target){\n if ($user->hasRole('superadmin') && !$target->hasRole('superadmin')){\n return true;\n }\n //admin only can block user\n else if($user->hasRole('admin') && $target->hasRole('user')){\n return true;\n }\n }",
"public function unblockAccount() {\n\t\tif(check($this->_userid)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_MEMBID_.\" = ?\", array(0, $this->_userid));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_username)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_USERNM_.\" = ?\", array(0, $this->_username));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_email)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_EMAIL_.\" = ?\", array(0, $this->_email));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn;\n\t}",
"public function blockAccount() {\n\t\tif(check($this->_userid)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_MEMBID_.\" = ?\", array(1, $this->_userid));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_username)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_USERNM_.\" = ?\", array(1, $this->_username));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_email)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_EMAIL_.\" = ?\", array(1, $this->_email));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn;\n\t}",
"public function block()\n {\n $blocker = Yii::$app->cache->get('login_blocker_' . $this->getIp());\n \n if ($blocker === false) {\n $blocker = [1, time(), 0];\n } else { \n $blocker[0]++;\n \n if ($blocker[0] == $this->wrong_login_number) {\n $blocker[1] = time() + $this->time; \n }\n }\n \n Yii::$app->cache->set('login_blocker_' . $this->getIp(), $blocker, $this->time);\n\n return true;\n }",
"public function block($id)\n {\n $block = $this->selectuser($id,'block');\n if($block[0]['block'] == 1)\n {\n $this->updateuser($id,'block',0);\n }\n else\n {\n $this->updateuser($id,'block',1);\n }\n }",
"public function banUser(){\n if($this->adminVerify()){\n\n }else{\n echo \"Vous devez avoir les droits administrateur pour accéder à cette page\";\n }\n }",
"public function block(BanUserValidator $input, $userId): RedirectResponse\n {\n $user = $this->usersRepository->find($userId);\n\n if (auth()->user()->id === $user->id) { // The given user is the currently authencated user.\n flash('Je kan jezelf helaas niet blokkeren.')->warning();\n return redirect()->route('users.index');\n\t\t}\n\n // TODO: Implementatie voor de blokkering van alle api keys in het systeem.\n // Omdat wanneer een gebruiker geblokkeerd word mag hij zijn sleutels ook niet gebruiken.\n\n $user->ban(['comment' => $input->reason, 'expired_at' => Carbon::parse($input->eind_datum)]);\n flash(\"{$user->name} is geblokkeerd tot {$input->end_date}.\")->success();\n\n return redirect()->route('users.index');\n }",
"public function blockUser($messageId) {\n $res = parent::put('message/block?messageID=' . $messageId, $this->auth_token);\n\n if ($res === false) {\n return false;\n }\n\n return $res->status;\n }",
"public function closeUser()\n {\n $this->isUser = false;\n }",
"public function testBlocking()\n {\n $this->module->enableBlockingEmail = true;\n\n $this->specify(\"we have block user\", function () {\n /** @var User $user */\n //$user = $this->getFixture('user')->getModel('active');\n $user = $this->tester->grabFixture('users', 'active');\n expect(\"we can block user\", $user->block())->true();\n $this->tester->seeEmailIsSent();\n });\n\n $this->specify(\"we have block already blocked user\", function () {\n /** @var User $user */\n $user = $this->tester->grabFixture('users', 'blocked');\n expect(\"we can't block already blocked user\", $user->block())->false();\n });\n\n $this->specify(\"we have block unconfirmed user\", function () {\n /** @var User $user */\n $user = $this->tester->grabFixture('users', 'unconfirmed');\n expect(\"we can't block unconfirmed user\", $user->block())->false();\n });\n\n $this->module->enableUnblockingEmail = true;\n $this->specify(\"we have unblock blocked user\", function () {\n /** @var User $user */\n $user = $this->tester->grabFixture('users', 'blocked');\n expect(\"we can unblock blocked user\", $user->unblock())->true();\n $this->tester->seeEmailIsSent();\n });\n\n $this->specify(\"we have unblock not blocked user\", function () {\n /** @var User $user */\n $user = $this->tester->grabFixture('users', 'unconfirmed');\n expect(\"we can't unblock not blocked user\", $user->unblock())->false();\n $this->tester->dontSeeEmailIsSent();\n });\n\n $this->specify(\"we have unblock user override mail setting\", function () {\n /** @var User $user */\n $user = $this->tester->grabFixture('users', 'active');\n expect(\"we can unblock user\", $user->unblock(false))->true();\n $this->tester->dontSeeEmailIsSent();\n });\n\n $this->specify(\"we have block user override global email setting\", function () {\n /** @var User $user */\n $user = $this->tester->grabFixture('users', 'active');\n expect(\"we can block user\", $user->block(false))->true();\n $this->tester->dontSeeEmailIsSent();\n });\n }",
"protected function authorizeBlock()\n {\n try {\n $select = $this->db->select();\n $select->from('gems__user_login_attempts', array('UNIX_TIMESTAMP(gula_block_until) - UNIX_TIMESTAMP() AS wait'))\n ->where('gula_block_until is not null')\n ->where('gula_login = ?', $this->getLoginName())\n ->where('gula_id_organization = ?', $this->getCurrentOrganizationId())\n ->limit(1);\n\n // Not the first login\n if ($block = $this->db->fetchOne($select)) {\n if ($block > 0) {\n $minutes = intval($block / 60) + 1;\n\n // Report all is not well\n return sprintf($this->plural('Your account is temporarily blocked, please wait a minute.', 'Your account is temporarily blocked, please wait %d minutes.', $minutes), $minutes);\n\n } else {\n // Clean the block once it's past\n $values['gula_failed_logins'] = 0;\n $values['gula_last_failed'] = null;\n $values['gula_block_until'] = null;\n $where = $this->db->quoteInto('gula_login = ? AND ', $this->getLoginName());\n $where .= $this->db->quoteInto('gula_id_organization = ?', $this->getCurrentOrganizationId());\n\n $this->db->update('gems__user_login_attempts', $values, $where);\n }\n }\n\n } catch (\\Zend_Db_Exception $e) {\n // Fall through as this does not work if the database upgrade did not run\n // \\MUtil_Echo::r($e);\n }\n\n return true;\n }",
"public function unblock($userId): Response\n {\n $user = $this->usersRepository->find($userId);\n\n switch ($user) { // Determine the status from the given user.\n case ($user->isBanned()):\n $user->unban(); // Unban the user in the system\n flash('De gebruiker is terug geactiveerd')->success();\n break;\n case ($user->isNotBanned()):\n // User is not banned. Could not perform any action.\n flash('Wij konden de gebruiker niet activeren.')->warning();\n break;\n }\n\n return redirect()->route('users.index');\n }",
"public function bloquearUsuario() {\n\t\t$this->id_status = self::STATUS_BLOCKED;\n\t\treturn $this->save () ? $this : null;\n\t}",
"function users_user_usersblock()\n{\n $blocks = pnModAPIFunc('Blocks', 'user', 'getall');\n $mid = pnModGetIDFromName('Users');\n $found = false;\n foreach ($blocks as $block) {\n if ($block['mid'] == $mid && $block['bkey'] == 'user') {\n $found = true;\n break;\n }\n }\n\n if (!$found) {\n return LogUtil::registerPermissionError();\n }\n\n $pnRender = & pnRender::getInstance('Users');\n $pnRender->assign(pnUserGetVars(pnUserGetVar('uid')));\n return $pnRender->fetch('users_user_usersblock.htm');\n}",
"public static function onBlockIpComplete( Block $block, User $user ) {\n global $wgWebhooksBlockedUser;\n if (!$wgWebhooksBlockedUser) {\n return;\n }\n\n self::sendMessage('BlockedUser', [\n 'user' => (string) ($block->getTarget()),\n 'operator' => (string) $user\n ]);\n }",
"public function suspend_user(User $user){\n //If the user is active suspend them if not reinstate them\n if ($user->active == 1) {\n $user->active = 0;\n $user->save();\n session()->flash('status', $user->username . ' was successfully suspended');\n return redirect()->back();\n }\n $user->active = 1;\n $user->save();\n session()->flash('status', $user->username . ' was successfully reinstated');\n return redirect()->back();\n }",
"public function unblock($id) {\n\t\t//Argument 1 must be a string, integer\n\t\tEden_Twitter_Error::i()->argument(1, 'string', 'int');\t\n\t\t\n\t\t//if it is integer\n\t\tif(is_int($id)) {\n\t\t\t//lets put it in our query\n\t\t\t$this->_query['user_id'] = $id;\n\t\t//else it is string\n\t\t} else {\n\t\t\t//lets put it in our query\n\t\t\t$this->_query['screen_name'] = $id;\n\t\t}\n\t\t\n\t\treturn $this->_post(self::URL_REMOVE_BLOCKING, $this->_query);\n\t}",
"function unblock(Request $request)\n {\n DB::table('users')\n ->where('id', $request->id)\n ->update([\n 'active' => '1',\n ]);\n\n //insert into auditrail\n AuditTrail::create(['user_id' => Auth::user()->id,\n 'username' => Auth::user()->username,\n 'form_name' => 'Account',\n 'activity' => 'Unlocked ' . 'Account ' . $request->username, \n ]);\n\n return redirect()->back();\n }",
"function deactivateUser()\n {\n // Sets the value of activated to no\n $int = 0;\n\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"UPDATE User SET\n \t\t\tactiveUser = ?\n \t\t\t\tWHERE ID = ?\"))\n ) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n\n if (!($stmt->bind_param(\"ii\",\n $int,\n $this->id))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n }",
"public function ban(User $user, User $model)\n {\n return $user->isAllowedTo(\"update.user.{$model->id}\");\n }",
"public function isBlockable()\n {\n if ($this->_hasVar('user_blockable')) {\n return (boolean) $this->_getVar('user_blockable');\n } else {\n return true;\n }\n }",
"public function block_user(Request $request) {\n\n try {\n\n DB::beginTransaction();\n\n $validator = Validator::make(\n $request->all(),\n array(\n 'blocker_id'=>'required|exists:users,id',\n ));\n\n if ($validator->fails()) {\n // Error messages added in response for debugging\n $errors = implode(',',$validator->messages()->all());\n\n throw new Exception($errors, 101);\n\n } else {\n\n if($request->blocker_id != $request->id) {\n\n $model = BlockList::where('user_id', $request->id)\n ->where('block_user_id', $request->blocker_id)->first();\n\n if (!$model) {\n\n $model = new BlockList;\n\n $model->user_id = $request->id;\n\n $model->block_user_id = $request->blocker_id;\n\n $model->status = DEFAULT_TRUE;\n\n if ($model->save()) {\n\n\n $response_array = ['success'=>true, 'message'=> Helper::get_message(124)];\n\n } else {\n\n throw new Exception(tr('add_block_user'));\n \n }\n\n } else {\n\n throw new Exception(Helper::error_message(153), 153);\n\n }\n\n } else {\n\n throw new Exception(Helper::error_message(155), 155);\n\n }\n }\n\n DB::commit();\n\n return response()->json($response_array, 200);\n\n }catch(Exception $e) {\n\n DB::rollback();\n\n $message = $e->getMessage();\n\n $code = $e->getCode();\n\n $response_array = ['success'=>false, 'error_messages'=>$message, 'error_code'=>$code];\n\n return response()->json($response_array);\n\n }\n\n }",
"public function unblockCYTUser($id) { \n\t\t\n\t\t$oUser = $this->getObjectByCode($id);\n\t\t\n\t\t//reseteamos los attemps.\n\t\t$oUser->setNu_attemps(0);\n\t\t\n\t\t//generamos una nueva password.\n\t\t$newPassword = CdtUtils::textoRadom(8) ;\n\t\t$oUser->setDs_password ( md5( $newPassword ) );\n\t\t\t\t\n\t\t$this->update($oUser, false);\n\t\t\n\t\t//enviamos el email con la nueva contrase�a.\n\t\t$to = $oUser->getDs_email();\n\t\t$nameTo = $oUser->getDs_name();\n\t\tif(!empty($namteTo))\n\t\t\t$nameTo = str_replace(\",\",\"\", $namteTo);\n\t\telse\t\n\t\t\t$nameTo = $oUser->getDs_username();\n\t\t\t\n\t\t$xtpl = new XTemplate( CDT_SECURE_TEMPLATE_MAIL_FORGOT_PASSWORD);\n\t\t$xtpl->assign('name', $nameTo);\n\t\t$xtpl->assign('password', $newPassword);\n\t\t$xtpl->parse('main');\t\t\n\t\t$msg = $xtpl->text('main');\n\t\t\n if(empty($subject))\n \t$subject = CDT_SECURE_MSG_FORGOT_PASSWORD_MAIL_SUBJECT;\n \n\t\tCYTSecureUtils::sendMail($nameTo, $to, $subject, $msg);\n\t\t\n\t\t\n\t}",
"public function suspend_user(){\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$uid = html_escape($this->input->post('userID'));\n\t\t\t$id = preg_replace('#[^0-9]#i', '', $uid); // filter everything but numbers\n\n\t\t\t$detail = $this->db->select('*')->from('users')->where('id',$id)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\n\t\t\t\t\t//$data['id'] = $detail->id;\n\t\t\t\t\t$update = array(\n\t\t\t\t\t\t'status' => '1',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif($this->Users->update_user($update, $id)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button> User has been suspended!</div>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button> Method error</div>';\n\t\t\t\t\t}\n\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button> No such user!</div>';\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}",
"public function blocked(){\n\t\t$data['user'] = $this->db->get_where('users', ['email' => $this->session->userdata('email')])->row_array();\n\t\t$data['title'] = \"BLOCKED\";\n\t\t$this->load->view('maintemplate/header', $data);\n\t\t$this->load->view('maintemplate/sidebar', $data);\n\t\t$this->load->view('maintemplate/topbar', $data);\n\t\t$this->load->view('home/blocked');\n\t\t$this->load->view('maintemplate/footer');\n\t}",
"public function toggleUserLock($userid) {\n\t\t$adminModel = $this->loadModel('admin');\n\t\t$user = $adminModel->getUser($userid);\n\t\tif ($user->user_status == 1) {\n\t\t\t$adminModel->setUserStatus($userid, 2);\n\t\t} elseif ($user->user_status == 2) {\n\t\t\t$adminModel->setUserStatus($userid, 1);\n\t\t}\n\t\theader('Location: '.URL.'admin/users');\n\t}",
"public function disable($user_id = 0)\n {\n header('Content-Type: application/json'); //set response type to be json\n admin_session_check();\n if(!$user_id) show_404();\n $user = $this->users_model->get_record($user_id);\n if(!isset($user->user_id))\n {\n $ajax_response = array('type' => AJAX_RESPONSE_TYPE_ERROR, 'message' => get_alert_html($this->lang->line('error_invalid_request'), ALERT_TYPE_ERROR));\n echo json_encode($ajax_response);\n exit();\n }\n if($user->user_id == $this->session->userdata('user_id'))\n {\n $ajax_response = array('type' => AJAX_RESPONSE_TYPE_ERROR, 'message' => get_alert_html($this->lang->line('error_disable_self'), ALERT_TYPE_ERROR));\n echo json_encode($ajax_response);\n exit();\n }\n $this->users_model->update_user_status($user_id, USER_STATUS_INACTIVE);\n $ajax_response = array('type' => AJAX_RESPONSE_TYPE_SUCCESS, 'message' => get_alert_html($this->lang->line('success_user_disabled'), ALERT_TYPE_SUCCESS));\n echo json_encode($ajax_response);\n }",
"function unblock_process($blocker) {\n set_field('block_courseprefs_config', 'value', 'DONE', 'name', $blocker);\n}",
"public function suspendUser($user_id)\n\t{\n\t\tif($this->getUserStatusId($user_id) === 1)\n\t\t{\n\t\t\t$this->where('id', '=', $user_id)->update(['user_status' => 2]);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function ban_user($reason, $duration, $user_id) {\n\tif(!set_user_role(ROLE_BANNED, $user_id)) {\n\t\treturn false;\n\t}\n\tadd_ban_details($reason, $duration, $user_id);\n\n\treturn true;\n}",
"public function blockHandle(Request $request) \n {\n // Check parameter\n $ID = $request->get('ID', false);\n \n if (!$ID)\n {\n return App::abort(404);\n }\n\n // Check promotor\n $promotor = $this->promotor->getOne($ID);\n \n if (!$promotor)\n {\n return App::abort(404);\n }\n\n // Get promotor meta data\n $promotor_meta = $this->promotor_meta->get($ID, 'block');\n \n // Set default action log and flash message\n if(!$promotor_meta)\n {\n $this->promotor_meta->set($ID, 'block', 'block');\n \n $flash = 'promotor-block';\n $action = 'Block promotor (ID:'.$ID.')';\n }\n else\n {\n $this->promotor_meta->remove($ID, 'block');\n\n $flash = 'promotor-unblock';\n $action = 'Unblock promotor (ID:'.$ID.')';\n }\n \n // Log request\n $this->log->record($request->userID, $action);\n\n // Set session and redirect\n $request->session()->flash($flash, '');\n return back();\n }",
"public function disable(User $user){\n return $this->respond($user->disable());\n }",
"function approve_block_more_users($users_id, $users_type){\n\t\tif( isset($_POST[$users_id]) ){\n\t\t\tglobal $base;\n\t\t\t\n\t\t\tuser::users_manipulation($_POST[$users_id], $_POST[$users_type]);\n\t\t\tredirect('../../master_admin.php');\n\t\t}\n\n\t}",
"public function unblock_user(Request $request) {\n\n try {\n\n DB::beginTransaction();\n\n $validator = Validator::make(\n $request->all(),\n array(\n 'blocker_id'=>'required|exists:users,id',\n ));\n\n if ($validator->fails()) {\n // Error messages added in response for debugging\n $errors = implode(',',$validator->messages()->all());\n\n throw new Exception($errors, 150);\n\n } else {\n\n $model = BlockList::where('block_user_id', $request->blocker_id)\n ->where('user_id', $request->id)->first();\n\n if ($model) {\n\n if ($model->delete()) {\n\n $blocked_user = User::find($request->blocker_id);\n\n $no_of_followers = Follower::where('user_id', $request->blocker_id)->count();\n\n $data = [\n 'id' => $request->id,\n 'name' => $blocked_user->name,\n 'email' => $blocked_user->email,\n 'picture' => $blocked_user->picture,\n 'description' => $blocked_user->description, \n 'follower_id' => $blocked_user->id,\n 'status' => DEFAULT_FALSE,\n 'is_block' => DEFAULT_FALSE,\n 'no_of_followers'=>$no_of_followers ? $no_of_followers : 0\n ];\n\n $response_array = ['success'=>true, 'message'=> Helper::get_message(125), 'data'=>$data];\n\n } else {\n\n throw new Exception(tr('cound_not_unblock'));\n \n }\n\n } else {\n\n throw new Exception(Helper::error_message(150), 150);\n\n }\n\n }\n\n DB::commit();\n\n return response()->json($response_array, 200);\n\n } catch (Exception $e) {\n\n DB::rollback();\n\n $message = $e->getMessage();\n\n $code = $e->getCode();\n\n $response_array = ['success'=>false, 'error_messages'=>$message, 'error_code'=>$code];\n\n return response()->json($response_array);\n\n }\n\n }",
"protected function _blockAccess()\n\t{\n\t\t// Set the task\n\t\t$this->_task = 'block';\n\n\t\t// Set page title\n\t\t$this->_buildTitle();\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Instantiate a new view\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$this->_msg = Lang::txt('COM_PUBLICATIONS_PRIVATE_PUB_LOGIN');\n\t\t\treturn $this->_login();\n\t\t}\n\n\t\tNotify::error(Lang::txt('COM_PUBLICATIONS_RESOURCE_NO_ACCESS'));\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option, false)\n\t\t);\n\t}",
"public function lockAndBlock()\n {\n $this->lock();\n }",
"public function ajax_unblock_one() {\n\n $response = array();\n $object_id = json_decode($this->input->post(\"id\"));\n\n // request for approval if not super admin\n if ($this->session->userdata(\"role\") != USER_SUPER_ADMIN) {\n\n // make notification for seatizen block operation.\n\n // request for unblock this seatizen. (flag: not followed up yet)\n $notification = array(\n \"source\" => $this->session->userdata(\"id\"),\n \"destination\" => NULL,\n \"type\" => NOTIF_UNBLOCK_SEATIZEN,\n \"target\" => $object_id,\n \"status\" => false // haven't followed up yet\n );\n\n $this->generic->create($this->_notification_table, $notification);\n\n $response[\"status\"] = \"success\";\n $response[\"notification\"] = \"Seatizen unblock is waiting for super admin approval.\";\n\n } else {\n // arrange unblock configuration\n $result = $this->unblock($object_id);\n\n if ($result) {\n $response[\"status\"] = \"success\";\n $response[\"notification\"] = \"One item has been unblocked.\";\n } else {\n $response[\"status\"] = \"error\";\n $response[\"notification\"] = \"Cannot unblock item\";\n }\n }\n\n $this->output->set_content_type(\"application/json\");\n $this->output->set_status_header(200);\n $this->output->set_output(json_encode($response));\n }",
"protected function unlock($user)\n {\n $newPass = bin2hex(random_bytes(6));\n $this->users->unlock(['id' => $user->getId(), 'pass' => $this->password->hash($newPass)]);\n $this->mail->send($this->mail->unlock($user, $newPass));\n }",
"public function block_request($uri)\n {\n }",
"public function bloquearUsuario() {\n $valor=1;\n if($this->input->post(\"lock\")==1){\n $valor=0;\n }\n \n $this->db->where('usuario', $this->input->post(\"usuario\"));\n $data_table = array(\n 'status' => $valor,\n 'status_a' => $valor\n );\n $this->db->update('usuarios', $data_table);\n return \"true\";\n }",
"public function toggleblock()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Blocks::', '::', ACCESS_ADMIN));\n\n $bid = $this->request->getPost()->get('bid', -1);\n\n if ($bid == -1) {\n throw new Zikula_Exception_Fatal($this->__('No block ID passed.'));\n }\n\n // read the block information\n $blockinfo = BlockUtil::getBlockInfo($bid);\n if ($blockinfo == false) {\n throw new Zikula_Exception_Fatal($this->__f('Error! Could not retrieve block information for block ID %s.', DataUtil::formatForDisplay($bid)));\n }\n\n if ($blockinfo['active'] == 1) {\n ModUtil::apiFunc('Blocks', 'admin', 'deactivate', array('bid' => $bid));\n } else {\n ModUtil::apiFunc('Blocks', 'admin', 'activate', array('bid' => $bid));\n }\n\n return new Zikula_Response_Ajax(array('bid' => $bid));\n }",
"public function emailUser () {\n\t\t\t// Load the data helper class and get user instance\n\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t$user = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t// Load the authentication model that belongs with logged in user\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $user->getUserId () );\n\t\t\t$auth->setId ( $user->getUserId () );\n\t\t\t// Construct the user contact's full name\n\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t// Format timestamp date and time\n\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t$timestampDate = \"-\";\n\t\t\t$timestampTime = \"-\";\n\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Construct and send out ban notice email to user\n\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_user\");\n\t\t\t$template->setSenderEmail ( Mage::getStoreConfig (\"trans_email/ident_general/email\") );\n\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t$template->setType (\"html\");\n\t\t\t$template->setTemplateSubject (\n\t\t\t\tMage::helper (\"twofactor\")->__(\"Your Magento admin account is locked\")\n\t\t\t);\n\t\t\t$template->send ( $user->getEmail (), $fullName,\n\t\t\t\tarray (\n\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\"username\" => $user->getUsername (),\n\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }",
"public static function banUser($event, $type, $user) {\n\t\t\n\t\tif (!($user instanceof \\ElggUser)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// remove user from index\n\t\tself::deleteEntity($user);\n\t\t\n\t\t// remove indexed ts, so when unbanned it will get indexed automatically\n\t\t$user->removePrivateSetting(ELASTICSEARCH_INDEXED_NAME);\n\t}",
"public function users_register_check_blocked($h)\n {\n $this->ssType = $h->getSetting('stop_spam_type');\n \n // get user info:\n //$username = $h->currentUser->name;\n $username = ''; // dont check on username as it is too narrow a filter\n $email = $h->currentUser->email;\n $ip = $h->cage->server->testIp('REMOTE_ADDR');\n \n // If any variable is empty or the IP is \"localhost\", skip using this plugin.\n if (!$email || !$ip || ($ip == '127.0.0.1')) { return false; }\n\n // Include our StopSpam class:\n require_once(PLUGINS . 'stop_spam/libs/StopSpam.php');\n $spam = new StopSpamFunctions();\n \n $json = $spam->checkSpammers($username, $email, $ip); \n $flags = $spam->flagSpam($h, $json);\n \n if ($flags) { \n // store flags - used when type is \"go_pending\"\n $h->vars['reg_flags'] = $flags;\n \n // if type is \"block_reg\", provide a way to tell the Users plugin:\n if ($this->ssType == 'block_reg') {\n $h->vars['block'] = true;\n }\n } \n else \n {\n // safe user, do nothing...\n }\n\n }",
"function unlockAccount($userid){\n $query = \"UPDATE users_account SET status ='Active' WHERE userid = ?\";\n $paramType = \"i\";\n $paramValue = array(\n $userid\n );\n $this->db_handle->update($query, $paramType, $paramValue);\n }",
"public function setIsBlocked($bool);",
"function lockout($username = \"\") {\n\t\tglobal $wpdb;\n\n\t\t$ip = $this->get_user_ip();;\n\n\t\t$username = sanitize_user($username);\n\n\t\t$user = get_user_by( 'login', $username );\n\n\t\tif ( !$user ) { \n\t\t\t$user = new stdClass();\n\t\t\t$user->ID = 0;\n\t\t}\n\n\t\t$sql = \"insert into \" . $this->lock_table . \" (user_id, lockdown_date, release_date, lockdown_IP) \" .\n\t\t\t \"values ('\" . $user->ID . \"', NOW(), date_add( NOW(), interval \" .\n\t\t\t $this->ll_options['lockout_length'] . \" MINUTE), '\" . $wpdb->escape($ip) . \"')\";\n\n\t\t$wpdb->query($sql);\n\n\t\tif ( 'yes' == $this->ll_options['notify_admins'] )\n\t\t\t$this->ll_notify_admins( $ip, $username );\n\n\t}",
"public function banned()\n {\n $userId = request()->user;\n $user = User::find($userId);\n if ($user->isNotBanned()) {\n $user->ban();\n } else {\n $user->unban();\n }\n return redirect()->route('users.index', [\n 'user' => $user\n ]);\n }",
"public function procBanUser() {//IF time permits, re-implement using new User classes\r\n global $session;\r\n\n /* Username error checking */\n $field = \"banuser\"; //Use the field for username\r\n $subuser = $this->_checkUsername($field);\r\n\n if($subuser == $session->user->username) { /* Make sure no one tries and ban themselves */\n $session->form->setError($field, \"* You can't ban yourself!<br />\");\n }\n\r\n if($session->form->num_errors > 0) { /* Errors exist, have user correct them */\n $_SESSION['value_array'] = $_POST;\r\n $_SESSION['error_array'] = $session->form->getErrorArray();\r\n } else { /* Ban user from member system */\r\n \t$uid = $session->database->getUID($subuser);\n $session->database->removeUser($uid, DB_TBL_ADMINS);\r\n $session->database->removeUser($uid, DB_TBL_TELLERS);\r\n $session->database->removeUser($uid, DB_TBL_CUSTOMERS);\r\n\r\n $q = \"INSERT INTO \".DB_TBL_BANNED_USERS.\" VALUES ('$subuser', $session->time)\";\r\n $session->database->query($q);\n }\n header(\"Location: \".$session->referrer);\r\n }",
"function _deactivate_user() {\n\t\t$sql=\"SELECT GROUP_CONCAT(id_user) as id FROM \".TABLE_PREFIX.\"user WHERE DATEDIFF(current_date(),last_login) = \".$this->_input['day'].\" AND id_admin <> 1 \";\n\t\t$ids= getsingleindexrow($sql);\n\t\tif($this->_input['day'] && $this->_input[\"flag\"] == 1){\n\t\t if($ids['id']!=\"\"){\n\t\t\t $arr['user_status']=0;\n\t\t\t $this->obj_user->update_this(\"user\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"meme\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"reply\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"caption\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t print \"Succesfully Done\";\n\t\t }else{\n\t\t\t print \"No user found\";\n\t\t\t exit;\n\t\t }\n\t\t }else{\n\t\t if($ids['id']!=\"\"){\n\t\t\t $arr=explode(\",\", $ids['id']);\n\t\t\t for($x=0;$x<count($arr);$x++){\n\t\t\t $del=$this->unlink_files($arr[$x]);\n\t\t\t }\n\t\t\t $this->obj_user->deleteuser($ids['id']);\n\t\t }\n\t\t}\n\t}",
"public function ban(User $mod, User $user) {\n return $mod->getLastStatus()->status == 'moderator' && \n $user->getLastStatus()->status != 'moderator' && \n $user->getLastStatus()->status != 'banned';\n }",
"public static function block($id, $blocking_id){\n if(!Auth::check() || !(Auth::user()->id == $id)) return 1;\n if($id === $blocking_id) return 2;\n return 0;\n }",
"function bloqueosCambiar(){\n global $tsCore, $tsUser;\n //\n $auser = $tsCore->setSecure($_POST['user']);\n $bloquear = empty($_POST['bloquear']) ? 0 : 1;\n // EXISTE?\n $exists = $tsUser->getUserName($auser);\n // SI EXISTE Y NO SOY YO\n if($exists && $tsUser->uid != $auser){\n if($bloquear == 1){\n // YA BLOQUEADO?\n $query = $this->select(\"u_bloqueos\",\"bid\",\"b_user = {$tsUser->uid} AND b_auser = {$auser}\",\"\",1);\n $noexists = $this->num_rows($query);\n $this->free($query);\n // NO HA SIDO BLOQUEADO\n if(empty($noexists)) {\n if($this->insert(\"u_bloqueos\",\"b_user, b_auser\",\"{$tsUser->uid}, {$auser}\"))\n return \"1: El usuario fue bloqueado satisfactoriamente.\"; \n } else return '0: Ya has bloqueado a este usuario.';\n // \n } else{\n if($this->delete(\"u_bloqueos\",\"b_user = {$tsUser->uid} AND b_auser = {$auser}\"))\n return \"1: El usuario fue desbloqueado satisfactoriamente.\";\n } \n } else return '0: El usuario seleccionado no existe.';\n }",
"function ban_user($id_auteur)\n{\n\t$user_ip = (isset($HTTP_SERVER_VARS['REMOTE_ADDR'])) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR');\n\n\tif (empty($id_auteur)) return;\n\n\t// On le recherche\n\t$is_spammer = sql_fetsel('id_auteur', 'spip_auteurs_spipbb', \"id_auteur=$id_auteur\");\n\t$infos = sql_fetsel('login, email', 'spip_auteurs', \"id_auteur=$id_auteur\");\n\n\tif (is_array($is_spammer) and !empty($is_spammer['id_auteur']) and $is_spammer['user_spam_warnings'] > $GLOBALS['spipbb']['sw_nb_spam_ban'] ) // parametrage\n\t{\n\t\t@sql_updateq('spip_auteurs_spipbb', array(\n\t\t\t\t\t'ip_auteur' => $user_ip,\n\t\t\t\t\t'ban' => 'oui'\n\t\t\t\t\t\t\t),\n\t\t\t\t\"id_auteur=$id_auteur\");\n\t\t$login = $infos['login'];\n\t\t$email = $infos['email'];\n\t\t@sql_insertq('spip_ban_liste', array(\n\t\t\t\t\t'ban_ip' => $user_ip,\n\t\t\t\t\t'ban_login' => $login,\n\t\t\t\t\t'ban_email' => $email,\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t}\n}",
"private function deactivateUser($conn){\n\t\t\t$postdata = file_get_contents(\"php://input\");\n\t\t\t$request = json_decode($postdata);\n\t\t\t$user_id = $request->user_id; \n\t\t\tif($user_id > 0){\n\t\t\t\t$query = 'Update users set user_status = 1 WHERE user_id = '.$user_id;\t\t\t\n\t\t\t\t$sql = $conn->query($query); \n\t\t\t\t$query2 = 'SELECT playlist_id FROM playlist where user_id = '.$user_id;\n\t\t\t\t$sql2 = $conn->query($query2);\n\t\t\t\tif($sql2->num_rows > 0){\n\t\t\t\t\t$result = $sql2->fetch_assoc();\n\t\t\t\t\t$query3 = 'Update playlist set playlist_status = 1 WHERE playlist_id = '.$result['playlist_id'];\t\t\t\n\t\t\t\t\t$sql3 = $conn->query($query3);\n\t\t\t\t\t$query4 = 'Update rel_playlist_tracks set rel_playlist_tracks_status = 1 WHERE playlist_id = '.$result['playlist_id'];\n\t\t\t\t\t$sql4 = $conn->query($query4); \n\t\t\t\t\t$this->response('',200);\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$this->response('',204);\n\t\t\t\t\n\t\t\t}else\n\t\t\t\t$this->response('',204); \n\t\t}",
"function wp_block_non_paying_users()\n{\n //get current date\n $today = date(\"Ymd\");\n\n //specific role\n $specific_role = 'customer';\n\n //get specific role \n $users = get_users(['role__in' => [$specific_role]]);\n\n $initial_date = '2020-01-01';\n $final_date = '2020-12-31';\n $initial_date = date('Ymd', strtotime($initial_date));\n $final_date = date('Ymd', strtotime($final_date));\n\n //default in (New User Approve) plugin - URL: https://br.wordpress.org/plugins/new-user-approve/\n $status = 'deny';\n\n //checks if it has passed the date of the end of the event\n if ($today > $final_date) {\n\n foreach ($users as $user) {\n\n //get user registered date\n $date_user = $user->user_registered;\n $registrado = date('Ymd', strtotime($date_user));\n\n //checks whether the User Registration was during the current sales period\n if ($registrado >= $initial_date && $registrado <= $final_date) {\n\n //get orders completed and processing - Complete list: pending, processing, on-hold, completed, cancelled, refunded, failed\n $args = array(\n 'customer_id' => $user->ID,\n 'post_status' => array('completed', 'processing')\n );\n\n $orders = wc_get_orders($args); //get order list by current user\n\n if (count($orders) < 1) {\n\n //get status - require plugin (New User Approve) - URL: https://br.wordpress.org/plugins/new-user-approve/\n $do_update = apply_filters(\n 'new_user_approve_validate_status_update',\n true,\n $user->ID,\n $status\n );\n //checks if user is block\n if ($do_update) {\n do_action('new_user_approve_' . $status . '_user', $user->ID);\n do_action('new_user_approve_user_status_update', $user->ID, $status);\n //blocked users - require plugin (New User Approve) - URL: https://br.wordpress.org/plugins/new-user-approve/\n }\n }\n }\n }\n }\n}",
"public function cookieStealBlock(bool $ban = false) {\n\t\tif (isset($_SESSION)) {\n if (!isset($_SESSION['CloudFirewall-Client-IP'])) {\n $_SESSION['CloudFirewall-Client-IP'] = $this->getIP();\n } else {\n if ($_SESSION['CloudFirewall-Client-IP'] != $this->getIP()) {\n if($ban) {\n $this->createAccessRule($this->getIP(), 'block');\n }\n session_destroy();\n self::abort(403, 'Cookie Stealing Detected');\n }\n }\n }\n }",
"function procBanUser(){\r\n\t\t\tglobal $session, $database, $form;\r\n\t\t\t/* Username error checking */\r\n\t\t\t$subuser = $this->checkUsername(\"banuser\");\r\n\t\t\t\r\n\t\t\t/* Errors exist, have user correct them */\r\n\t\t\tif($form->num_errors > 0){\r\n\t\t\t\t$_SESSION['value_array'] = $_POST;\r\n\t\t\t\t$_SESSION['error_array'] = $form->getErrorArray();\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t\t/* Ban user from member system */\r\n\t\t\telse{\r\n\t\t\t\t$q = \"DELETE FROM \".TBL_USERS.\" WHERE username = '$subuser'\";\r\n\t\t\t\t$database->query($q);\r\n\t\t\t\t\r\n\t\t\t\t$q = \"INSERT INTO \".TBL_BANNED_USERS.\" VALUES ('$subuser', $session->time)\";\r\n\t\t\t\t$database->query($q);\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t}",
"public function inactiveUser($user_id)\r\n\t{\r\n\t\t$data=array('status'=>0);\r\n\t\t$where=$this->getAdapter()->quoteInto('user_id=?',$user_id);\r\n\t\t$this->update($data,$where);\r\n\t}",
"function block_atu()\n{\n\tglobal $mybb,$pid;\n\tif(isset($mybb->input['ajax']))\n\t{\n\t\tmy_setcookie(\"ignore_\".$pid,TIME_NOW+6);\n\t}\n}",
"public function unban(User $mod, User $user) {\n return $mod->getLastStatus()->status == 'moderator' && \n $user->getLastStatus()->status == 'banned';\n }",
"public function disable_user() \n {\n $conn = $this->conn;\n $login = $this->login;\n \n $params = array($login);\n $query = \"UPDATE users SET enabled = -1 WHERE login = ?\";\n \n $rs = $conn->Execute($query, $params);\n \n if (!$rs) \n { \n return FALSE;\n }\n \n $infolog = array($login);\n Log_action::log(93, $infolog);\n \n return TRUE;\n }",
"public function blockedUser(UserFloodEvent $floodEvent) {\n if (Settings::get('log_user_flood', TRUE)) {\n $uid = $floodEvent->getUid();\n if ($floodEvent->hasIp()) {\n $ip = $floodEvent->getIp();\n $this->logger->notice('Flood control blocked login attempt for uid %uid from %ip', ['%uid' => $uid, '%ip' => $ip]);\n return;\n }\n $this->logger->notice('Flood control blocked login attempt for uid %uid', ['%uid' => $uid]);\n }\n }",
"public function admin_import() {\n\t\t\t$all = $this->User->find('all', [\n\t\t\t\t'contain' => false,\n\t\t\t\t'conditions' => [\n\t\t\t\t\t'User.user_lock' => true\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\tif (empty($all)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//= get all new blocked users\n\t\t\t$newBlocks = $this->User->UserBlock->getAllActive();\n\t\t\t$new = [];\n\t\t\tforeach ($newBlocks as $block) {\n\t\t\t\t$userId = (int)$block['UserBlock']['user_id'];\n\t\t\t\t$new[$userId] = $userId;\n\t\t\t}\n\n\t\t\t//= compare\n\t\t\t$toUpdate = [];\n\t\t\tforeach ($all as $user) {\n\t\t\t\t$userId = (int)$user['User']['id'];\n\t\t\t\tif (isset($new[$userId])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$toUpdate[$userId] = $user['User'];\n\t\t\t}\n\n\t\t\t//= action\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\ttry {\n\t\t\t\t\tforeach ($toUpdate as $key => $user) {\n\t\t\t\t\t\t$this->User->UserBlock->block(\n\t\t\t\t\t\t\tnew \\Saito\\User\\Blocker\\ManualBlocker,\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t['adminId' => $this->CurrentUser->getId()]\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunset($toUpdate[$key]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->JsData->addAppJsMessage('Success', ['element' => 'flash/render', 'type' => 'success']);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$this->JsData->addAppJsMessage('Error while importing.', ['element' => 'flash/render', 'type' => 'success']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->set(compact('toUpdate'));\n\t\t}",
"public function openUser()\n {\n $this->isUser = true;\n }",
"function terminateUser($uid, $rid, $ban = false){\nglobal $time, $AragornCache;\n\tif ($ban && isset($AragornCache)) {\n\t\t$AragornCache->delVal(\"chat-room-\".$rid.\":users-\".$uid);\n\t}\n\telseif (isset($AragornCache)) {\n\t\t$cachedVal = $AragornCache->getVal(\"chat-room-\".$rid.\":users-\".$uid);\n\t\tif ($cachedVal !== false && $cachedVal['odesel'] != 1) {\n\t\t\t$cachedVal['odesel'] = 1;\n\t\t\t$cachedVal['timestamp'] = $time;\n\t\t\t$AragornCache->replaceVal(\"chat-room-\".$rid.\":users-\".$uid, $cachedVal, 120);\n\t\t}\n\t}\n\tmysql_query (\"UPDATE 3_chat_users SET odesel = '1', timestamp = '$time' WHERE uid = $uid AND rid = $rid AND odesel='0'\");\n\treturn mysql_affected_rows();\n}",
"public function blockunblockusercomments($type = \"\", $commentsid = \"\")\n {\n $status = 0;\n if($type == 1){\n $status = 1;\n }\n $result = $this->db->update(\"discussion\", array(\"discussion_status\" => $status), array(\"discussion_id\" => $commentsid));\n return count($result);\n }",
"public function blockunblockusercomments($type = \"\", $commentsid = \"\")\n {\n $status = 0;\n if($type == 1){\n $status = 1;\n }\n $result = $this->db->update(\"discussion\", array(\"discussion_status\" => $status), array(\"discussion_id\" => $commentsid));\n return count($result);\n }",
"public function ban();",
"public function disable_reservation_user() {\n $query = 'UPDATE reservations ';\n $query .= 'SET state_id = 3 ';\n $query .= 'WHERE state_id IN (1,2) ';\n $query .= 'AND user_id=' . $this->id;\n\n $connection = get_connection();\n $query_result = $connection->query($query);\n\n $connection->close();\n\n return $query_result;\n }",
"public static function blockFriend($friendUserID)\n {\n if(!Friends::isBlocked($friendUserID))\n return;\n\n if(Friends::isRelationExists($friendUserID))\n $relation = Friends::relation($friendUserID)->first();\n else\n $relation = new Friends();\n\n $relation->addUsers(UserUtil::getUsersIdElseLoggedInUsersId(), $friendUserID);\n\n $relation->setStatus(3);\n\n $relation->save();\n }",
"function cancel_user($user_id, $password) {\n global $sql;\n $res = $sql->sql_select_array_query(\"SELECT * FROM `user` WHERE id = '{$user_id}' AND status = 1\");\n if (count($res) >= 1) {\n $user = $res[0];\n $user_id = $user['id'];\n $email = $user['email'];\n if (hash('sha512', $password) === $user['password'] || $password === $user['password']) {\n // Passwords match - lets delete everything from this user\n // ToDo: Put it all in one query\n $sql->sql_delete('confirm', ['user_id' => $user_id]);\n $sql->sql_delete('forgot', ['user_id' => $user_id]);\n $sql->sql_delete('profile', ['user_id' => $user_id]);\n $sql->sql_delete('subscription', ['user_id' => $user_id]);\n $sql->sql_delete('playlist', ['user_id' => $user_id]);\n $sql->sql_delete('live', ['user_id' => $user_id]);\n $sql->sql_delete('movie', ['user_id' => $user_id]);\n $sql->sql_delete('episodes', ['user_id' => $user_id]);\n $sql->sql_delete('series_tmdb', ['user_id' => $user_id]);\n $sql->sql_delete('user', ['id' => $user_id]);\n $this->send_email(\n EMAIL['email'], \n $email, \n 'We are sad to see you go.', \n $this->account_canceled_body()\n );\n return true;\n }\n }\n return false;\n }",
"public function blockunblockmerchant($type = \"\", $uid = \"\", $email = \"\")\n {\n $status = 0;\n if($type == 1){\n $status = 1;\n }\n $result = $this->db->update(\"users\", array(\"user_status\" => $status), array(\"user_id\" => $uid, \"email\" => $email));\n $merchant_result = $this->db->update(\"stores\", array(\"store_status\" => $status), array(\"merchant_id\" => $uid));\n return count($result);\n }",
"protected function switchUserBack() {\n if ($this->isUserSwitched) {\n $this->accountSwitcher->switchBack();\n $this->isUserSwitched = FALSE;\n }\n }",
"function admin_disable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 1;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been disabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"static function momentDisconect()\r\n {\r\n $user = self::getCurrentUser();\r\n\r\n if ($user !== NULL)\r\n {\r\n $user->setOffline(1);\r\n self::updateUser($user);\r\n }\r\n }",
"function Unlock($UserID)\n\t{\n\t\tj::SQL(\"UPDATE jfp_xuser SET LockTimeout=? , FailedLoginAttempts=0 WHERE ID=? LIMIT 1\",time(),$UserID);\n\t}",
"public function deactivateUser($user_id)\n\t{\n\t\tif($this->getUserStatusId($user_id) === 2 || $this->getUserStatusId($user_id) === 1)\n\t\t{\n\t\t\t$this->where('id', '=', $user_id)->update(['user_status' => 3]);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function block($user, $entities = null, $skip_status = null)\n\t{\n\t\t// Check the rate limit for remaining hits\n\t\t$this->checkRateLimit('blocks', 'create');\n\n\t\t// Determine which type of data was passed for $user\n\t\tif (is_numeric($user))\n\t\t{\n\t\t\t$data['user_id'] = $user;\n\t\t}\n\t\telseif (is_string($user))\n\t\t{\n\t\t\t$data['screen_name'] = $user;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// We don't have a valid entry\n\t\t\tthrow new RuntimeException('The specified username is not in the correct format; must use integer or string');\n\t\t}\n\n\t\t// Check if entities is specified\n\t\tif (!is_null($entities))\n\t\t{\n\t\t\t$data['include_entities'] = $entities;\n\t\t}\n\n\t\t// Check if skip_statuses is specified\n\t\tif (!is_null($skip_status))\n\t\t{\n\t\t\t$data['skip_status'] = $skip_status;\n\t\t}\n\n\t\t// Set the API path\n\t\t$path = '/blocks/create.json';\n\n\t\t// Send the request.\n\t\treturn $this->sendRequest($path, 'POST', $data);\n\t}",
"public function testUnblockUser($active, $authenticated, $expects, $autosave_names) {\n // Set-up a mock user.\n $account = $this->prophesizeEntity(UserInterface::class);\n // Mock isBlocked.\n $account->isBlocked()->willReturn(!$active);\n // Mock isAuthenticated.\n $account->isAuthenticated()->willReturn($authenticated);\n // Mock activate.\n $account->activate()->shouldBeCalledTimes($expects);\n // We do not expect to call the 'save' method because the user should be\n // auto-saved later.\n $account->save()->shouldNotBeCalled();\n // Test unblocking the user.\n $this->action\n ->setContextValue('user', $account->reveal())\n ->execute();\n\n $this->assertEquals($this->action->autoSaveContext(), $autosave_names, 'Action returns correct context name for auto saving.');\n }"
] | [
"0.73938525",
"0.69746083",
"0.69417113",
"0.6921662",
"0.68360096",
"0.67261344",
"0.671436",
"0.66536045",
"0.66360277",
"0.658877",
"0.6540746",
"0.65081525",
"0.6489167",
"0.6475912",
"0.639916",
"0.63897747",
"0.63687354",
"0.63036203",
"0.6260709",
"0.6254625",
"0.62294585",
"0.61795837",
"0.6148836",
"0.61338586",
"0.6125558",
"0.6090178",
"0.60870516",
"0.6065513",
"0.60644597",
"0.6056848",
"0.6002349",
"0.59935653",
"0.59815323",
"0.5956415",
"0.5916958",
"0.5911372",
"0.57722014",
"0.57597",
"0.57596684",
"0.57576525",
"0.5754432",
"0.5739974",
"0.5715726",
"0.5700215",
"0.5690771",
"0.567788",
"0.56762457",
"0.5664281",
"0.5656779",
"0.56475526",
"0.5646552",
"0.56436825",
"0.5623011",
"0.56203324",
"0.55874383",
"0.5583145",
"0.556446",
"0.55639666",
"0.5557011",
"0.5540602",
"0.5522076",
"0.5492806",
"0.5488712",
"0.5487305",
"0.54678774",
"0.54582995",
"0.5438726",
"0.54342747",
"0.543249",
"0.54181695",
"0.540178",
"0.53964347",
"0.5387044",
"0.5381785",
"0.5377887",
"0.5376565",
"0.53696626",
"0.5363979",
"0.53623414",
"0.53608614",
"0.5360662",
"0.5359181",
"0.53436404",
"0.53428644",
"0.5340701",
"0.53308594",
"0.5320843",
"0.5319089",
"0.5319089",
"0.53151804",
"0.53123623",
"0.5294168",
"0.5291246",
"0.5287649",
"0.52696115",
"0.52642286",
"0.52614003",
"0.5257965",
"0.5252649",
"0.52439845",
"0.52431995"
] | 0.0 | -1 |
Prepare ingredients for the Pizza. | abstract public function prepare(): self; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fillIngredients()\n {\n $ingredients_data = $this->_db()->select('select id_ingredient, base_quantity from product_ingredients where id_product=?d', $this->id);\n foreach ($ingredients_data as $ing)\n {\n $this->ingredients[$ing['id_ingredient']] = new Model_Product($ing['id_ingredient']);\n $this->ingredients[$ing['id_ingredient']]->base_quantity = $ing['base_quantity'];\n $this->ingredients[$ing['id_ingredient']]->fillIngredients();\n }\n }",
"public static function import_nutrition( $ingredients ) {\n\t\t$wpurp_nutrition = get_option( 'wpurp_nutritional_information', array() );\n\n\t\tforeach ( $ingredients as $ingredient_id ) {\n\t\t\t$ingredient = get_term( $ingredient_id, 'ingredient' );\n\n\t\t\t$nutrition = isset( $wpurp_nutrition[ $ingredient_id ] ) ? $wpurp_nutrition[ $ingredient_id ] : false;\n\n\t\t\tif ( $nutrition ) {\n\t\t\t\t$wprm_nutrition = array(\n\t\t\t\t\t'amount' => isset( $nutrition['_meta']['serving_quantity'] ) ? sanitize_text_field( $nutrition['_meta']['serving_quantity'] ) : '',\n\t\t\t\t\t'unit' => isset( $nutrition['_meta']['serving_unit'] ) ? sanitize_text_field( $nutrition['_meta']['serving_unit'] ) : '',\n\t\t\t\t\t'nutrients' => array(),\n\t\t\t\t);\n\n\t\t\t\t$nutrition_mapping = array(\n\t\t\t\t\t'calories' => 'calories',\n\t\t\t\t\t'carbohydrate' => 'carbohydrates',\n\t\t\t\t\t'protein' => 'protein',\n\t\t\t\t\t'fat' => 'fat',\n\t\t\t\t\t'saturated_fat' => 'saturated_fat',\n\t\t\t\t\t'polyunsaturated_fat' => 'polyunsaturated_fat',\n\t\t\t\t\t'monounsaturated_fat' => 'monounsaturated_fat',\n\t\t\t\t\t'trans_fat' => 'trans_fat',\n\t\t\t\t\t'cholesterol' => 'cholesterol',\n\t\t\t\t\t'sodium' => 'sodium',\n\t\t\t\t\t'potassium' => 'potassium',\n\t\t\t\t\t'fiber' => 'fiber',\n\t\t\t\t\t'sugar' => 'sugar',\n\t\t\t\t\t'vitamin_a' => 'vitamin_a',\n\t\t\t\t\t'vitamin_c' => 'vitamin_c',\n\t\t\t\t\t'calcium' => 'calcium',\n\t\t\t\t\t'iron' => 'iron',\n\t\t\t\t);\n\t\t\n\t\t\t\t$migrate_values = array(\n\t\t\t\t\t'vitamin_a' => 5000,\n\t\t\t\t\t'vitamin_c' => 82.5,\n\t\t\t\t\t'calcium' => 1000,\n\t\t\t\t\t'iron' => 18,\n\t\t\t\t);\n\t\t\n\t\t\t\tforeach ( $nutrition_mapping as $wpurp_field => $wprm_field ) {\n\t\t\t\t\t$wprm_nutrition['nutrients'][ $wprm_field ] = isset( $nutrition[ $wpurp_field ] ) ? $nutrition[ $wpurp_field ] : '';\n\t\t\n\t\t\t\t\tif ( array_key_exists( $wprm_field, $migrate_values ) && $recipe['nutrition'][ $wprm_field ] ) {\n\t\t\t\t\t\t// Daily needs * currently saved as percentage, round to 1 decimal.\n\t\t\t\t\t\t$wprm_nutrition['nutrients'][ $wprm_field ] = round( $migrate_values[ $nutrient ] * ( $recipe['nutrition'][ $wprm_field ] / 100 ), 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$term_id = self::get_or_create_ingredient( $ingredient->name );\n\t\t\t\tupdate_term_meta( $term_id, 'wprpn_nutrition', $wprm_nutrition );\n\t\t\t}\n\t\t}\n\t}",
"private function populateItems()\n\t{\n\t\tif ( empty( $this->ingredients ) )\n\t\t\treturn;\n\t\t\n\t\tforeach( $this->ingredients as $ingredient )\n\t\t{\n\t\t\tif ( !( $item = Fridge::getInstance()->getItem( $ingredient[Item::FIELD_NAME] ) ) || $ingredient[Item::FIELD_AMOUNT] > $item->getAmount() )\n\t\t\t{\n\t\t\t\t$this->valid = false;\n\t\t\t\t$this->items = array();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t$useBy = $item->getUseBy();\n\t\t\t\n\t\t\t$this->valid = ( $useBy >= REQUEST_TIME )?: false;\n\t\t\t$this->minOutOfDate = ( empty( $this->minOutOfDate ) || $useBy <= $this->minOutOfDate )? $useBy : $this->minOutOfDate;\n\t\t\t\n\t\t\t$this->items[$item->getName()] = $item;\n\t\t}\n\t}",
"protected function preparePrep()\n {\n $this->prepList = [];\n $this->invalidList = [];\n $this->rewind();\n if (array_key_exists('SellerSKUList.Id.1', $this->options)) {\n $this->options['Action'] = 'GetPrepInstructionsForSKU';\n $this->resetASINs();\n } elseif (array_key_exists('ASINList.Id.1', $this->options)) {\n $this->options['Action'] = 'GetPrepInstructionsForASIN';\n $this->resetSKUs();\n }\n }",
"public function prepare_items()\n {\n }",
"public function prepare_items()\n {\n }",
"public function prepare_items()\n {\n }",
"public function prepare_items()\n {\n }",
"public function prepare_items()\n {\n }",
"public function setUp()\n {\n $this->salt = new Ingredient('salt');\n $this->tomato = new Ingredient('tomato');\n $this->kg = new Unit('kilogram', 'kg');\n $this->l = new Unit('liter', 'l');\n $this->recipe = new Recipe('tomato sauce', [\n new Quantity(0.5, $this->kg, $this->tomato),\n new Quantity(0.2, $this->kg, $this->salt),\n ], true, $this->l, 0.8);\n }",
"public function onAfterInstall()\n {\n $ingredients = array(\n array('name' => 'Gin'),\n array('name' => 'Tonic'),\n array('name' => 'Lime'),\n array('name' => 'Soda'),\n array('name' => 'Vodka'),\n );\n\n foreach ($ingredients as $ingredient) {\n craft()->db->createCommand()->insert('cocktailrecipes_ingredients', $ingredient);\n }\n }",
"public function run()\n {\n //\n\n Ingredient::truncate();\n\n $ingredients = [\n [\n \"name\" => \"Лосось\", \"price\" => 100, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Тунец\", \"price\" => 110, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Угорь\", \"price\" => 130, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Креветка Тигровая\", \"price\" => 140, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Окунь\", \"price\" => 60, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Кунжут Белый\", \"price\" => 20, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Кунжут Черный\", \"price\" => 20, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Кунжут ч/б\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Икра Тобико Красная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Икра Тобико Зелёная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Икра Тобико Черная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Старушка Тунца\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Огурец\", \"price\" => 20, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Авакадо\", \"price\" => 100, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Укроп\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Нори\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Лосось\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Тунец\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Угорь\", \"price\" => 65, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Креветка Тигровая\", \"price\" => 70, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Окунь\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Снежный Краб\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Креветка Салатная\", \"price\" => 40, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Мидии\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Кальмар\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Курица Жареная\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Лосось Жаренный\", \"price\" => 55, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Окунь Жаренный\", \"price\" => 35, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Сливочный Сыр\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Плаванный сыр\", \"price\" => 25, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Икра Тобико Красная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Икра Лосося\", \"price\" => 100, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Огурец\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Авакадо\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Чука\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Помидор\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Сладкиц Перец \", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Айсберг\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Лук зелёный\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Соус спайси\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Майонез\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n ];\n\n\n foreach ($ingredients as $ingredient)\n \\App\\Ingredient::create([\n 'title' => $ingredient[\"name\"],\n 'mass' => \"30\",\n 'quantity' => \"1\",\n 'price' => $ingredient[\"price\"],\n 'use_type' => $ingredient[\"type\"],\n ]);\n\n\n }",
"function migrate_acf_ingredients($post_or_id) {\n\n\tif (is_int($post_or_id)) {\n\t\t$post_id = $post_or_id;\n\t\t$post = get_post($post_id);\n\t}\n\telse {\n\t\t$post = $post_or_id;\n\t\t$post_id = $post->ID;\n\t}\n\n\t// ignore other post types\n\tif (get_post_type($post_id) != 'post') {\n\t\treturn;\n\t}\n\n\t// field to get\n\t$field_name = 'ingredients';\n\t$block_name = 'ingredients';\n\n\t// update only if post content does not already have recipe block\n\tif (!stristr($post->post_content, \"<!-- wp:acf/$block_name\")) {\n\n\t\t// get field in block format\n\t\t$block_content = get_acf_meta_block_format($field_name, $block_name, $post_id);\n\n\t\t// update post content with new block content prepended\n\t\twp_update_post(array(\n\t\t\t'ID' => $post_id,\n\t\t\t'post_content' => wp_slash($block_content) . \"\\n\\n\" . wpautop($post->post_content),\n\t\t));\n\t}\n}",
"public function ingredients()\n {\n return $this->hasMany('App\\Models\\Product');\n }",
"public function setIngredients(array $ingredients):void\n {\n $this->ingredients = $ingredients;\n }",
"public function view_product_prep($id) {\n //permittedArea();\n $data['product_prep'] = $this->db->get_where('product_ingredients', ['id' => $id]);\n theme('view_product_prep', $data);\n }",
"private function sanitize_data($_POST)\n\t{\n\t\tif (isset($_POST['recipe_title']) && !empty($_POST['recipe_title']) ) :\n\t\t\t$recipe['title'] = filter_var($_POST['recipe_title'], FILTER_SANITIZE_STRING);\n\t\tendif;\n\t\t\n\t\tif (isset($_POST['recipe_desc']) && !empty($_POST['recipe_desc']) ) :\n\t\t\t$recipe['desc'] = filter_var($_POST['recipe_desc'], FILTER_SANITIZE_STRING);\n\t\tendif;\n\t\t\n\t\tif (isset($_POST['recipe_image']) && !empty($_POST['recipe_image']) ) :\n\t\t\t$recipe['image'] = filter_var($_POST['recipe_image'], FILTER_SANITIZE_URL);\n\t\tendif;\n\t\t\n\t\t$ingredients = array();\n\t\t\n\t\tif (isset($_POST['ingredient_1']) && !empty($_POST['ingredient_1']) ) :\n\t\t\t$ingredients['1'] = filter_var($_POST['ingredient_1'], FILTER_SANITIZE_STRING);\n\t\tendif;\n\t\t\n\t\tif (isset($_POST['ingredient_2']) && !empty($_POST['ingredient_2']) ) :\n\t\t\t$ingredients['2'] = filter_var($_POST['ingredient_2'], FILTER_SANITIZE_STRING);\n\t\tendif;\n\t\t\n\t\t//Encode ingredients array to JSON for DB storage\n\t\t$recipe['ingredients'] = json_encode($ingredients);\n\t\t\n\t\treturn $recipe;\n\t}",
"function validateSanitizeMealIngredients($meal_ingredients){\n\t\t\tglobal $validForm, $meal_ingredients_Err;\n\t\t\t$sanitized_meal_ingredients = filter_var($meal_ingredients, FILTER_SANITIZE_STRING);\n\t\t\treturn $sanitized_meal_ingredients;\n\t\t}",
"public function run()\n {\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '0',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => '2 Row Malt',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Munich Malt',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Wheat Malt',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Dextrin Malt',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Rye Malt',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Black Patent',\n\t\t]);\n\t\t\n\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Chocolate Malt',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Crystal Malt 120L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Crystal Malt 150L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Crystal Malt 20L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Crystal Malt 40L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Crystal Malt 80L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Roast Barley 350L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Roast Barley 500L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Special Roast 50L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Victory Malt',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'America',\n\t\t\t'name' => 'Wheat Berries',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Flaked Barley',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Flaked Maize',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Flaked Oats',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Flaked Rice',\n\t\t]);\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Rice Hulls',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Flaked Rye',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Flaked',\n\t\t\t'name' => 'Flaked Wheat',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'Aromatic Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'Biscuit',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'CaraMunich 55L',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'CaraVienne 35L',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'Pils Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'Special B',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Belgian',\n\t\t\t'name' => 'Kiln Coffee Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'Amber Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'British Crystal 55L',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'Brown Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'Carastan 35L',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'Pale Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'Peated Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'British',\n\t\t\t'name' => 'Torrified Wheat',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Canadian',\n\t\t\t'name' => 'Gambrinus Pale',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'Canadian',\n\t\t\t'name' => 'Honey Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Acidulated Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Carafa Malt',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Cara Rye',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Cara Wheat',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Chocolate Rye',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Chocolate Wheat',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Caramel Pils Carafoam',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Carahell Light Chrystal 10L',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Caramunich 55L',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Melanoidin Malt',\n\t\t]);\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Pils Malt Weyermann',\n\t\t]);\t\t\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '1',\n\t\t\t'grain_type' => 'German',\n\t\t\t'name' => 'Vienna Malt',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Amarillo',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Cascade',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Centennial',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Chinook',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Citra',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Columbus',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Chrystal',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Saaz',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Fuggles',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Golding',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Hallertauer',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Liberty',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Magnum',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Mosaic',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Mt. Hood',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Nor. Brewer',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Nugget',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Perle',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Simcoe',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Sorachi Ace',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Sterling',\n\t\t]);\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Tettnanger',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Warrior',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '2',\n\t\t\t'name' => 'Willamette',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Belgian Saison',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-CDC Cask Conditioning',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Muntons',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Nottingham',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Safale 04',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Safale 05 Amer Ale',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Safbrew 06 Wheat',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Ale Yeast-Windsor',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Lager Yeast-Vierka',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1007-Ale German',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1010-Am Wheat',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1028-Ale London',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1056-Ale American',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1084-Ale Irish',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1098-Ale British',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1214-Belgian Abbey',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1272-American II',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1275-Thames Valley Ale',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1318-London III',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1332-Northwest',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1388-Bel Strong',\n\t\t]);\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1728-Scottish Ale',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 1968-London Spec',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2007-Lager Pilsner',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2035-Lager American',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2112-Lager California',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2124-Lager Bohemian',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2206-Lager Bavarian',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2308-Lager Munich',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 2565-Kolsch',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 3056-Bav. Wheat',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 3068-Wheinstephen',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast 3944-Belgian White',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '3',\n\t\t\t'name' => 'Wyeast Pacman-Rogue',\n\t\t]);\t\t\t\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Candi Sugar-Clear',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Candi Sugar-Dark',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Candi Sugar Liquid 180L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Candi Sugar Liquid 45L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Candi Sugar Liquid 90L',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Candi Sugar Liquid 1-Simplicity',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Corn Sugar',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Wildflower Honey',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Lactose',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Malto-Dextrin',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '4',\n\t\t\t'name' => 'Rice Syrup-Solid',\n\t\t]);\t\n\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => '5.2 ph Stabilizer',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => '5.2 ph Stabilizer',\n\t\t]);\n\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Amylase Enzyme',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Bitter Orange Peel',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Brewing Salts-Burton',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Cacao Nibs',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Calcium Chloride',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Carbonation Drops',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Cinnamon Stick',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Clarity Firm',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Coriander Seed',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Elderberries-Dried',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Elderflowers',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'FermCap',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Dried Ginger',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Grapefruit Peel',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Gypsum',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Heading Powder',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Heather Tips',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Irish Moss Flakes',\n\t\t]);\n\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Dry Isinglass Finings',\n\t\t]);\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Juniper Berries',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Lactic Acid',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Lemon Peel',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Brewers Licorice',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Dried Licorice Root',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Lime Peel',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Paradise Seed',\n\t\t]);\t\t\t\n\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Indian Sarsaparilla',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Spruce Essence',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Star Anise',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Sweet Orange Peel',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Vanilla Bean',\n\t\t]);\t\t\t\n\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Whirlfloc',\n\t\t]);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Wintergreen Leaves',\n\t\t]);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tDB::table('ingredients')->insert([\n\t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t'type' => '5',\n\t\t\t'name' => 'Wormwood',\n\t\t]);\t\n\t}",
"function ogp_extras() {\n global $meal;\n\n foreach( $meal->ingredients as $ingredient ) { ?>\n <meta property=\"<?php echo Facebook_Sample_Application::APP_NS; ?>:ingredient\" content=\"<?php echo htmlspecialchars( $ingredient ) ?>\">\n<?php\n }\n}",
"public function ingredients() {\n return $this->hasMany(Ingredient::class);\n }",
"private function prepareItems()\n {\n $attribute = $this->attribute;\n $items = $this->model->$attribute;\n if (!is_array($items)) {\n $items = [];\n }\n\n $this->_items = $items;\n }",
"public function prepareForValidation(): void\n {\n $products = [];\n foreach ($this->products as $key => $product) {\n $products['products'][$key] = [\n 'id' => $product['id'],\n 'qty' => $product['qty'],\n 'product' => Product::find($product['id']),\n ];\n }\n\n $this->merge($products);\n }",
"public function __construct($_name, $_description, $_recipeImage, $_ingredients, $_submittedBy)\r\n {\r\n $this->_name = $_name;\r\n $this->_description = $_description;\r\n $this->_recipeImage = $_recipeImage;\r\n $this->_ingredients = $_ingredients;\r\n $this->_submittedBy = $_submittedBy;\r\n }",
"public function getIngredients()\n {\n return $this->ingredients;\n }",
"public function prepare_items() {\n\t\tif( !empty($_GET['orderby']) ){\n\t\t\tusort($this->items, [$this, 'reorder_products']);\n\t\t}\n\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$this->_column_headers = array($columns, $hidden, $sortable);\n\t}",
"public function install()\n\t{\n\t\t\n\t\t$mysqli = $this->connect();\n\t\t\t\n\t\t$ingredients_setup = \"\n\t\tCREATE TABLE `\".$this->table_name.\"` (\n\t\t `recipe_id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `recipe_title` varchar(200) DEFAULT NULL,\n\t\t `recipe_image` text,\n\t\t `recipe_desc` text,\n\t\t `ingredients` varchar(128) DEFAULT NULL,\n\t\t PRIMARY KEY (`recipe_id`)\n\t\t) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n\t\t\";\n\t\t\n\t\tif($q = $mysqli->query($ingredients_setup)) :\n\t\t\techo 'Created Table: ' . $this->table_name;\n\t\telse:\n\t\t\tdie('Error: Could not create table');\n\t\tendif;\n\t\t\n\t}",
"public function view_ingredients($id) {\n //permittedArea();\n $data['view_assistant'] = $this->db->get_where('product_ingredients', ['product_preparation' => $id]);\n theme('view_ingredients', $data);\n }",
"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}",
"public function run()\n {\n DB::table('countries')->truncate();\n DB::table('ingredients')->truncate();\n DB::table('facts')->truncate();\n DB::table('recipes')->truncate();\n DB::table('ingredient_recipe')->truncate();\n DB::table('country_recipe')->truncate();\n\n //data from file DataProvider.php (same folder) => if you want to add recipes to seeder go there\n $data_recipes = DataProvider::getRecipes();\n $countries = DataProvider::getCountries();\n\n //this fills DB with Countries\n foreach ($countries as $iteration) {\n $country = new Country;\n $country->name = $iteration[\"name\"];\n $country->flag = strtolower($iteration[\"flag\"]);\n $country->save();\n }\n\n\n //fill DB with recipes from array $data_recipes\n foreach ($data_recipes as $food) {\n $recipe = new Recipe;\n\n $recipe->name = $food[\"name\"];\n $recipe->instructions = $food[\"instructions\"];\n $recipe->image = $food[\"image\"];\n $recipe->isVegan = $food[\"isVegan\"];\n $recipe->isVegetarian = $food[\"isVegetarian\"];\n $recipe->isLactoseFree = $food[\"isLactoseFree\"];\n $recipe->isGlutenFree = $food[\"isGlutenFree\"];\n $recipe->isNutFree = $food[\"isNutFree\"];\n $recipe->save();\n\n foreach ($food[\"countries\"] as $coun) {\n //we need to get country ID to save it to recipe_coutry table\n $country_generated = Country::where(\"name\", $coun)->first();\n $recipe->countries()->attach($country_generated->id);\n }\n\n foreach ($food[\"ingredients\"] as $ingr) {\n //we need to know if the ingredient is already in the DB if not, it is stored\n $ingredient_generated = Ingredient::where(\"name\", $ingr[2])->first();\n if (!$ingredient_generated) {\n $ingredient = new Ingredient;\n $ingredient->name = $ingr[2];\n $ingredient->save();\n } else {\n $ingredient = $ingredient_generated;\n $ingredient->save();\n }\n\n\n //actually filling the intermediate table ingredient_recipe (notice syntax in attach() method)\n $recipe->ingredients()->attach($ingredient->id, [\"quantity\" => $ingr[0], \"measurement\" => $ingr[1]]);\n }\n }\n }",
"public function __construct(Recipe $recipe, ArrayCollection $ingredients)\n {\n $this->recipe = $recipe;\n $this->ingredients = $ingredients;\n $this->use_by = $this->getLeastFreshIngredient()->use_by ?? null;\n }",
"public function getIngredients()\r\n {\r\n return $this->_ingredients;\r\n }",
"public function setIngredients($ingredients)\n {\n $this->ingredients = $ingredients;\n\n return $this;\n }",
"public static function wpurp_nutrition() {\n\t\t$nutrition = get_option( 'wpurp_nutritional_information', array() );\n\t\t$ingredients = array_keys( $nutrition );\n\n\t\t// Only when debugging.\n\t\tif ( WPRM_Tools_Manager::$debugging ) {\n\t\t\t$result = self::import_nutrition( $ingredients ); // Input var okay.\n\t\t\tvar_dump( $result );\n\t\t\tdie();\n\t\t}\n\n\t\t// Handle via AJAX.\n\t\twp_localize_script( 'wprm-admin', 'wprm_tools', array(\n\t\t\t'action' => 'wpurp_nutrition',\n\t\t\t'posts' => $ingredients,\n\t\t\t'args' => array(),\n\t\t));\n\n\t\trequire_once( WPRM_DIR . 'templates/admin/menu/tools/wpurp-nutrition.php' );\n\t}",
"public function ingredients()\n {\n return $this->hasMany('App\\Ingredient');\n }",
"public function customizePizza() {\n\t\t$id = $this->uri->segment(3);\n\n\t\t//Get required details by pizza id and toppings list and pass to the view\n\t\t$this->load->model('MenuModel');\n\n\t\t$details = $this->MenuModel->getPizzaById($id);\n\n\t\t$details = array('details' => $details, 'toppingsList' => $this ->MenuModel->getAllToppings());\n\n\t\t$this->load->view('customizePizza', $details);\n\t}",
"protected function _prep_args() {\n\t\t// this is the data prepared for binding.\n\t\t// these fields are ordered as they are in the table\n\t\t$args = array(\n\t\t\t'the_id' => $this->id,\n\t\t\t'date_created' => $this->date_created,\n\t\t\t'completed' => $this->completed,\n\t\t\t'template_id' => $this->template_id,\n\t\t);\n\n\t\treturn $args;\n\t}",
"public function ActualizarIngredientes()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"codingrediente\"]) or empty($_POST[\"nomingrediente\"]) or empty($_POST[\"cantingrediente\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select nomingrediente from ingredientes where codingrediente != ? and nomingrediente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"codingrediente\"], $_POST[\"nomingrediente\"]) );\n\t$num = $stmt->rowCount();\n\tif($num == 0)\n\t{\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" nomingrediente = ?, \"\n\t\t.\" cantingrediente = ?, \"\n\t\t.\" costoingrediente = ?, \"\n\t\t.\" unidadingrediente = ?, \"\n\t\t.\" codproveedor = ?, \"\n\t\t.\" stockminimoingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $nomingrediente);\n\t\t$stmt->bindParam(2, $cantingrediente);\n\t\t$stmt->bindParam(3, $costoingrediente);\n\t\t$stmt->bindParam(4, $unidadingrediente);\n\t\t$stmt->bindParam(5, $codproveedor);\n\t\t$stmt->bindParam(6, $stockminimoingrediente);\n\t\t$stmt->bindParam(7, $codingrediente);\n\n\t\t$nomingrediente = strip_tags($_POST[\"nomingrediente\"]);\n\t\t$cantingrediente = strip_tags($_POST[\"cantingrediente\"]);\n\t\t$costoingrediente = strip_tags($_POST[\"costoingrediente\"]);\n\t\t$unidadingrediente = strip_tags($_POST[\"unidadingrediente\"]);\n\t\t$codproveedor = strip_tags($_POST[\"codproveedor\"]);\n\t\t$stockminimoingrediente = strip_tags($_POST[\"stockminimoingrediente\"]);\n\t\t$codingrediente = strip_tags($_POST[\"codingrediente\"]);\n\t\t$stmt->execute();\n\n\t\techo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\t\techo \"<span class='fa fa-check-square-o'></span> EL INGREDIENTE FUE ACTUALIZADO EXITOSAMENTE\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\techo \"2\";\n\t\texit;\n\t}\n}",
"public function ingredients()\n {\n return $this->hasMany('App\\Http\\Models\\Ingredient');\n }",
"public function prepare() {\n $postExcerptSelectors = $this->bot->getSetting(SettingKey::POST_EXCERPT_SELECTORS);\n $findAndReplacesForExcerpt = $this->bot->prepareFindAndReplaces($this->bot->getSetting(SettingKey::POST_FIND_REPLACE_EXCERPT));\n\n foreach($postExcerptSelectors as $selectorData) {\n $selector = Utils::array_get($selectorData, SettingInnerKey::SELECTOR);\n if (!$selector) continue;\n\n $attr = Utils::array_get($selectorData, SettingInnerKey::ATTRIBUTE);\n if (!$attr) $attr = 'html';\n\n if($excerpt = $this->bot->extractData($this->bot->getCrawler(), $selector, $attr, \"excerpt\", true, true)) {\n $excerpt[\"data\"] = trim($this->bot->findAndReplace($findAndReplacesForExcerpt, $excerpt[\"data\"]));\n $this->bot->getPostData()->setExcerpt($excerpt);\n\n break;\n }\n\n }\n\n }",
"function getIngredients($servings=NULL,$optional=FALSE) {\n\t\tglobal $DB_LINK, $db_table_ingredientmaps;\n\t\t$ingredients = array();\n\t\t\n\t\t$scaling = null;\n\t\t\n\t\t// compute the scaling\n\t\tif ($this->serving_size != 0 && $this->serving_size != \"\")\n\t\t{\n\t\t\t$scaling = $servings / $this->serving_size;\n\t\t}\n\n\t\tif ($scaling == NULL || $servings == 0)\n\t\t{\n\t\t\t$scaling=1;\n\t\t}\n\t\t$sql = \"SELECT * FROM $db_table_ingredientmaps WHERE map_recipe=\" . $DB_LINK->addq($this->id, get_magic_quotes_gpc());\n\t\t$rc = $DB_LINK->Execute($sql);\n\t\twhile (!$rc->EOF) {\n\t\t\t// Only add the ingredient if we are suppose to\n\t\t\tif (($optional && $rc->fields['map_optional']==$DB_LINK->true) ||\n\t\t\t\t\t$rc->fields['map_optional']!=$DB_LINK->true)\n\t\t\t{\n\t\t\t\t$ingObj = new Ingredient();\n\t\t\t\t$ingObj->setIngredientMap($rc->fields['map_ingredient'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_recipe'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_qualifier'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_quantity'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_unit'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_order']);\n\t\t\t\t$ingObj->loadIngredient();\n\t\t\t\t$ingObj->convertToBaseUnits($scaling);\n\t\t\t\t$ingredients = ShoppingList::combineIngredients($ingredients, $ingObj);\n\t\t\t}\n\t\t\t$rc->MoveNext();\n\t\t}\n\t\treturn $ingredients;\n\t}",
"protected function prepareData()\n {\n parent::prepareData();\n $this->prepareConfigurableProductOptions();\n $this->prepareAttributeSet();\n }",
"function __construct()\n\t{\n\t\t$standard_proteins = array('Grilled chicken', 'Seared steak', 'Caramelized pork belly', 'Fried tofu', 'Seasonal roasted veggies');\n\t\t$standard_toppings = array('Pickles', 'Extra dressing', 'Cheese', 'Fruit', 'Jalapenos', 'Olives');\n\n\t\t$standard_quantities = array(0,1,2,3,4,5,6,7,8);\n\t\t//($name, $description, $price, $quantities, $options, $extras)\n\t\t$items = array(\n\t\t\tnew items('RICE BOWL', 'Brown Rice or White rice, pickled carrot & daikon, mesclun, cilantro, scallions, fried shallots, and soy drizzle.', 8.25, \n\t\t\t $standard_quantities, $standard_proteins, $standard_toppings),\n\t\t\tnew items('NOODLE SALAD', 'Soba or Rice Noodles (GF), carrot, mesclun, cilantro, and red onion.', 9, \n\t\t\t $standard_quantities, $standard_proteins, $standard_toppings),\n\t\t\tnew items('SALAD (GF)', 'A bed of mesclun with carrot, cilantro, red onion, tomatoes, and almonds', 8, \n\t\t\t $standard_quantities, $standard_proteins, $standard_toppings)\n\t\t);\n\n\t\t//$name, $description, $price, $quantities, $flavors, $sizes\n\t\t$standard_drink_sizes = array('Small', 'Medium', 'Large');\n\n\t\t$beverage = array(\n new beverage('RUMBO', 'Almonds and bananas are blended together.', 5.25, $standard_quantities, $standard_drink_sizes),\n new beverage('SUNRISE STAR', 'spinach, broccoli, celery, cucumber, orange, banana, grapefruit, ice.', 6.25, $standard_quantities, $standard_drink_sizes),\n new beverage('SUNSET STAR', 'carrots, strawberries, orange, peach, ice.', 5.25, $standard_quantities, $standard_drink_sizes),\n\t\t\tnew beverage('Banana Nut', 'Almonds and bananas are blended together.', 5.25, $standard_quantities, $standard_drink_sizes),\n new beverage('Mango Tango', 'Strawberries, mango, pineapple, banana.', 5.75, $standard_quantities,\n\t\t\t $standard_drink_sizes),\n new beverage('Island Passion', 'Mango, bananas and peaches delivered with a hint of coconut keeps you coming back to the island.', 6.00, $standard_quantities, $standard_drink_sizes),\n\t\t\t\n\t\t\t);\n\n\t\t$menu = '<h2>Food Menu</h2>';\n\n\t\tforeach ($items as $item){\n\t\t\t$menu .= $item->toFormField();\n\t\t}\n\n\t\t$menu .= '<h2> Juice Menu </h2>';\n\t\tforeach ($beverage as $beverage){\n\t\t\t$menu .= $beverage->toFormField();\n\t\t}\n\n\t\t$this->form = $menu;\n\t\t$this->items = $items;\n\t\t$this->beverage = $beverage;\n\t}",
"public function getIngredients(): array{\r\n $ingredients = array();\r\n $con = $this->db->getConnection();\r\n foreach(mysqli_query($con, 'SELECT * FROM ingredients')as $key){ $ingredients[$key['idingredients']] = $key['ingredient']; }\r\n return $ingredients;\r\n $this->con->closeConnection();\r\n }",
"protected function prepareForValidation()\n {\n if($this->keywords != null) {\n $keywordsSanitize = trim(strtolower($this->keywords));\n\n $this->merge([\n 'keywords' => json_encode(explode(',', $keywordsSanitize), true),\n ]);\n }\n\n if($this->roles_requirements != null) {\n $this->merge([\n 'roles_requirements' => json_encode(explode(',', $this->roles_requirements), true),\n ]);\n }\n\n if($this->tools_requirements != null) {\n $this->merge([\n 'tools_requirements' => json_encode(explode(',', $this->tools_requirements), true),\n ]);\n }\n }",
"public function updateRecipe(Request $request)\n {\n $user = Auth::user();\n $userId = $user->id;\n $recipeId = $request->input('id');;\n $name = $request->input('name');\n $preparation_time = $request->input('preparation_time');\n $cooking_time = $request->input('cooking_time');\n $description = $request->input('description');\n\n DB::update('UPDATE recipes SET name=?, preparation_time=?, cooking_time=?, description=?, updated_at = NOW() WHERE id=? AND user_id=?', [$name, $preparation_time, $cooking_time, $description, $recipeId, $userId]);\n\n ///Update data in recipes_ingredients table\n $ingredientsToUpdate = $request->input('ingredientsToUpdate');\n\n for ($i = 0; $i < count($ingredientsToUpdate); $i++) {\n $quantity = $ingredientsToUpdate[$i]['quantity'];\n $ingredientId = $ingredientsToUpdate[$i]['ingredients_id'];\n\n DB::update('UPDATE recipes_ingredients SET quantity=? WHERE recipes_id=? AND ingredients_id=?', [$quantity, $recipeId, $ingredientId]);\n }\n\n //If there are ingredients to delete, delete ingredients from recipes_ingredients table\n $ingredientsToDelete = $request->input('ingredientsToDelete');\n\n if ($ingredientsToDelete != null) {\n for ($i = 0; $i < count($ingredientsToDelete); $i++) {\n $ingredientId = $ingredientsToDelete[$i]['ingredients_id'];\n\n DB::delete('DELETE FROM recipes_ingredients WHERE recipes_id=? AND ingredients_id=?', [$recipeId, $ingredientId]);\n }\n }\n\n //If user create new ingredients, send data to recipes_ingredients table\n $ingredientsToAdd = $request->input('ingredientsToAdd');\n\n if ($ingredientsToAdd != null) {\n for ($i = 0; $i < count($ingredientsToAdd); $i++) {\n $ingredientId = $ingredientsToAdd[$i]['ingredients_id'];\n $quantity = $ingredientsToAdd[$i]['quantity'];\n\n DB::insert('INSERT INTO recipes_ingredients SET ingredients_id=?, quantity=?, recipes_id=?', [$ingredientId, $quantity, $recipeId]);\n }\n }\n\n return redirect()->route('recipes');\n }",
"public function testReplaceQuantities()\n {\n $pinch = new Unit('pinch', 'p');\n $origan = new Ingredient('origan');\n $this->recipe->replaceQuantities([\n new Quantity(0.9, $this->kg, $this->tomato),\n new Quantity(1, $pinch, $origan),\n new Quantity(0.3, $this->kg, $this->salt)\n ]); \n $this->assertCount(3, $this->recipe->getQuantities());\n $qtyTomato = $this->recipe->fetchQuantityOf('tomato');\n $this->assertEquals(0.9, $qtyTomato->getAmount());\n $this->assertEquals('kg', $qtyTomato->getUnit()->getSymbol());\n $qtySalt = $this->recipe->fetchQuantityOf('salt');\n $this->assertEquals(0.3, $qtySalt->getAmount());\n $this->assertEquals('kg', $qtySalt->getUnit()->getSymbol());\n $qtyOrigan = $this->recipe->fetchQuantityOf('origan');\n $this->assertEquals(1, $qtyOrigan->getAmount());\n $this->assertEquals('p', $qtyOrigan->getUnit()->getSymbol());\n }",
"public function prepare_items() {\n\n\t\t$columns = $this->get_columns();\n\t\t$hidden = get_hidden_columns( $this->screen );\n \t\t$sortable = $this->get_sortable_columns();\n \t\t$this->_column_headers = array($columns, $hidden, $sortable);\n \t\t//$this->_column_headers = $this->get_column_info();\n\t\t/** Process bulk action */\n\t\t$this->process_bulk_action();\n\n\t\t$per_page = $this->get_items_per_page( 'transactions_per_page', 10 );\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = self::record_count();\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page //WE have to determine how many items to show on a page\n\t\t));\n\n\t\t$this->items = self::get_customers( $per_page, $current_page );\n\t}",
"public function ingredient($ingredient = null)\n {\n if (1 === func_num_args()) {\n if ($this->upc()) {\n throw new \\Exception('Only an ingredient or UPC may be set, not both');\n }\n\n $this->ingredient = $ingredient;\n\n return $this;\n }\n\n return $this->ingredient;\n }",
"public function prepare_items() {\n\t\t/** Process bulk action */\n\t\t$this->process_bulk_action();\n\n\t\t$columns = $this->get_columns();\n $hidden = $this->get_hidden_columns();\n $sortable = $this->get_sortable_columns();\n $this->_column_headers = array($columns, $hidden, $sortable);\n\n\t\t$per_page = $this->get_items_per_page( 'posts_per_page', 20 );\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = self::record_count();\n\n\t\t$this->set_pagination_args( [\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page //WE have to determine how many items to show on a page\n\t\t] );\n\n\t\t$this->items = self::get_posts( $per_page, $current_page );\n\t}",
"public function getIngredients():array\n {\n return $this->ingredients;\n }",
"public function run()\n {\n $units = ['kg', 'el', 'gr', 'l', 'cl', 'dl'];\n $faker = Faker\\Factory::create();\n $ingredient = new Ingredient();\n $ingredient->title = $faker->word;\n $ingredient->recept_id = rand(0, 9);\n $ingredient->amount = rand(0, 2000);\n $ingredient->unit = $units[array_rand($units, 1)];\n $ingredient->save();\n }",
"private function prepareArray()\n {\n $tempItems = trim(Input::get('items'));\n $items = explode(PHP_EOL, $tempItems);\n $badItemsToTest = ['shp#', 'totals', 'total', 'shipment', 'shipment#', ''];\n\n $finalArray = array();\n\n foreach ($items as $item) {\n\n if (in_array(strtolower(trim($item)), $badItemsToTest) == false) {\n array_push($finalArray, trim($item));\n }\n\n }\n return $finalArray;\n\n\n }",
"public function run()\n {\n $table = 'ingredients';\n DB::table($table)->insert([\n 'id' => 1,\n 'name' => 'Cheese Parmesan',\n 'slug' => 'cheese_parmesan',\n 'weight' => 0.2,\n 'remain' => 3,\n 'cost' => 50\n ]);\n DB::table($table)->insert([\n 'id' => 2,\n 'name' => 'Cheese Chedar',\n 'slug' => 'cheese_chedar',\n 'weight' => 0.15,\n 'remain' => 3,\n 'cost' => 100\n ]);\n DB::table($table)->insert([\n 'id' => 3,\n 'name' => 'Smoked Sausage',\n 'slug' => 'smoked_sausage',\n 'weight' => 0.3,\n 'remain' => 3,\n 'cost' => 30\n ]);\n DB::table($table)->insert([\n 'id' => 4,\n 'name' => 'Sauce Barbecue',\n 'slug' => 'sauce_barbecue',\n 'weight' => 0.23,\n 'remain' => 3,\n 'cost' => 12\n ]);\n DB::table($table)->insert([\n 'id' => 5,\n 'name' => 'Sauce Garlic',\n 'slug' => 'sauce_garlic',\n 'weight' => 0.14,\n 'remain' => 3,\n 'cost' => 5\n ]);\n DB::table($table)->insert([\n 'id' => 6,\n 'name' => 'Tomate',\n 'slug' => 'tomate',\n 'weight' => 0.24,\n 'remain' => 3,\n 'cost' => 5\n ]);\n DB::table($table)->insert([\n 'id' => 7,\n 'name' => 'Onion',\n 'slug' => 'onion',\n 'weight' => 0.1,\n 'remain' => 3,\n 'cost' => 5\n ]);\n }",
"public function run()\n {\n $now = Carbon::now();\n DB::table( 'recipes' )->insert( [\n 'user_id' => '2',\n 'name' => 'Grilled Cheese Sandwich',\n 'description' => 'This is a recipe for a basic grilled cheese sandwich.',\n 'source' => 'Patrick',\n 'prep_time' => '5',\n 'cook_time' => '5',\n 'servings' => '1',\n 'serving_size' => 'sandwich',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n\n DB::table( 'ingredients' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '1',\n 'name' => '2 slices of bread',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'ingredients' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '2',\n 'name' => '2 slices of pre-packaged cheese singles',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'ingredients' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '3',\n 'name' => '3 tablespoons of buttery spread',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '1',\n 'name' => 'Pre-heat griddle or pan to medium heat.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '2',\n 'name' => 'Spread butter on one side of each slice of bread.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '3',\n 'name' => 'When cooking surface is hot, place one slice of bread butter-side down on surface.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '4',\n 'name' => 'Place two cheese slices on the toasting bread and place 2nd slice of bread, butter side up, on top.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '5',\n 'name' => 'When bottom bread is browned nicely (golden color), flip sandwich over so top-butter is now down on the cooking surface.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '6',\n 'name' => 'Let sandwich cook until the 2nd side is browned.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n DB::table( 'directions' )->insert( [\n 'recipe_id' => '1',\n 'order_number' => '7',\n 'name' => 'Remove sandwich from heat and serve immediately.',\n 'created_at' => $now->format( 'Y-m-d H:i:s' ),\n 'updated_at' => $now->format( 'Y-m-d H:i:s' ),\n ] );\n }",
"function buildIngredientRecipe($ingredientName, $recipeName, $quantity) {\n global $conn;\n // Determine ingredientID\n $sql = \"SELECT ingredientID FROM ingredient WHERE ingredientName='\" . $ingredientName . \"'\";\n $result = $conn->query($sql);\n $record = $result->fetch_assoc();\n $ingredientID = $record['ingredientID'];\n\n // Determine recipeID\n $sql = \"SELECT recipeID FROM recipe WHERE recipeName='\" . $recipeName . \"'\";\n $result = $conn->query($sql);\n $record = $result->fetch_assoc();\n $recipeID = $record['recipeID'];\n\n // Check to make sure ingredient isn't already in the recipe\n $sql = \"SELECT recipeID FROM ingredientRecipe WHERE recipeID = \" . $recipeID\n . \" AND ingredientID = \" . $ingredientID;\n if ($result = $conn->query($sql)) {\n // determine number of rows result set\n $rowCount = $result->num_rows;\n if($rowCount > 0) {\n echo \"Ingredient \" . $ingredientID\n . \" is already in recipe \"\n . $recipeID . \"<br />\";\n } else { // Not a duplicate\n $sql = \"INSERT INTO ingredientRecipe (recipeID, ingredientID, quantity)\n VALUES ('\" . $recipeID . \"', '\" . $ingredientID . \"', '\" . $quantity . \"')\";\n runQuery($sql, \"Insert ingredient \" . $ingredientID . \" into recipe \" . $recipeID, true);\n }\n }\n }",
"public function recipeingredients(){\n return $this->hasMany(RecipeIngredient::class);\n }",
"function prepare_items() {\n\t\tglobal $avail_post_stati, $wp_query, $per_page, $mode, $post;\n\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t\n\t\t\n\t\t/**\n\t\t * REQUIRED. Finally, we build an array to be used by the class for column \n\t\t * headers. The $this->_column_headers property takes an array which contains\n\t\t * 3 other arrays. One for all columns, one for hidden columns, and one\n\t\t * for sortable columns.\n\t\t */\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t$post_type = 'dwqa-answer';\n\t\t$per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' );\n\n\t\t/** This filter is documented in wp-admin/includes/post.php */\n \t\t$per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );\n\n\t\t$question_id = $post->ID;\n\t\t$args = array(\n\t\t\t'post_type' => 'dwqa-answer',\n\t\t\t'posts_per_page' => $per_page,\n\t\t\t'order' => 'ASC',\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => '_question',\n\t\t\t\t\t'value' => array( $question_id ),\n\t\t\t\t\t'compare' => 'IN',\n\t\t\t\t),\n\t\t ),\n\t\t 'post_status' => 'publish',\n\t\t );\n\t\t$data = get_posts( $args );\n\t\t$this->items = $data;\n\t}",
"public function hydrate(array $ingredient): Ingredient\n {\n $entity = new Ingredient();\n $entity->setTitle($ingredient['title']);\n\n if (array_key_exists('use-by', $ingredient)) {\n $entity->setUseBy(\\DateTime::createFromFormat('Y-m-d', $ingredient['use-by']));\n }\n if (array_key_exists('best-before', $ingredient)) {\n $entity->setBestBefore(\\DateTime::createFromFormat('Y-m-d', $ingredient['best-before']));\n }\n\n return $entity;\n }",
"public function prepare_items() {\n\t\t$column = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\n\t\t$this->_column_headers = array( $column, $hidden, $sortable );\n\n\t\t$per_page = 20;\n\t\t$current_page = $this->get_pagenum();\n\t\t$offset = ( $current_page - 1 ) * $per_page;\n\n\t\t$args = array(\n\t\t\t'number' => $per_page,\n\t\t\t'offset' => $offset,\n\t\t);\n\n\t\tif ( isset( $_REQUEST['orderby'] ) && isset( $_REQUEST['order'] ) ) {\n\t\t\t$args['orderby'] = $_REQUEST['orderby'];\n\t\t\t$args['order'] = $_REQUEST['order'];\n\t\t}\n\n\t\t$this->items = Persistence::get( $args );\n\n\t\t$this->set_pagination_args(\n\t\t\tarray(\n\t\t\t\t'total_items' => Persistence::count(),\n\t\t\t\t'per_page' => $per_page,\n\t\t\t)\n\t\t);\n\t}",
"public function run()\n {\n // factory(Product::class,15) -> make() -> each(function($product){\n // $restaurant = Restaurant::inRandomOrder() -> first();\n // $product -> restaurant() -> associate($restaurant);\n // $product -> save();\n // });\n \n $products = [\n //FAST-FOOD\n [\n //'id' => 1,\n //'categories' => Fast-Food\n 'name' => 'Fries',\n 'ingredients' => 'Patate, sale, pepe',\n 'description' => 'Patine croccanti fritte al momento con sale marino e pepe nero',\n 'price' => 300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'fast (6).jpg',\n 'restaurant_id' => 3,\n ],\n [\n //'id' => 2,\n //'categories' => Fast-Food\n 'name' => 'Big Burger',\n 'ingredients' => 'Pane, manzo(100%), bacon, cipolle, cheddar,',\n 'description' => 'Bun burger a lievitazione naturale, hamburger di Fassona DOP 280g, bacon croccante, formaggio cheddar e cipolle caramellate',\n 'price' => 750,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'fast (1).jpg',\n 'restaurant_id' => 3,\n ],\n [\n //'id' => 3,\n //'categories' => Fast-Food\n 'name' => 'Hot Dog',\n 'ingredients' => 'Pane, wurstel (maiale), ketchup, maionese',\n 'description' => 'Bun burger a lievitazione naturale, wurstel di maiale 100% italiano, ketchup, maionese',\n 'price' => 500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'fast (3).jpg', //'/path/img',\n 'restaurant_id' => 3,\n ],\n [\n //'id' => 5,\n //'categories' => Fast-food\n 'name' => 'Toast',\n 'ingredients' => 'Pane, prociutto arrosto, fontina',\n 'description' => \"Pan carre' a lievitazione naturale, prosciutto arrosto affucato e fontina DOP\",\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'fast (17).jpg',\n 'restaurant_id' => 8,\n ],\n [\n //'id' => 6,\n //'categories' => Fast-Food\n 'name' => 'BBQ Burger',\n 'ingredients' => 'Pane, carne (manzo), salsa BBQ, cipolle',\n 'description' => 'Hamburger con deliziose fettine di formaggio Cheddar, salsa BBQ, rucola, cipolle crude e pomodoro',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bbq-burger.jpg',\n 'restaurant_id' => 8,\n ],\n [\n //'id' => 7,\n //'categories' => Fast-Food\n 'name' => 'Chicken Sandwich',\n 'ingredients' => 'Pane, pollo, pomodoro',\n 'description' => 'Tre fette di pane integrale tostato con pollo saltato, lattuga, pomodoro e maionese',\n 'price' => 450,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'chicken-sandwitch.jpg',\n 'restaurant_id' => 10,\n ],\n [\n //'id' => 8,\n //'categories' => Fast-Food\n 'name' => 'Salmon Sandwiich',\n 'ingredients' => 'Pane, pesce (salmone), pomodoro, uovo, formaggio',\n 'description' => 'Tre fette di pane integrale tostato con cream cheese Philadelphia style, cipolla\n cruda, salmone, rucola, uovo sodo e pomodoro',\n 'price' => 650,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'salmon-sanwitch.jpg',\n 'restaurant_id' => 10,\n ],\n [\n //'id' => 9,\n //'categories' => Fast-Food\n 'name' => 'Big Manzo',\n 'ingredients' => 'Carne di Manzo, pomodoro',\n 'description' => 'Burger di puro manzo al piatto, cotto alla perfezione e servito con insalata e pomodoro',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'big-manzo.jpg',\n 'restaurant_id' => 10,\n ],\n [\n //'id' => 10,\n //'categories' => Fast-Food\n 'name' => 'Crispy Ham Sandwich',\n 'ingredients' => 'Carne (maiale), pomodoro, rucola, cipolle',\n 'description' => 'Tre fette di pane integrale tostato con prosciutto cotto, provola, pomodoro, rucola, crispy onions flakes e salsa 1950',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'crispy ham sandwitch.jpg',\n 'restaurant_id' => 12,\n ],\n [\n //'id' => 11,\n //'categories' => Fast-Food\n 'name' => 'Cheese Burger',\n 'ingredients' => 'Carne (Manzo), pomodoro, insalata, formaggio',\n 'description' => 'Abbiamo arricchito il nostro hamburger con fettine di formaggio Cheddar, insalata e\n pomodoro',\n 'price' => 650,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cheese burger.jpg',\n 'restaurant_id' => 12,\n ],\n [\n //'id' => 12,\n //'categories' => Fast-Food\n 'name' => 'Vegeterian Sandwich',\n 'ingredients' => 'Formaggio, uovo, pomodoro, insalata, funghi',\n 'description' => 'tre fette di pane integrale tostato con pomodoro, scamorza, uovo sodo, insalata e salsa funghi',\n 'price' => 550,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'vegetarian-sanwitch.jpg',\n 'restaurant_id' => 14,\n ],\n [\n //'id' => 13,\n //'categories' => Fast-Food\n 'name' => 'Robert Beef Burger ',\n 'ingredients' => 'Carne (Manzo), formaggio, avocado, bacon',\n 'description' => 'Dalla fantasia del mitico Robert, 230 gr di puro manzo del Bel Paese cucinati in\n pietra lavica, mexican guacamole di Avocado Hass, provolone filante affumicato D.O.P., bacon croccante,\n salsa Blue Cheese, insalata gentile e pomodorini',\n 'price' => 850,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'robert burger.jpg',\n 'restaurant_id' => 14,\n ],\n [\n //'id' => 14,\n //'categories' => Fast-Food\n 'name' => '1950 D.O.C. Beef Burger',\n 'ingredients' => 'Carne (Manzo), basilico, pomodoro',\n 'description' => 'Burger dai profumi italiani, 230 gr di puro manzo del Bel Paese cucinati in pietra\n lavica, mozzarella di bufala campana DOC, fresca insalata gentile, pomodorini, foglie di basilico, olio EVO',\n 'price' => 750,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => '9.jpg',\n 'restaurant_id' => 14,\n ],\n [\n //'id' => 15,\n //'categories' => Fast-Food\n 'name' => 'Nicky Beef Burger',\n 'ingredients' => 'Carne (Manzo), tartufo, miele, formaggio tomino',\n 'description' => '250 gr di puro manzo impastati a mano, croccanti cuori di insalata Iceberg, tartufo\n nero in crema, gustosissimo tomino piemontese fuso e impreziosito da gocce di miele',\n 'price' => 750,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'nicky-beef-burger.jpg',\n 'restaurant_id' => 14,\n ],\n [\n //'id' => 16,\n //'categories' => Fast-Food\n 'name' => 'Scrambled Bun',\n 'ingredients' => 'Uova, formaggio, funghi',\n 'description' => 'Panino multicereali con uova strapazzate mantecate con formaggio Cheddar, prezzemolo,\n funghi trifolati e zucchine grigliate',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'scrambled bun.jpg',\n 'restaurant_id' => 14,\n ],\n [\n //'id' => 17,\n //'categories' => McDonalds\n 'name' => 'Gran Crispy McBacon',\n 'ingredients' => 'Carne Italiana, formaggio, salsa',\n 'description' => 'Chi ama il Crispy McBacon ne prenderebbe volentieri un altro e un altro e un altro e\n un altro ancora. Per questo c’è il Gran Crispy McBacon: carne 100% bovina da allevamenti italiani,\n croccante bacon 100% da pancetta italiana, formaggio e salsa Crispy. Come il classico,\n ma ancora più grande.',\n 'price' => 720,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'crispy-mc-bacon.jpg',\n 'restaurant_id' => 16,\n ],\n [\n //'id' => 18,\n //'categories' => McDonalds\n 'name' => 'McChicken Originale',\n 'ingredients' => 'Pollo, insalata, salsa',\n 'description' => 'Tutta la semplicità del petto di pollo con una panatura croccante insieme all’insalata\n iceberg e all’inconfondibile salsa McChicken. Basta questo per un Grande Classico dal gusto\n irresistibile.',\n 'price' => 520,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'mc-chicken.jpg',\n 'restaurant_id' => 16,\n ],\n [\n //'id' => 19,\n //'categories' => McDonalds\n 'name' => 'Double Chicken BBQ',\n 'ingredients' => 'Pollo, insalata, formaggio, salsa',\n 'description' => 'Un must per tutti gli amanti del pollo. Due croccanti fette di pollo impanato fanno da\n base per il formaggio filante, per la lattuga fresca e per la salsa barbecue. Nasce così un Grande\n Classico dal gusto affumicato davvero irresistibile.',\n 'price' => 640,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'double-chicken-bbq.jpg',\n 'restaurant_id' => 16,\n ],\n [\n //'id' => 20,\n //'categories' => McDonalds\n 'name' => 'Crispy Chicken McWrap',\n 'ingredients' => 'Pollo, bacon, formaggio, salsa',\n 'description' => 'Pollo 100% italiano, croccante bacon 100% da pancetta italiana, formaggio e\n l’inconfondibile salsa Crispy, avvolti in una fragrante tortilla.',\n 'price' => 570,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'Mc-wrap.jpg',\n 'restaurant_id' => 16,\n ],\n [\n //'id' => 21,\n //'categories' => McDonalds\n 'name' => 'McToast',\n 'ingredients' => 'Carne (Maiale), formaggio',\n 'description' => 'Perché essere quadrati? Quando il profumo del prosciutto cotto si unisce alla dolcezza\n del formaggio fuso e a tutto il gusto McDonald’s, nasce McToast: il primo (e l’unico) Toast rotondo.',\n 'price' => 570,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'McToast.jpg',\n 'restaurant_id' => 16,\n ],\n\n //PIZZERIE\n [\n //'id' => 24,\n //'categories' => Pizzeria\n 'name' => 'Margherita',\n 'ingredients' => 'Pomodoro, mozzarella, basilico',\n 'description' => 'Pizza con impasto lievitato almeno 24 ore, cotta a legna, tutti gli ingredienti sono di nostra produzione.',\n 'price' => 500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'piz (22).jpg',\n 'restaurant_id' => 1,\n ],\n [\n //'id' => 25,\n //'categories' => Pizzeria\n 'name' => 'Diavola',\n 'ingredients' => 'Pomodoro, mozzarella, salamino piccante, polvere di habanero',\n 'description' => 'Pizza con impasto lievitato almeno 24 ore, cotta a legna, tutti gli ingredienti sono di nostra produzione.',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'piz (1).jpg',\n 'restaurant_id' => 1,\n ],\n [\n //'id' => 26,\n //'categories' => Pizzeria\n 'name' => 'Chicago style',\n 'ingredients' => 'Pomodoro, mozzarella, parmigiano,',\n 'description' => 'Pizza con doppio impasto lievitato almeno 24 ore, cotta in padella di ghisa a bassa temperatura, tutti gli ingredienti sono di nostra produzione.',\n 'price' => 900,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'piz (10).jpg',\n 'restaurant_id' => 1,\n ],\n [\n //'id' => 27,\n //'categories' => Pizzeria\n 'name' => 'Formaggiosa',\n 'ingredients' => 'Pomodoro, mozzarella, parmigiano, fontina, gorgonzola piccante ',\n 'description' => 'Pizza con impasto lievitato almeno 24 ore, cotta in padella di ghisa a bassa temperatura, tutti gli ingredienti sono di nostra produzione.',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'piz (3).jpg',\n 'restaurant_id' => 3,\n ],\n [\n //'id' => 28,\n //'categories' => Pizzeria\n 'name' => 'Calzone farcito',\n 'ingredients' => 'Pomodoro, mozzarella, parmigiano, funghi, prosciutto arrosto, scamorza affumicata',\n 'description' => 'Calzone con impasto lievitato almeno 24 ore, cotta in padella di ghisa a bassa temperatura, tutti gli ingredienti sono di nostra produzione.',\n 'price' => 800,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'piz (27).jpg',\n 'restaurant_id' => 3,\n ],\n [\n //'id' => 29,\n //'categories' => Pizzeria\n 'name' => 'Capricciosa',\n 'ingredients' => 'Pomodoro, mozzarella, carciofini, uova, olive e prosiutto',\n 'description' => 'Pizza integrale, cotta in forno a legna, tutti gli ingredienti sono di nostra produzione.',\n 'price' => 750,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'capricciosa.jpg',\n 'restaurant_id' => 9,\n ],\n [\n //'id' => 30,\n //'categories' => Pizzeria\n 'name' => 'Vegetariana',\n 'ingredients' => 'Zucchine, melanzane e peperoni',\n 'description' => 'Una focaccia con olio EVO tutta vegetariana, non rinunciare mai alla pizza.',\n 'price' => 650,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'vegetariana.jpg',\n 'restaurant_id' => 9,\n ],\n [\n //'id' => 31,\n //'categories' => Pizzeria\n 'name' => 'Boscaiola',\n 'ingredients' => 'Mozzarella funghi e salsiccia',\n 'description' => 'Un grande classico della pizza dal sapore inconfondibile.',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'boscaiola.jpg',\n 'restaurant_id' => 20,\n ],\n [\n //'id' => 31,\n //'categories' => Pizzeria\n 'name' => 'Zuccosa',\n 'ingredients' => 'Mozzarella Zucca e salsiccia',\n 'description' => 'La classica pizza del contadino. Dal sapore autunnale inconfondibile.',\n 'price' => 680,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'zuccosa.jpg',\n 'restaurant_id' => 20,\n ],\n [\n //'id' => 32,\n //'categories' => Pizzeria\n 'name' => 'Napoli',\n 'ingredients' => 'Mozzarella, pomodoro, alici',\n 'description' => 'Il sapore delle più buone alici del sud su una pizza dal bordo alto.',\n 'price' => 750,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'napoli.jpg',\n 'restaurant_id' => 20,\n ],\n [\n //'id' => 33,\n //'categories' => Pizzeria\n 'name' => 'Origano Bio',\n 'ingredients' => 'Pomodoro, origano',\n 'description' => 'Pizza Bio dalla A alla Z. Tutti gli ingredienti di questa favolosa pizza provengono dai nostri fornitori locali.',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'origano-bio.jpg',\n 'restaurant_id' => 20,\n ],\n [\n //'id' => 34,\n //'categories' => Pizzeria\n 'name' => 'Salmonata',\n 'ingredients' => 'Salmone, robiola, insalata',\n 'description' => 'Sapore di mare con salmone 100% selvaggio proveniente dalla Norvegia. Il sapore unico del vero salmone.',\n 'price' => 800,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'salmonata.jpg',\n 'restaurant_id' => 20,\n ],\n\n // SUSHI\n [\n //'id' => 32,\n //'categories' => Sushi\n 'name' => 'Sushi mix',\n 'ingredients' => 'Osomaki salmone-tonno-cetriolo, futomaki, nigiri tonno-salmone, spicy roll',\n 'description' => 'Sushi misto 24pz',\n 'price' => 1500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' =>'sush (1).jpg',\n 'restaurant_id' => 5,\n ],\n [\n //'id' => 33,\n //'categories' => Sushi\n 'name' => 'Carolina Roll',\n 'ingredients' => 'Salmone, riso, philadelphia, alga nori',\n 'description' => 'Roll 10pz',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'sush (4).jpg',\n 'restaurant_id' => 5,\n ],\n [\n //'id' => 34,\n //'categories' => Sushi\n 'name' => 'Mango twist',\n 'ingredients' => 'Salmone, riso, avocado, philadelphia, wasabi, alga nori, riduzione di mango',\n 'description' => 'Rango twist 6pz con con di cipolle fritte ',\n 'price' =>500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'sush (11).jpg',\n 'restaurant_id' => 5,\n ],\n [\n //'id' => 35,\n //'categories' => Sushi\n 'name' => 'Futomaki',\n 'ingredients' => 'Salmone, riso, alga nori, panatura (farina di riso, pane, mais)',\n 'description' => 'Roll fritto 8pz',\n 'price' => 500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'sush (13).jpg',\n 'restaurant_id' => 18,\n ],\n [\n //'id' => 36,\n //'categories' => Sushi\n 'name' => 'Ramen',\n 'ingredients' => 'Manzo, noodles, uova, naruto, cipollotto, brodo, germogli di soia',\n 'description' => 'Ramen tradizionale giapponese (Okinawa)',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'sush (18).jpg',\n 'restaurant_id' => 18,\n ],\n [\n //'id' => 37,\n //'categories' => Sushi\n 'name' => 'Maki Misto',\n 'ingredients' => 'Pesce, avocado, mango, alga',\n 'description' => 'Maki 18 pezzi',\n 'price' => 1100,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'maki-misto.jpg',\n 'restaurant_id' => 18,\n ],\n\n // MESSICANO\n [\n //'id' => 39,\n //'categories' => Messicano\n 'name' => 'Tortillas',\n 'ingredients' => 'Manzo sfilacciato, avocado, cipolla bianca, salsa al mango',\n 'description' => 'Tortillas fatte in casa con cottura alla piastra',\n 'price' => 450,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'mex (2).jpg',\n 'restaurant_id' => 2,\n ],\n [\n //'id' => 40,\n //'categories' => Messicano\n 'name' => 'Nachos Vamos',\n 'ingredients' => 'Nachos, jalapenoa fette, salsa burger, chilly con carne',\n 'description' => 'Crunchy nachos cottura al forno, con chilly di carne a lenta cottura ',\n 'price' => 350,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'mex (16).jpg',\n 'restaurant_id' => 2,\n ],\n [\n //'id' => 41,\n //'categories' => Messicano\n 'name' => 'Mexican fit meal',\n 'ingredients' => 'Polpette, riso, piselli, avocado, brodo, jalapeno',\n 'description' => 'Gustoso piatto completo a basso contenuno di grassi, elevato contenuto proteico e tanto gusto',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'mex (11).jpg',\n 'restaurant_id' => 2,\n ],\n [\n //'id' => 42,\n //'categories' => Messicano\n 'name' => 'Summer burrito',\n 'ingredients' => 'Pollo, riso, piadina, cipolla stufata, fagioli neri, peperoni rossi e gialli, lime',\n 'description' => 'Burrito fresco e facile da mangiare, diviso in 4 porzioni, idele per estate',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'mex (3).jpg',\n 'restaurant_id' => 10,\n ],\n [\n //'id' => 43,\n //'categories' => Messicano\n 'name' => 'Churros',\n 'ingredients' => 'Churros, nutella o duche de leche o miele',\n 'description' => 'Churros fritti al momento con zucchero e guarnizione a scelta',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'mex (21).jpg',\n 'restaurant_id' => 10,\n ],\n [\n //'id' => 44,\n //'categories' => Messicano\n 'name' => 'Texas Burrito',\n 'ingredients' => 'Pollo, peperoni, formaggio',\n 'description' => 'Tortilla di farina extra large ripiena di pollo e peperoni saltata con mix di verdure\n homemade e formaggio Tex-Mex. Servita con patatine fritte, guacamole e sour cream.',\n 'price' => 500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'Texasburito.jpg',\n 'restaurant_id' => 13,\n ],\n [\n //'id' => 45,\n //'categories' => Messicano\n 'name' => 'Fajutas de pollo',\n 'ingredients' => 'Pollo, peperoni, guacamole, piccante',\n 'description' => 'Deliziose striscioline di carne di pollo saltate in padella con un mix homemade di\n spezie, peperoni e cipolle. Servite con tortillas, guacamole, salsa rossa piccante, riso e sour cream.',\n 'price' => 550,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'Fajutas-de-pollo.jpg',\n 'restaurant_id' => 13,\n ],\n [\n //'id' => 46,\n //'categories' => Messicano\n 'name' => 'Fajutas de res',\n 'ingredients' => 'Manzo, peperoni, cipolle, piccante',\n 'description' => 'Deliziose striscioline di carne di manzo saltate in padella con un mix homemade di\n spezie, peperoni e cipolle. Servite con tortillas, guacamole, salsa rossa piccante, riso e sour cream.',\n 'price' => 620,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'fajutas-de-res.jpg',\n 'restaurant_id' => 13,\n ],\n [\n //'id' => 47,\n //'categories' => Messicano\n 'name' => 'Chilli con carne',\n 'ingredients' => 'Manzo, fagioli, formaggio',\n 'description' => 'Carne di manzo, pomodoro, fagioli e jalapeños. Servita con tortillas, sour cream,\n formaggio Cheddar a scaglie e nachos.',\n 'price' => 720,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'chilly-con-carne.jpg',\n 'restaurant_id' => 13,\n ],\n [\n //'id' => 48,\n //'categories' => Messicano\n 'name' => 'Taco de pollo',\n 'ingredients' => 'Pollo, pomodoro, formaggio, riso',\n 'description' => 'Due tortillas di farina ripiene di pollo in salsa di pomodoro speziata e formaggio.\n Servite con riso mex, sour cream e guacamole.',\n 'price' => 640,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'taco-de-pollo.jpg',\n 'restaurant_id' => 13,\n ],\n [\n //'id' => 49,\n //'categories' => Messicano\n 'name' => 'Vegeterian burrito',\n 'ingredients' => 'Verdre miste, fagioli, formaggio',\n 'description' => 'Tortilla di farina gigante ripiena di formaggio, zucchine, melanzane, peperoni,\n fagioli, mais e salsa di pomodoro. Servita con fagioli e guacamole.',\n 'price' => 620,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'vegetarian-burrito.jpg',\n 'restaurant_id' => 19,\n ],\n [\n //'id' => 50,\n //'categories' => Messicano\n 'name' => 'Salmon wrap',\n 'ingredients' => 'Salmone, insalata, pomodori, feta',\n 'description' => 'Tortilla farcita con salmone affumicato, riso basmati, guacamole, insalata,\n pomodorini, feta greca e onion crispy flakes, accompagnata da patatine fritte e salse West Coast.',\n 'price' => 720,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'salmon-wrap.jpg',\n 'restaurant_id' => 19,\n ],\n [\n //'id' => 51,\n //'categories' => Messicano\n 'name' => 'Vegeterian burrito',\n 'ingredients' => 'Verdre miste, fagioli, formaggio',\n 'description' => 'Tortilla di farina gigante ripiena di formaggio, zucchine, melanzane, peperoni,\n fagioli, mais e salsa di pomodoro. Servita con fagioli e guacamole.',\n 'price' => 720,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'vegetarian-burrito.jpg',\n 'restaurant_id' => 19,\n ],\n [\n //'id' => 52,\n //'categories' => Messicano\n 'name' => 'Fruit Salad',\n 'ingredients' => 'Insalata, frutta',\n 'description' => 'Sfiziosa insalata con rucola, finocchio e frutta di stagione.',\n 'price' => 440,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'fruit-salad.jpg',\n 'restaurant_id' => 19,\n ],\n [\n //'id' => 53,\n //'categories' => Messicano\n 'name' => 'Cesar Salad',\n 'ingredients' => 'Insalata, parmigiano, salsa',\n 'description' => 'Insalata romana, pomodoro, pane tostato, scaglie di parmigiano, accompagnata da salsa\n Caesar.',\n 'price' => 520,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cesar-salad.jpg',\n 'restaurant_id' => 19,\n ],\n\n //BAKERY\n [\n //'id' => 54,\n //'categories' => Bakery\n 'name' => 'Cinnamon Roll',\n 'ingredients' => 'Burro, vaniglia (bacca), uova, LATTE, zucchero, uova, cannella',\n 'description' => 'Cinnamon roll freschi di giornata impacchettati caldi',\n 'price' => 300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bak (8).jpg',\n 'restaurant_id' => 9,\n ],\n [\n //'id' => 55,\n //'categories' => Bakery\n 'name' => 'Donut al cioccolato',\n 'ingredients' => 'Burro, vaniglia (bacca), uova, LATTE, zucchero, uova, cioccolato',\n 'description' => 'I donuts (o doughnuts) sono molto simili alle ciambelle italiane, ma invece di essere cosparsi di zucchero bianco, sono ricoperti di glassa di svariati colori e sapori.',\n 'price' => 150,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bak (19).jpg',\n 'restaurant_id' => 9,\n ],\n [\n //'id' => 56,\n //'categories' => Bakery\n 'name' => 'American Cookies',\n 'ingredients' => 'Burro, vaniglia (bacca), cacao amaro, uova, LATTE, zucchero, uova, gocce di cioccolato',\n 'description' => 'Cookies classici, nella variante chocolate chip o al cacao',\n 'price' => 100,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bak (16).jpg',\n 'restaurant_id' => 9,\n ],\n [\n //'id' => 57,\n //'categories' => Bakery\n 'name' => 'Cupcakes caramello salato',\n 'ingredients' => 'Burro, vaniglia (bacca), cacao, uova, caramello salato, LATTE, zucchero, frosting, panna',\n 'description' => 'Cupcake base cacao con cuore di caramello salato, panna e topping di caramello salato croccante.',\n 'price' => 300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bak (21).jpg',\n 'restaurant_id' => 11,\n ],\n [\n //'id' => 58,\n //'categories' => Bakery\n 'name' => 'Lemon meringue tart',\n 'ingredients' => 'Lemon curd, limoni di Sorrento, uova, LATTE, maringa italiana',\n 'description' => 'Tortina con base frolla e zucchero moscovado, lemon curd e meringa flambata',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bak (25).jpg',\n 'restaurant_id' => 11,\n ],\n [\n //'id' => 59,\n //'categories' => Bakery\n 'name' => 'New York Cheesecake',\n 'ingredients' => 'Latte, formaggio, cioccolato, frutta',\n 'description' => 'Da New York, la tradizionale torta americana al gusto di Philadelphia. Provala con i\n nostri topping homemade al gusto di fragola, frutti di bosco, cioccolato o Nutella.',\n 'price' => 450,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'nwe-york-cheesecake.jpg',\n 'restaurant_id' => 15,\n ],\n [\n //'id' => 60,\n //'categories' => Bakery\n 'name' => 'Deep chocolate cake',\n 'ingredients' => 'Latte, cioccolato, uova',\n 'description' => 'Una torta con tre strati di delizioso cioccolato, servita tiepida e accompagnata da\n panna montata.',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'deep-chocolate-cake.jpg',\n 'restaurant_id' => 15,\n ],\n [\n //'id' => 61,\n //'categories' => Bakery\n 'name' => 'Torta Oreo',\n 'ingredients' => 'Latte, cioccolato, uova',\n 'description' => 'Morbido cioccolato bianco e nero si fondono con i famosi biscotti Oreo. Servita con\n panna montata.',\n 'price' => 470,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'torta-oreo.jpg',\n 'restaurant_id' => 15,\n ],\n [\n //'id' => 62,\n //'categories' => Bakery\n 'name' => 'Toffee apple crumble',\n 'ingredients' => 'Latte, mela, gelato vaniglia',\n 'description' => 'Tipico crumble di mele alla cannella racchiuso in un basket di pastafrolla con cuore di caramello, servito con gelato alla vaniglia.',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'apple-crumble.jpg',\n 'restaurant_id' => 15,\n ],\n [\n //'id' => 63,\n //'categories' => Bakery\n 'name' => 'Vegan apple pie',\n 'ingredients' => 'Latte, uova, mela, cannella',\n 'description' => 'Una ricca variante vegana della classica Apple Pie. Crostata di pasta frolla con\n ripieno di mele al profumo di cannella e mandorle tostate.',\n 'price' => 380,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'vegan-apple-pie.jpg',\n 'restaurant_id' => 15,\n ],\n [\n //'id' => 64,\n //'categories' => Bakery\n 'name' => 'Sandy Yogurt',\n 'ingredients' => 'Latte, frutta',\n 'description' => 'Cremoso yogurt gelato guarnito con frutta fresca, cereali e marmellata homemade di\n frutti di bosco.',\n 'price' => 350,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'sandy-yogurt.jpg',\n 'restaurant_id' => 21,\n ],\n [\n //'id' => 65,\n //'categories' => Bakery\n 'name' => 'Danny Yogurt',\n 'ingredients' => 'Latte, uova, mela, cannella',\n 'description' => 'Cremoso yogurt gelato guarnito con Nutella e granella di nocciole. Lasciati trasportare da questi fantastici sapori.',\n 'price' => 350,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'danny-yogurt.jpg',\n 'restaurant_id' => 21,\n ],\n\n //POKE\n [\n //'id' => 68,\n //'categories' => Poke\n 'name' => 'Hawaii',\n 'ingredients' => 'Mango, salmone, riso bianco, avocado, cetriolo, sesamo, lime, salsa yogurt',\n 'description' => \"Voglia di vacanza? con il nostro poke Hawaii ti trasportiamo dall'altra parte del mondo.\",\n 'price' => 1400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pok (7).jpg',\n 'restaurant_id' => 2,\n ],\n [\n //'id' => 69,\n //'categories' => Poke\n 'name' => 'Spicy salmon',\n 'ingredients' => 'Salmone marinato in salsa teryiaki, riso rosso, avocado, cetriolo, sesamo, lime, salsa teryiaki, soia',\n 'description' => 'Prova il gusto del nostro salmone marinato 48 ore in salsa teryiaki, non potrai più farne a meno.',\n 'price' => 900,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pok (10).jpg',\n 'restaurant_id' => 2,\n ],\n [\n //'id' => 70,\n //'categories' => Poke\n 'name' => 'Tasty Calamaro',\n 'ingredients' => 'Calamaro alla piastra, salmone, riso bianco, avocado, cetriolo, sesamo, lime, salsa yogurt',\n 'description' => 'Il più buon calamaro alla piastra arricchito con dei sapori unici.',\n 'price' => 1200,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pok (12).jpg', //'/path/img',\n 'restaurant_id' => 6,\n ],\n [\n //'id' => 71,\n //'categories' => Poke\n 'name' => 'Crunchy salad',\n 'ingredients' => 'Tempeh alla griglia, parmigiano, avocado, soia, cuore di lattuga, salsa teryiaki',\n 'description' => 'Hai mia provato il Tempeh? se la risposta è no questa è la tua occasione. Adatto per i vegetariani.',\n 'price' => 1200,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pok (13).jpg',\n 'restaurant_id' => 6,\n ],\n [\n //'id' => 72,\n //'categories' => Poke\n 'name' => 'Yellow explosion',\n 'ingredients' => 'Salmone, pomodoro, mais tostato, carote, semi di papavero, raddichio, sedano, salsa al sesamo',\n 'description' => 'Salmone selvaggio Norvegese con il croccante del mais toststo, provare per credere.',\n 'price' => 1500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pok (15).jpg',\n 'restaurant_id' => 6,\n ],\n [\n //'id' => 73,\n //'categories' => Poke\n 'name' => 'Fruit Tornado',\n 'ingredients' => 'Avocado, susine, fragole, ribes rosso, melagrana, mirtilli, lamponi, more, rucola, ribes nero, riduzione di mirtillo selvatico',\n 'description' => 'Un mix di frutti esotici che difficilemte dimenticherai.',\n 'price' => 1200,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pok (16).jpg',\n 'restaurant_id' => 18,\n ],\n [\n //'id' => 74,\n //'categories' => Poke\n 'name' => 'Poke Aloha',\n 'ingredients' => 'Salmone, verdure, semi',\n 'description' => 'Tartare di salmone piccante, surimi, edamame, cipolla fritta e semi di sesamo. Provalo e dicci cosa ne pensi.',\n 'price' => 1250,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'poke-aloha.jpg',\n 'restaurant_id' => 18,\n ],\n\n // PESCE\n [\n //'id' => 79,\n //'categories' => Pesce\n 'name' => 'Branzino alla griglia',\n 'ingredients' => 'Branzino, erbe aromatiche, aglio, limone, lime',\n 'description' => 'Branzino pescato in giornata alla griglia con erbe aromatiche e agrumi',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pesc (3).jpg',\n 'restaurant_id' => 5,\n ],\n [\n //'id' => 80,\n //'categories' => Pesce\n 'name' => 'Salmone alla griglia',\n 'ingredients' => 'Salmone, erbe aromatiche, aglio, limone, lime',\n 'description' => 'Salmone pescato in giornata alla griglia con erbe aromatiche e agrumi',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pesc (2).jpg',\n 'restaurant_id' => 5,\n ],\n [\n //'id' => 81,\n //'categories' => Pesce\n 'name' => \"Spaghetti all'astice\",\n 'ingredients' => 'Uova, farina 00, acqua, astice, prezzemolo ',\n 'description' => 'Spaghetti alla chitarra fatti in casa con astice fresco del mediterraneo',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pesc (14).jpg',\n 'restaurant_id' => 6,\n ],\n [\n //'id' => 82,\n //'categories' => Pesce\n 'name' => 'Carpaccio di branzino',\n 'ingredients' => 'Branzino, capperi, olive taggiasche, limone ',\n 'description' => 'Branzinpo crudo con salsa di limone, capperi e polvere di olive taggiasche',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pesc (18).jpg',\n 'restaurant_id' => 6,\n ],\n [\n //'id' => 83,\n //'categories' => Pesce\n 'name' => 'Mazzancolle Flambate',\n 'ingredients' => 'Mazzancolle, vin santo, mandarino, prezzemolo, aglio',\n 'description' => 'Mazzancolle marinate e flambate vin santo e succo di mandarino e servite con riduzione di mandarino',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'pesc (21).jpg',\n 'restaurant_id' => 7,\n ],\n [\n //'id' => 84,\n //'categories' => Pesce\n 'name' => 'Zuppa di pesce misto',\n 'ingredients' => 'Totani medi puliti, seppioline pulite, scampi, bicchiere di vino bianco, pomodori pelati scolati',\n 'description' => \"Una ricetta di mare molto gustosa con il pesce fresco da accompagnare con del pane. Per un pranzo o una cena d'estate.\",\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'zuppa-mare.jpg',\n 'restaurant_id' => 7,\n ],\n\n // CARNE\n [\n //'id' => 85,\n //'categories' => Carne\n 'name' => 'Tagliata di manzo',\n 'ingredients' => 'Manzo, sale grosso',\n 'description' => 'Tagliata di Chianina con sale grosso e riduzione dei sughi della carne e di vino rosso',\n 'price' => 2500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'car (1).jpg',\n 'restaurant_id' => 1,\n ],\n [\n //'id' => 86,\n //'categories' => Carne\n 'name' => 'Tomawk',\n 'ingredients' => 'Black Angus, aromi, sale',\n 'description' => 'Tomawk di Black Angus Australiano certificato cotto alla brace',\n 'price' => 3000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'car (3).jpg',\n 'restaurant_id' => 1,\n ],\n [\n //'id' => 87,\n //'categories' => Carne\n 'name' => 'Tartare di manzo',\n 'ingredients' => 'Manzo, uovo, polvere di capperi, sale grosso, cetriolini, pepe nero',\n 'description' => 'Tartare di manzo servita con uovo e accompagnata da 4 condimenti separati',\n 'price' => 1000,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'car (5).jpg',\n 'restaurant_id' => 4,\n ],\n [\n //'id' => 88,\n //'categories' => Carne\n 'name' => 'Ribs affumicate',\n 'ingredients' => 'Costolette di manzo, salsa barbecue, aromi',\n 'description' => 'Ribs di Black Angus Australiano servite con crosta di salsa barbecue e affumicate per 12ore con precottura a bassa temperatura',\n 'price' => 1500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'car (7).jpg',\n 'restaurant_id' => 4,\n ],\n [\n //'id' => 89,\n //'categories' => Carne\n 'name' => 'Bacon bombs',\n 'ingredients' => 'Salsiccia di maiale, bacon, formaggio',\n 'description' => 'Salsicce arrotolate con bacon affumicato di nostra produzione e cuore di formaggio',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'car (10).jpg',\n 'restaurant_id' => 7,\n ],\n [\n //'id' => 90,\n //'categories' => Carne\n 'name' => 'Spezzatino di manzo',\n 'ingredients' => 'Carne bovina, Sedano, Pepe nero, Burro, Rosmarino, Brodo di carne',\n 'description' => \"Ma tra i secondi piatti non c’è storia, lo spezzatino di manzo è quello che vince su tutti! La sua lenta cottura, i pochi ed essenziali profumi necessari affinché diventi così buono, ne fanno una ricetta che nessuno riesce a non amare.\",\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'spezzatino-di-manzo.jpg',\n 'restaurant_id' => 7,\n ],\n [\n //'id' => 91,\n //'categories' => Carne\n 'name' => 'Costine glassate',\n 'ingredients' => 'Costine di maiale, Peperoncino, Cumino, Paprika dolce, Senape gialla in polvere',\n 'description' => \"Per realizzare le costine glassate con salsa bbq si ha bisogno di una prelibata miscela di spezie in polvere, conosciuta come dry rub, che andrà a insaporire la carne dopo un bel massaggio.\",\n 'price' => 1500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'costine glassate.jpg',\n 'restaurant_id' => 7,\n ],\n [\n //'id' => 92,\n //'categories' => Carne\n 'name' => 'Coniglio alla Ligure',\n 'ingredients' => 'Coniglio, Timo, Rossese di Dolceacqua, Brodo di carne, Olive taggiasche, Pinoli, Rosmarino',\n 'description' => \"Questo piatto prelibato, altro non è se non l’accostamento tra la carne delicata e “dolce” del coniglio, ed il sapore invece abbastanza amarognolo dato dalle olive nere taggiasche, il vino locale, ed ovviamente le immancabili noci e pinoli.\",\n 'price' => 900,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'coniglio-alla-ligure.jpg',\n 'restaurant_id' => 8,\n ],\n [\n //'id' => 93,\n //'categories' => Carne\n 'name' => 'Bombette pugliesi',\n 'ingredients' => 'Fettine di vitello, Caciocavallo, Pancetta, Prezzemolo, Pepe nero',\n 'description' => \"Le bombette pugliesi sono un secondo piatto di carne tipico della cucina pugliese e consistono in involtini di vitello ripieni o in alcuni casi avvolti da pancetta, con un cuore saporito di caciocavallo.\",\n 'price' => 1200,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bombette pugliesi.jpg',\n 'restaurant_id' => 8,\n ],\n [\n //'id' => 94,\n //'categories' => Carne\n 'name' => 'Filetto di maiale',\n 'ingredients' => 'Filetto di maiale, Burro, Vino rosso, Scorza di limone, Scalogno',\n 'description' => \"Un secondo piatto raffinato, saporito e dalle note aromatiche, accompagnato da bocconcini di mela che conferiranno una gradevole nota agrodolce alla pietanza.\",\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'filetto-di-maiale.jpg',\n 'restaurant_id' => 8,\n ],\n [\n //'id' => 95,\n //'categories' => Carne\n 'name' => 'Maiale in agrodolce',\n 'ingredients' => 'Maiale, Cipolle, Carote, Farina, Passata di pomodoro, Aceto di vino bianco, Zucchero di canna',\n 'description' => \"I bocconcini di carne di maiale vengono prima coperti di pastella e fritti, poi arricchiti con verdure saltate al wok e cosparsi di una gustosissima salsina agrodolce.\",\n 'price' => 1100,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'maiale-in-agrodolce.jpg',\n 'restaurant_id' => 11,\n ],\n [\n //'id' => 96,\n //'categories' => Carne\n 'name' => \"Petto d'anatra\",\n 'ingredients' => \"Petto d'anatra, Timo, Miele, Insalata misticanza, Cipolle dorate, Aceto balsamico\",\n 'description' => \"Le carni pregiate dell'anatra sono classificate tra le carni nere e si distinguono per la loro morbidezza ed il colore rosato che assumono una volta cotte.\",\n 'price' => 1700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'petto-di-anatra.jpg',\n 'restaurant_id' => 11,\n ],\n [\n //'id' => 97,\n //'categories' => Carne\n 'name' => 'Bistecca alla Tartara',\n 'ingredients' => 'Filetto di vitello, Capperi, Succo di limone, Pepe nero, Worcestershire sauce, Prezzemolo, Tuorli',\n 'description' => \"La Bistecca alla tartara (o steak tartare) è un piatto classico della cucina internazionale, consiste in una preparazione a base di carne cruda fresca e macinata finemente che viene condita con olio, limone, salsa Worcershire e senape e accompagnata con un tuorlo d’uovo crudo.\",\n 'price' => 1300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'bistecca-alla-tartara.jpg',\n 'restaurant_id' => 11,\n ],\n\n // CINESE\n [\n //'id' => 98,\n //'categories' => Cinese\n 'name' => 'Bao',\n 'ingredients' => 'Gamberetti, cipolla, soia',\n 'description' => 'Soffici panini ripieni di gamberi cotti al vappore',\n 'price' => 300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cin (6).jpg',\n 'restaurant_id' => 4,\n ],\n [\n //'id' => 99,\n //'categories' => Cinese\n 'name' => 'Gyoza alla griglia',\n 'ingredients' => 'Manzo, cipolla, erba cipollina, soia',\n 'description' => 'Ravioli al manzo cotti alla piastra',\n 'price' => 500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cin (8).jpg',\n 'restaurant_id' => 4,\n ],\n [\n //'id' => 100,\n //'categories' => Cinese\n 'name' => 'Gyoza al vapore',\n 'ingredients' => 'Gamberi, cozze, cipolla, erba cipollina, soia',\n 'description' => 'Ravioli ai gamberetti cotti al vapore',\n 'price' => 500,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cin (10).jpg',\n 'restaurant_id' => 4,\n ],\n [\n //'id' => 101,\n //'categories' => Cinese\n 'name' => 'Zuppa di Miso',\n 'ingredients' => 'Acqua, carote, daikon, porri, zenzero, miso, alga wakame, tofu',\n 'description' => \"La misoshiru, zuppa di miso in giapponese, e' costituita da un brodo, aromatizzato con alga wakame e il miso\",\n 'price' => 300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'sush (24).jpg',\n 'restaurant_id' => 12,\n ],\n [\n //'id' => 102,\n //'categories' => Cinese\n 'name' => 'Involtini primavera',\n 'ingredients' => 'Cipolla ,cavolo, sfoglia, vino, arachidi',\n 'description' => \"In passato venivano preparati soprattutto in occasione del Capodanno cinese, che secondo il calendario tradizionale corrisponde con la data d'inizio della primavera. Ed ecco spiegato il loro nome: involtini primavera!\",\n 'price' => 300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cin (3).jpg',\n 'restaurant_id' => 12,\n ],\n [\n //'id' => 103,\n //'categories' => Cinese\n 'name' => 'Spaghetti saltati',\n 'ingredients' => 'Frutti di mare, spaghetti, cipolla, noodles di grano',\n 'description' => 'Noodles di grano fatti a mano dalla nostra figlia Mulan e con i frutti dalla pesca dello zio Mushu',\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'cin (5).jpg',\n 'restaurant_id' => 12,\n ],\n\n // VEGAN\n [\n //'id' => 105,\n //'categories' => Vegan\n 'name' => 'Spaghetti di zucchine',\n 'ingredients' => 'Zucchine, olive verdi, pomodoro, basilico',\n 'description' => 'Semplici e gustosi, la zucchina in una forma simpatica e appetitosa, accompagnata da pomodorini datterini, olive verdi e basilico fresco',\n 'price' => 700,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'veg (2).jpg',\n 'restaurant_id' => 17,\n ],\n [\n //'id' => 106,\n //'categories' => Vegan\n 'name' => 'Hummus di ceci',\n 'ingredients' => 'Ceci, olio di oliva, aglio, salsa tahina, limone, paprika',\n 'description' => 'Salsa di ceci speziata, perfetta da accompagniare con un pinzimonio fresco',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'veg (8).jpg',\n 'restaurant_id' => 17,\n ],\n [\n //'id' => 107,\n //'categories' => Vegan\n 'name' => 'Polpette vegetali',\n 'ingredients' => 'Ceci, pomodori secchi, aglio, melanzane, sesamo',\n 'description' => 'Polpette 100% di origine vegetale, con ceci, melanzane e pomodori secchi',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'veg (7).jpg',\n 'restaurant_id' => 17,\n ],\n [\n //'id' => 108,\n //'categories' => Vegan\n 'name' => 'Dahl di lenticchie',\n 'ingredients' => 'Lenticchie, curry, coriandolo, zenzero',\n 'description' => \"Piatto indiano molto speziato, perfetto per le giornate invernali grazie alle proprieta' riscaldanti dello zenzero ma adatto anche per tutti i mesi dell anno.\",\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'veg (1).jpg',\n 'restaurant_id' => 17,\n ],\n [\n //'id' => 109,\n //'categories' => Vegan\n 'name' => 'Cheesecake vegana fredda',\n 'ingredients' => 'Biscotti, margarina, formaggio vegetale, limone, panna vegetale, fragole',\n 'description' => 'Un classico americano rivisto in chiave vegana senza compromessi di gusto!',\n 'price' => 400,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'veg (3).jpg',\n 'restaurant_id' => 17,\n ],\n [\n //'id' => 110,\n //'categories' => Vegano\n 'name' => 'Parmigiana di melanzane',\n 'ingredients' => 'Melanzane ovali nere, Fiordilatte, Passata di pomodoro, Basilico, Olio di semi di arachide, Cipolle dorate',\n 'description' => \"Vi siete mai chiesti perché si chiami così? Il nome 'Parmigiana' deriverebbe proprio dal siciliano 'Parmiciana', che in dialetto indica la pila di listelle di legno delle persiane: pensate infatti a come vengono disposte le fette di melanzane in teglia e noterete le similitudini.\",\n 'price' => 1300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'parmigiana-di-melanzane.jpg',\n 'restaurant_id' => 21,\n ],\n [\n //'id' => 111,\n //'categories' => Vegano\n 'name' => 'Polpette di spinaci',\n 'ingredients' => 'Spinaci, Ricotta vaccina, Grana Padano DOP, Uova, Pangrattato, ',\n 'description' => \"Uno degli abbinamenti più riusciti in cucina, spinaci e ricotta, rinnova le promesse e ci invita a provare questi squisiti bocconcini fritti. \",\n 'price' => 600,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'polpette-di-spinaci.jpg',\n 'restaurant_id' => 21,\n ],\n [\n //'id' => 112,\n //'categories' => Vegano\n 'name' => 'Frittelle di patate',\n 'ingredients' => 'Patate, Rosmarino, Farina, Sale, Pepe nero, Olio di oliva',\n 'description' => \"Le frittelle croccanti di patate sono dei deliziosi bocconcini fritti da mangiare come antipasto o come secondo e che vi faranno riscuotere un grande successo.\",\n 'price' => 1300,\n 'visible' => 1,\n 'deleted' => 0,\n 'img' => 'frittelle-di-patate.jpg',\n 'restaurant_id' => 21,\n ],\n ];\n \n foreach ($products as $product) {\n DB::table('products')->insert($product);\n }\n }",
"function loadRecipe() {\n\t\tglobal $DB_LINK, $db_table_recipes, $LangUI;\n\t\t$sql = \"SELECT * FROM $db_table_recipes WHERE recipe_id=\" . $DB_LINK->addq($this->id, get_magic_quotes_gpc());\n\t\t$rc = $DB_LINK->Execute($sql);\n\t\tDBUtils::checkResult($rc, NULL, $LangUI->_('There was an error loading the ingredient'), $sql);\n\t\t$this->name = $rc->fields['recipe_name'];\n\t\t$this->ethnic = $rc->fields['recipe_ethnic'];\n\t\t$this->base = $rc->fields['recipe_base'];\n\t\t$this->course = $rc->fields['recipe_course'];\n\t\t$this->prep_time = $rc->fields['recipe_prep_time'];\n\t\t$this->difficulty = $rc->fields['recipe_difficulty'];\n\t\t$this->serving_size = $rc->fields['recipe_serving_size'];\n\t\t$this->directions = $rc->fields['recipe_directions'];\n\t\t$this->comments = $rc->fields['recipe_comments'];\n\t\t$this->source = $rc->fields['recipe_source'];\n\t\t$this->modified = $rc->fields['recipe_modified'];\n\t\t$this->private = $rc->fields['recipe_private'];\n\t\t$this->unitSystem = $rc->fields['recipe_system'];\n\t\t$this->user = $rc->fields['recipe_user'];\n\t}",
"public function prepareArguments() {}",
"public function add_product_ingredients() {\n permittedArea();\n \n\t$data['category_name'] = $this->db->get('smb_category');\n\t$data['product_name'] = $this->db->group_by('product_type')->get('product_preparation');\n\t$data['product'] = $this->db->get('product_preparation');\n\t$data['sub_category_name'] = $this->db->get('smb_sub_category');\n\t$data['title'] = $this->db->get(' smb_product');\n\t\n if ($this->input->post()) {\n if ($this->input->post('submit') != 'add_product')\n die('Error! sorry');\n\n $this->form_validation->set_rules('product_type', 'Product Type', 'trim|required');\n $this->form_validation->set_rules('quantity', 'Quantity', 'trim|required');\n\t\t\t$this->form_validation->set_rules('product_preparation', 'Product Preparation', 'trim|required');\t\t\t\n\t\t\t$this->form_validation->set_rules('net_weight', 'Item Weight', 'trim|required');\t\n \n if ($this->form_validation->run() == true) {\n $insert = $this->Product_preparation_model->add_product_ingredients();\n if ($insert) {\n $this->session->set_flashdata('successMsg', 'Product Added Successfully');\n redirect(base_url('Product_preparation/view_declared/'.$insert));\n\t\t\t\t\t//$this->view_declared($insert);\n }\n }\n }\n\n theme('add_product_ingredients', $data);\n }",
"public function getById_avecJointure(int $id){\n $sql = \"SELECT \n pizza.id, pizza.name,\n ingredient.id as id_ingredient, ingredient.name as name_ingredient, ingredient.isAllergen\n FROM pizza \n LEFT JOIN ingredient_pizza ON pizza.id = ingredient_pizza.pizza_id\n LEFT JOIN ingredient ON ingredient_pizza.ingredient_id = ingredient.id\n WHERE pizza.id=?\";\n\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([$id]);\n\n $result = $stmt->fetchAll();\n \n $pizza = new Pizza();\n $pizza->setName($result[0]['name']);\n $pizza->setId($result[0]['id']);\n\n $pizzaIngredient = [];\n foreach($result as $r){\n if($r['id_ingredient']){\n $ingredient = new Ingredient();\n $ingredient->setName($r['name_ingredient']);\n $ingredient->setIsAllergen($r['isAllergen']);\n $ingredient->setId($r['id_ingredient']);\n $pizzaIngredient[$ingredient->getId()] = $ingredient;\n }\n }\n $pizza->setIngredients($pizzaIngredient);\n\n return $pizza;\n }",
"public function run()\n {\n DB::table('ingredients')->insert([\n 'name' => 'Mascarpone (250g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Café noir non sucré (50cl)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Cacao amer (50cl)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Biscuits à la cuillère (24 pièces)',\n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Oeufs (3 pièces)',\n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Sucre roux (100g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Sucre vanillé (1 sachet)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Sucre (100g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Sel (50g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Eau (50cl)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Farine (300g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Chocolat (200g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Vanille (2 gousses)',\n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Fraise (200g)'\n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Pomme (200h)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Banane (200g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Miel (1 cuillère à soupe)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Beurre (125g)',\n \n ]);\n DB::table('ingredients')->insert([\n 'name' => 'Creme (25cl)',\n ]);\n }",
"public function ingredients()\n {\n return $this->belongsTo('App\\Models\\Ingredient');\n }",
"function prepare_items() {\n\t\tglobal $post;\n\n\t\t$this->regs = query_posts( \"post_parent={$post->ID}&post_type=ep_reg\" );\n\t\t$this->total_items = count( $this->regs );\n\t}",
"public function run()\n {\n //Factory for the address\n CustomizePizza::create([\n 'order_item_id' => 1,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 2,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 3,\n 'item_price_id' => 63,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 4,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 5,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 6,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 7,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 8,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 9,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 10,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 11,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 12,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 13,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 14,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 15,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 16,\n 'item_price_id' => 63,\n 'quantity' => '3',\n ]);\n }",
"public function run()\n {\n DB::table('ingredients')->insert([\n\n\n //Dairy\n\n\n ['ingredient' => 'Butter',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Egg',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Milk',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Parmesan',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Cheddar',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Sour cream',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Cream cheese',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Mozzarella',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Cream',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Butter Milk',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Feta',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Ricotta',\n 'category_id' => '1'\n ],\n ['ingredients' => 'grated cheese',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Goat cheece',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Powdered milk',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Brie',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Ghee',\n 'category_id' => '1'\n ],\n ['ingredients' => 'Creme fraiche',\n 'category_id' => '1'\n ],\n ['ingredient' => 'Mascarpone',\n 'category_id' => '1'\n ],\n ['ingredient' => 'Halloumi',\n 'category_id' => '1'\n ],\n ['ingredient' => 'Paneer',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Margarine',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Coconut milk',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Almond milk',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Soy milk',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Rice milk',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Hemp milk',\n 'category_id' => '1'\n ],\n [ 'ingredient' => 'Non dairy creamer',\n 'category_id' => '1'\n ],\n\n //Vegetables\n\n\n ['ingredient' => 'Onion',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Garlic',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Tomato',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Potato',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Carrot',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Bell pepper',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Basil',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Parsley',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Broccoli',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Corn',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Spinach',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Mushroom',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Green beans',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Ginger',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Chilli pepper',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Celery',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Rosemary',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Salad green',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Cucumber',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Pickle',\n 'category_id' => '2'\n ],\n ['ingredient' => 'avocado',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Zucchini',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Cilantro',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Olive',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Asparagus',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Cabbage',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Cauliflower',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Dill',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Kale',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Mixed vegetable',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Pumpkin',\n 'category_id' => '2'\n ],\n ['ingredient' => 'squash',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Mint',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Scallion',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Shallot',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Eggplant',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Beet',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Butternut squash',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Horseradish',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Leek',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Caper',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Brussels Sprout',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Artichoke heart',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Chia seeds',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Radish',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Sauerkraut',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Artichoke',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Sweet pepper',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Arugula',\n 'category_id' => '2'\n ],\n ['ingredient' => 'spaghetti squash',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Capsicum',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Bok Choy',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Okra',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Yam',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Fennel',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Snow peas',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Bean sprouts',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Seaweed',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Chard',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Collard',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Piniento',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Watercress',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Tomatillo',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Rocket',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Mustard greens',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Endive',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Jicama',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Kohlrabi',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Butternut',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Celery root',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Daikon',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Radicchio',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Porcini',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Cress',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Water chestnut',\n 'category_id' => '2'\n ],\n\n ['ingredient' => 'Dulse',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Micro greens',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Burdock',\n 'category_id' => '2'\n ],\n ['ingredient' => 'Chayote',\n 'category_id' => '2'\n ],\n\n\n //Fruits\n\n\n ['ingredient' => 'Lemon',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Apple',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Banana',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Lime',\n 'category_id' => '3'\n ],\n ['ingredient' => 'strawberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Orange',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Pineapple',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Blueberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Raisin',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Coconut',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Grape',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Peach',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Raspberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Cranberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Mango',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Pear',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Blackberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Cherry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Date',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Watermelon',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Berries',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Kiwi',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Grapefruit',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Mandarin',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Craisins',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Cantaloupe',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Plum',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Apricot',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Clementine',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Prunes',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Apple butter',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Pomegranate',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Nectarine',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Fig',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Tangerine',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Papaya',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Rhubarb',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Sultanas',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Plantain',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Currant',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Passion fruit',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Guava',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Persimmons',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Lychee',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Lingonberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Tangelos',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Kumquat',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Boysenberry',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Star fruit',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Quince',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Honeydew',\n 'category_id' => '3'\n ],\n ['ingredient' => 'Crabapples',\n 'category_id' => '3'\n ],\n\n\n //Backing and Grains\n\n\n [ 'ingredient' => 'Rice',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Pasta',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bread',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Baking powder',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Baking soda',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bread crumbs',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Cornstarch',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Rolled oats',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Noodle',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Flour tortillas',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Pancake mix',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Yeast',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Cracker',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Quinoa',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Brown rice',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Cornmeal',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Self rising flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Cake mix',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Saltines',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Popcorn',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Macaroni cheese mix',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Corn tortillas',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Ramen',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Cereal',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Biscuits',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Stuffing mix',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Couscous',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Pie crust',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bisquick',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Chips',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Angel hair',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Coconut flake',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bread flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Croutons',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Lasagne',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Pizza dough',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bagel',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Puff pastry',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Hot dog bun',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Barley',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Multigrain bread',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Potato flakes',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Pretzel',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Cornbread',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'English muffin',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Cornflour',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Crescent roll dough',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Cream of wheat',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Coconut flour',\n 'category_id_id' => '4'\n ],\n [ 'ingredient' => 'Pita',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Risotto',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Muffin mix',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bicarbonate of soda',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Ravioli',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Wheat',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Rice flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Polenta',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Baguette',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Gnocchi',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Vermicelli',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Semolina',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Wheat germ',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Buckwheat',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Croissants',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bread dough',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Filo dough',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Yeast flake',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Pierogi',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Matzo meal',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Rye',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Tapioca flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Shortcrust pastry',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Potato starch',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Breadsticks',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Ciabatta',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Spelt',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Angel food',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Tapioca starch',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Starch',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Whole wheat flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Gram flour',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Sourdough starter',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Wafer',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Bran',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Challah',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Sponge cake',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Malt extract',\n 'category_id' => '4'\n ],\n [ 'ingredient' => 'Sorghum flour',\n 'category_id' => '4'\n ],\n\n\n //Sweeteners\n\n\n [ 'ingredient' => 'Sugar',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Brown sugar',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Honey',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Confectioners sugar',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Maple syrup',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Corn syrup',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Molasses',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Artificial sweetener',\n 'category_id' => '5'\n ],\n [ 'ingredient' => 'Agave nectar',\n 'category_id' => '5'\n ],\n\n\n //Spices\n\n\n [ 'ingredient' => 'Cinnamon',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Vanilla',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Garlic powder',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Paprika',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Oregano',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Chili powder',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Red pepper flake',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Cumin',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Cayenne',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Italian seasoning',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Thyme',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'onion powder',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Nutmeg',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Ground nutmeg',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Curry powder',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Bay leaf',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Taco seasoning',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Sage',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Clove',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Allspice',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Turmeric',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Chive',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Peppercorn',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Ground coriander',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Cajun seasoning',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Coriander',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Celery salt',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Vanilla essence',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Herbs',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Steak seasoning',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Poultry seasoning',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Chile powder',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Cardamom',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Italian herbs',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Tarragon',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Garam masala',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Marjoram',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Mustard seed',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Celery seed',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Chinese five spice',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Italian spice',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Saffron',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Onion flake',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Herbes de provence',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Chipotle',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Dill seed',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Fennel seed',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Caraway',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Cacao',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Star anise',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Savory',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Chili paste',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Tamarind',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Aniseed',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Fenugreek',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Lavender',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Old bay seasoning',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Lemon balm',\n 'category_id' => '6'\n ],\n\n // new ingredients\n [ 'ingredient' => 'Salt and Pepper',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Salt',\n 'category_id' => '6'\n ],\n [ 'ingredient' => 'Black Pepper',\n 'category_id' => '6'\n ],\n\n\n //Meats\n\n\n [ 'ingredient' => 'Chicken breast',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ground beef',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Bacon',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Sausage',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef steak',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ham',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Hot dog',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork chops',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chicken thighs',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ground turkey',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Cooked chicken',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Turkey',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pepperoni',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Whole chicken',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chicken leg',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ground pork',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chorizo',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chicken wings',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef roast',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Polish sausage',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Salami',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork roast',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ground chicken',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork ribs',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Spam',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Venison',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork shoulder',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Bologna',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Bratwurst',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Prosciutto',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Lamb',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Corned beef',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chicken roast',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Lamb chops',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pancetta',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ground lamb',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef ribs',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Duck',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork belly',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef liver',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Leg of lamb',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Canadian bacon',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef shank',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Veal',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chicken giblets',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Cornish hen',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Lamb shoulder',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Lamb shank',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ground veal',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pastrami',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Sliced turkey',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork loin',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef suet',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Veal cutlet',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Lamb loin',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Marrow bones',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Goose',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Chicken tenders',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Veal chops',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Quail',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pheasant',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Lamb liver',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Moose',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Turkey liver',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Pork liver',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Veal shank',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Foie gras',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Beef sirloin',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Liver sausage',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Sweetbread',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Ostrich',\n 'category_id' => '7'\n ],\n [ 'ingredient' => 'Soppressata',\n 'category_id' => '7'\n ],\n\n\n //Fish\n\n\n [ 'ingredient' => 'Canned tuna',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Salmon',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Tilapia',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Fish fillets',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Cod',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Canned salmon',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Anchovy',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Smoked salmon',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Sardines',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Tuna steak',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Whitefish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Halibut',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Trout',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Haddock',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Flounder',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Catfish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Mahi mahi',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Mackerel',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Sole',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Sea bass',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Red snapper',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Swordfish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Pollock',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Herring',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Perch',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Grouper',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Caviar',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Monkfish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Rockfish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Lemon sole',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Pike',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Barramundi',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Eel',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Bluefish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Carp',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Cuttlefish',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Pompano',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Arctic char',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'John dory',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Marlin',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Amberjack',\n 'category_id' => '8'\n ],\n [ 'ingredient' => 'Sturgeon',\n 'category_id' => '8'\n ],\n\n\n //Seafood\n\n\n [ 'ingredient' => 'Shrimp',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Crab',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Prawns',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Scallop',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Clam',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Lobster',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Mussel',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Oyster',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Squid',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Calamari',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Crawfish',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Octopus',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Cockle',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Conch',\n 'category_id' => '9'\n ],\n [ 'ingredient' => 'Sea urchin',\n 'category_id' => '9'\n ],\n\n\n //Condiments\n\n\n [ 'ingredient' => 'Mayonnaise',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Ketchup',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Mustard',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Vinegar',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Soy sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Balsamic vinegar',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Worcestershire',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Hot sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Barbecue sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Ranch dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Wine vinegar',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Apple cider vinegar',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Cider vinegar',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Italian dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Rice vinegar',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Salad dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Tabasco',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Fish sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Teriyaki',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Steak sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Iahini',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Enchilada sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Vinaigrette dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Oyster sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Honey mustard',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Sriracha',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Caesar dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Taco sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Mirin',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Blue cheese dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Sweet and sour sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Thousand island',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Picante sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Buffalo sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'French dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Tartar sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Cocktail sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Marsala',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Adobo sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Tzatziki sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Sesame dressing',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Ponzu',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Duck sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Pickapeppa sauce',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Yuzu juice',\n 'category_id' => '10'\n ],\n [ 'ingredient' => 'Cream sauce',\n 'category_id' => '10'\n ],\n\n\n // Sauces\n\n\n [ 'ingredient' => 'Tomato sauce',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Tomato paste',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Salsa',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Pesto',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Alfredo sauce',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Beef gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Curry paste',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Chicken gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Cranberry sauce',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Turkey gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Mushroom gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Sausage gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Onion gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Cream gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Pork gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Tomato gravy',\n 'category_id' => '11'\n ],\n [ 'ingredient' => 'Giblet gravy',\n 'category_id' => '11'\n ],\n\n\n //Oils\n\n\n [ 'ingredient' => 'Olive oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Vegetable oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Cooking spray',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Canola oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Shortening',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Sesame oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Coconut oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Peanut oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Sunflower oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Lard',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Grape seed oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Corn oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Almond oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Avocado oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Safflower oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Walnut oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Hazelnut oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Palm oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Soybean oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Mustard oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Pistachio oil',\n 'category_id' => '12'\n ],\n [ 'ingredient' => 'Soya oil',\n 'category_id' => '12'\n ],\n\n\n //Seasonings\n\n\n [ 'ingredient' => 'Bouillon',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Ground ginger',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Sesame seed',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Cream of tartar',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Chili sauce',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Soya sauce',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Apple cider',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Hoisin sauce',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Liquid smoke',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Rice wine',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Vegetable bouillon',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Poppy seed',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Balsamic glaze',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Miso',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Wasabi',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Fish stock',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Rose water',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Pickling salt',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Champagne vinegar',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Bbq rub',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Jamaican jerk spice',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Accent seasoning',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Pickling spice',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Mustard powder',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Mango powder',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Adobo seasoning',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Kasuri methi',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Caribbean jerk seasoning',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Brine',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Matcha powder',\n 'category_id' => '13'\n ],\n [ 'ingredient' => 'Cassia',\n 'category_id' => '13'\n ],\n\n\n //Legumes\n\n\n [ 'ingredient' => 'Green beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Peas',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Black beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Chickpea',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Lentil',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Refried beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Hummus',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Chili beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Lima beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Kidney beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Pinto beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Edamame',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Split peas',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Snap peas',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Soybeans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Cannellini beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Navy beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'French beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Red beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Great northern beans',\n 'category_id' => '14'\n ],\n [ 'ingredient' => 'Fava beans',\n 'category_id' => '14'\n ],\n\n\n //Alcohol\n\n\n [ 'ingredient' => 'White wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Beer',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Red wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Vodka',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Rum',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Whiskey',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Tequila',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Sherry',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Bourbon',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Cooking wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Whisky',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Liqueur',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Brandy',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Gin',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Kahlua',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Irish cream',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Triple sec',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Champagne',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Amaretto',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Cabernet sauvignon',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Vermouth',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Bitters',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Maraschino',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Sake',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Grand marnier',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Masala',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Dessert wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Schnapps',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Port wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Sparkling wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Cognac',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Chocolate liqueur',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Burgundy wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Limoncello',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Creme de menthe',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Bloody mary',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Raspberry liquor',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Curacao',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Frangelico',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Shaoxing wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Absinthe',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Madeira wine',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Ouzo',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Anisette',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Grappa',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Ciclon',\n 'category_id' => '15'\n ],\n [ 'ingredient' => 'Drambuie',\n 'category_id' => '15'\n ],\n\n\n //Soup\n\n\n [ 'ingredient' => 'Chicken broth',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Mushroom soup',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Beef broth',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Tomato soup',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Vegetable stock',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Chicken soup',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Onion soup',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Vegetable soup',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Celery soup',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Dashi',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Lamb stock',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Pork stock',\n 'category_id' => '16'\n ],\n [ 'ingredient' => 'Veal stock',\n 'category_id' => '16'\n ],\n\n\n //Nuts\n\n\n [ 'ingredient' => 'Peanut butter',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Almond',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Walnut',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Pecan',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Peanut',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Cashew',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Flax',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Pine nut',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Pistachio',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Almond meal',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Hazelnut',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Macadamia',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Almond paste',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Chestnut',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Praline',\n 'category_id' => '17'\n ],\n [ 'ingredient' => 'Macaroon',\n 'category_id' => '17'\n ],\n\n\n //Snacks and Desserst\n\n\n [ 'ingredient' => 'Chocolate',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Apple sauce',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Strawberry jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Graham cracker',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Marshmallow',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate syrup',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Potato chips',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Nutella',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate morsels',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Bittersweet chocolate',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Pudding mix',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Raspberry jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Dark chocolate',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate chips',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'White chocolate',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Brownie mix',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Jello',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Caramel',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate powder',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Candy',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Corn chips',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Cookies',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Apricot jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate bar',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Cookie dough',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Oreo',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Doritos',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate cookies',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Butterscotch',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Blackberry preserves',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Blueberry jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Peach preserves',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Cherry jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Fig jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Plum jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Cinnamon roll',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Fudge',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Cookie crumb',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chilli jam',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Lady fingers',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Chocolate wafer',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Gummy worms',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Biscotti biscuit',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Doughnut',\n 'category_id' => '18'\n ],\n [ 'ingredient' => 'Amaretti cookies',\n 'category_id' => '18'\n ],\n\n\n //Desserts\n\n\n [ 'ingredient' => 'Black pudding',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Apple jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Red pepper jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Orange jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Jalapeno jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Mint jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Currant jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Lemon jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Quince jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Grape jelly',\n 'category_id' => '19'\n ],\n [ 'ingredient' => 'Chocolate pudding',\n 'category_id' => '19'\n ],\n ['ingredient' => 'Custard',\n 'category_id' => '19'\n ],\n ['ingredient' => 'Yogurt',\n 'category_id' => '19'\n ],\n\n\n //Beverages\n\n\n [ 'ingredient' => 'Coffee',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Orange juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Tea',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Green tea',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Apple juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Tomato juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Coke',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Chocolate milk',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Pineapple juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Lemonade',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Cranberry juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Espresso',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Fruit juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Ginger ale',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Club soda',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Sprite',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Kool aid',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Grenadine',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Margarita mix',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Cherry juice',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Pepsi',\n 'category_id' => '20'\n ],\n [ 'ingredient' => 'Mountain dew',\n 'category_id' => '20'\n ]\n\n ]);\n\n }",
"public function prepararSopa(){\n\n echo(\"Revuelva los ingredientes y deje cocinar por 20 minutos\");\n\n}",
"function generateByPopularIngredient($heading)\n{\n\t$recipe = array();\n\t$recipeSelector = new Recipe;\n\t$candidates = array();\n\t\n\t//split heading string into name and priority value\n\t$tokens = explode(\" \", $heading);\n\t\n\t$ingredient = $tokens[0];\n\t\n\t//find recipes in database with popular ingredient (plural form) in heading (singular form) \n\tif ((strcmp(\"Berry\", $ingredient ) == 0) || (strcmp(\"Pastry\", $ingredient ) == 0))\n\t{\n\t\t//special singular form \"berry\" not sub-string of plural form (won't detect in database)\n\t\tif (strcmp(\"Berry\", $ingredient) == 0)\n\t\t{\n\t\t\t$candidates = $recipeSelector->selectByPopularIngredient(\"Berries\");\n\t\t}\n\t\t\n\t\t//special singular form \"pastry\" not sub-string of plural form (won't detect in database)\n\t\tif (strcmp(\"Pastry\", $ingredient) == 0)\n\t\t{\n\t\t\t$candidates = $recipeSelector->selectByPopularIngredient(\"Pastries\");\n\t\t}\n\t}\n\t\n\telse \n\t{\n\t\t$candidates = $recipeSelector->selectByPopularIngredient($ingredient);\n\t}\n\t\n\tif (count($candidates) != 0)\n\t{\n\t\t$recipe = selectRandomCandidate($candidates);\n\t}\n\t\n\telse \n\t{\n\t\t$recipe = null;\n\t}\n\t\n\treturn $recipe;\n}",
"public function AgregarIngredientes()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"codproducto\"]) or empty($_POST[\"codingrediente\"]) or empty($_POST[\"cantidad\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\n\t$ingrediente = $_POST['codingrediente'];\n\t$repeated = array_filter(array_count_values($ingrediente), function($count) {\n\t\treturn $count > 1;\n\t});\n\tforeach ($repeated as $key => $value) {\n\t\techo \"2\";\n\t\texit;\n\t}\n\n############## AQUI VALIDO SI LOS NUEVOS INGREDIENTES YA EXISTEN EN LA BASE DE DATOS ############\nfor($i=0;$i<count($_POST['codingrediente']);$i++){ //recorro el array\n\tif (!empty($_POST['codingrediente'][$i])) {\n\n\t\t$sql = \" select * from productosvsingredientes where codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"codproducto\"], $_POST[\"codingrediente\"][$i]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\t\t\techo \"3\";\n\t\t\texit;\n\t\t}\n\t}\n}\n\n###################### PROCESO DE REGISTRO DE INSCREDIENTES A PRODUCTOS ###########################\nfor($i=0;$i<count($_POST['codingrediente']);$i++){ //recorro el array\n\tif (!empty($_POST['codingrediente'][$i])) {\n\n\t\t$query = \" insert into productosvsingredientes values (null, ?, ?, ?); \";\n\t\t$stmt = $this->dbh->prepare($query);\n\t\t$stmt->bindParam(1, $codproducto);\n\t\t$stmt->bindParam(2, $codingrediente);\n\t\t$stmt->bindParam(3, $cantidad);\n\n\t\t$codproducto = strip_tags($_POST[\"codproducto\"]);\n\t\t$codingrediente = strip_tags($_POST['codingrediente'][$i]);\n\t\t$cantidad = strip_tags($_POST['cantidad'][$i]);\n\t\t$stmt->execute();\n\t}\n}\n##################### PROCESO DE REGISTRO DE INSCREDIENTES A PRODUCTOS ####################\n\necho \"<div class='alert alert-success'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\necho \"<span class='fa fa-check-square-o'></span> LOS INGREDIENTES FUERON AGREGADOS AL PRODUCTO EXITOSAMENTE\";\necho \"</div>\";\t\t\nexit;\n}",
"public function run()\n {\n $now = date('Y-m-d H:i:s');\n\n $food = [\n [\n 'id' => 10,\n 'name' => 'Margherita',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 11,\n 'name' => 'Klasika',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 12,\n 'name' => 'Kmečka',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 13,\n 'name' => '4 siri',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 14,\n 'name' => 'Koruzna',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 15,\n 'name' => 'Zelenjavna',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 16,\n 'name' => 'Pikantna',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'id' => 17,\n 'name' => 'Tuna',\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n ];\n\n $ingredients = [\n [\n 'id' => 10,\n 'name' => 'paradajz'\n ],\n [\n 'id' => 11,\n 'name' => 'sir'\n ],\n\n [\n 'id' => 12,\n 'name' => 'šunka'\n ],\n [\n 'id' => 13,\n 'name' => 'gobe'\n ],\n [\n 'id' => 14,\n 'name' => 'suha salama'\n ],\n [\n 'id' => 15,\n 'name' => 'mozzarella'\n ],\n [\n 'id' => 16,\n 'name' => 'parmezan'\n ],\n [\n 'id' => 17,\n 'name' => 'gauda'\n ],\n [\n 'id' => 18,\n 'name' => 'gorgonzola'\n ],\n [\n 'id' => 19,\n 'name' => 'parmezan'\n ],\n [\n 'id' => 20,\n 'name' => 'origano'\n ],\n [\n 'id' => 21,\n 'name' => 'sveža bazilika'\n ],\n [\n 'id' => 22,\n 'name' => 'koruza'\n ],\n [\n 'id' => 23,\n 'name' => 'feferoni'\n ],\n [\n 'id' => 24,\n 'name' => 'tuna'\n ],\n [\n 'id' => 25,\n 'name' => 'čebula'\n ],\n [\n 'id' => 26,\n 'name' => 'dimljen losos'\n ],\n [\n 'id' => 27,\n 'name' => 'čebula'\n ],\n [\n 'id' => 28,\n 'name' => 'tartufovo olje'\n ],\n [\n 'id' => 29,\n 'name' => 'paprika'\n ]\n ];\n\n $food_ingredients = [\n [\n 'food_id' => 10,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 10,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 10,\n 'ingredient_id' => 20\n ],\n [\n 'food_id' => 11,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 11,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 11,\n 'ingredient_id' => 20\n ],\n [\n 'food_id' => 11,\n 'ingredient_id' => 12\n ],\n [\n 'food_id' => 11,\n 'ingredient_id' => 13\n ],\n [\n 'food_id' => 12,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 12,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 12,\n 'ingredient_id' => 12\n ],\n [\n 'food_id' => 12,\n 'ingredient_id' => 14\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 15\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 16\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 17\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 18\n ],\n [\n 'food_id' => 13,\n 'ingredient_id' => 20\n ],\n [\n 'food_id' => 14,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 14,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 14,\n 'ingredient_id' => 12\n ],\n [\n 'food_id' => 14,\n 'ingredient_id' => 20\n ],\n [\n 'food_id' => 14,\n 'ingredient_id' => 22\n ],\n [\n 'food_id' => 15,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 15,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 15,\n 'ingredient_id' => 22\n ],\n [\n 'food_id' => 15,\n 'ingredient_id' => 29\n ],\n [\n 'food_id' => 15,\n 'ingredient_id' => 13\n ],\n [\n 'food_id' => 15,\n 'ingredient_id' => 21\n ],\n [\n 'food_id' => 16,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 16,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 16,\n 'ingredient_id' => 12\n ],\n [\n 'food_id' => 16,\n 'ingredient_id' => 23\n ],\n [\n 'food_id' => 17,\n 'ingredient_id' => 10\n ],\n [\n 'food_id' => 17,\n 'ingredient_id' => 11\n ],\n [\n 'food_id' => 17,\n 'ingredient_id' => 24\n ],\n [\n 'food_id' => 17,\n 'ingredient_id' => 22\n ],\n [\n 'food_id' => 17,\n 'ingredient_id' => 27\n ],\n ];\n\n DB::table('hollanbo_food_food')->insert($food);\n DB::table('hollanbo_food_ingredients')->insert($ingredients);\n DB::table('hollanbo_food_food_ingredients')->insert($food_ingredients);\n }",
"public function report_product_prepration($id) {\n //permittedArea();\n $data['view_assistant'] = $this->db->get_where('product_ingredients', ['product_preparation' => $id]);\n \n \n theme('report_product_prepration', $data);\n }",
"public function updateIngredient(int $pizzaId, array $ingredientsIds){\n $sql = \"DELETE FROM ingredient_pizza WHERE pizza_id = ?\" ;\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([$pizzaId]);\n\n //2. enregistrer tous les liens entre les $ingredientsIds et $pizzaId\n foreach($ingredientsIds as $ingredient){\n $sql = \"INSERT INTO ingredient_pizza (ingredient_id, pizza_id) VALUE (?,?)\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([$ingredient, $pizzaId]);\n }\n }",
"public function createRecipeIngredientsTable()\r\n\t{\r\n\t\t$query = 'CREATE TABLE `recipeIngredients` (\r\n\t\t\t`articleId` int(8) unsigned NOT NULL,\r\n\t\t\t`NDB_No` int(5) unsigned zerofill NOT NULL,\r\n\t\t\t`amount` double unsigned default NULL,\r\n\t\t\t`weightId` int(3) unsigned NOT NULL,\r\n\t\t\tPRIMARY KEY (`articleId`,`NDB_No`),\r\n\t\t\tKEY `recipe` (`articleId`)\r\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT=\"Recipe ingredient (amount) mapping\"';\r\n\t\t$this->_db->setQuery($query);\r\n\t\treturn $this->_db->query();\r\n\t}",
"protected function _construct()\n {\n $this->_init('recomiendo_recipes/relation_recipe_ingredient', 'recipe_ingredient_id');\n }",
"public function prepare_items()\n {\n $columns = $this->get_columns();\n $hidden = $this->get_hidden_columns();\n $sortable = $this->get_sortable_columns();\n $data = $this->table_data();\n usort( $data, array( &$this, 'sort_data' ) );\n $perPage = 10;\n $currentPage = $this->get_pagenum();\n $totalItems = count($data);\n $this->set_pagination_args( array(\n 'total_items' => $totalItems,\n 'per_page' => $perPage\n ) );\n $data = array_slice($data,(($currentPage-1)*$perPage),$perPage);\n $this->_column_headers = array($columns, $hidden, $sortable);\n $this->process_bulk_action();\n $this->items = $data;\n }",
"public function prepareVars()\n {\n $this->vars['value'] = $this->getKeyValue();\n $this->vars['field'] = $this->formField;\n $this->vars['nameValue'] = $this->getNameValue();\n $this->vars['descriptionValue'] = $this->getDescriptionValue();\n $this->vars['addresses'] = $this->getAddresses();\n $this->vars['listWidget'] = $this->listWidget;\n $this->vars['searchWidget'] = $this->searchWidget;\n\n $this->vars['title'] = $this->title;\n $this->vars['prompt'] = str_replace('%s', '<i class=\"icon-th-list\"></i>', e(trans($this->prompt)));\n\n }",
"public function __construct( $name, $ingredients ) {\n\t\tif ( ! is_array( $ingredients ) ) {\n\t\t\tthrow new Exception('$ingredients must be an array');\n\t\t}\n\t\t$this -> name = $name;\n\t\t$this -> ingredients = $ingredients;\n\t}",
"function prepare_items() {\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t$ubc_di_sites = $this->ubc_di_get_assessment_results();\n\n\t\tusort( $ubc_di_sites, array( &$this, 'usort_reorder' ) );\n\n\t\t$per_page = 50;\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = count( $ubc_di_sites );\n\t\t// only ncessary because we have sample data\n\t\t$ubc_di_sites_subset = array_slice( $ubc_di_sites, ( ( $current_page - 1 ) * $per_page ), $per_page );\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page, //WE have to determine how many items to show on a page\n\t\t) );\n\t\t$this->items = $ubc_di_sites_subset;\n\t}",
"private function createInitialProducts()\n {\n $this->product = $this->createProduct();\n $this->product2 = $this->createProduct();\n\n $this->category = $this->createCategory();\n $this->product->addCategory($this->category);\n $this->product2->addCategory($this->category);\n }",
"public function prepare_items() {\n\n\t\t// Roll out each part.\n\t\t$columns = $this->get_columns();\n\t\t$hidden = $this->get_hidden_columns();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$dataset = $this->table_data();\n\n\t\t// Check for the action key value to filter.\n\t\tif ( ! empty( $_REQUEST['wbr-review-filter'] ) ) { // WPCS: CSRF ok.\n\t\t\t$dataset = $this->maybe_filter_dataset( $dataset );\n\t\t}\n\n\t\t// Handle our sorting.\n\t\tusort( $dataset, array( $this, 'sort_data' ) );\n\n\t\t// Load up the pagination settings.\n\t\t$paginate = 20;\n\t\t$item_count = count( $dataset );\n\t\t$current = $this->get_pagenum();\n\n\t\t// Set my pagination args.\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $item_count,\n\t\t\t'per_page' => $paginate,\n\t\t\t'total_pages' => ceil( $item_count / $paginate ),\n\t\t));\n\n\t\t// Slice up our dataset.\n\t\t$dataset = array_slice( $dataset, ( ( $current - 1 ) * $paginate ), $paginate );\n\n\t\t// Do the column headers.\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t// Make sure we have the single action running.\n\t\t$this->process_single_action();\n\n\t\t// Make sure we have the bulk action running.\n\t\t$this->process_bulk_action();\n\n\t\t// Make sure we have the status change.\n\t\t$this->process_status_change();\n\n\t\t// And the result.\n\t\t$this->items = $dataset;\n\t}",
"public function RegistrarIngredientes()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"nomingrediente\"]) or empty($_POST[\"cantingrediente\"]) or empty($_POST[\"unidadingrediente\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select nomingrediente from ingredientes where nomingrediente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"nomingrediente\"]) );\n\t$num = $stmt->rowCount();\n\tif($num > 0)\n\t{\n\t\techo \"2\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\n\t$sql = \" select codingrediente from ingredientes order by codingrediente desc limit 1\";\n\tforeach ($this->dbh->query($sql) as $row){\n\n\t$nro=$row[\"codingrediente\"];\n\n\t}\n\tif(empty($nro))\n\t{\n\t\techo $codingrediente = '00001';\n\n\t} else\n\t{\n\t\t$resto = substr($nro, 0, -0);\n\t\t$coun = strlen($resto);\n\t\t$num = substr($nro , $coun);\n\t\t$dig = $num + 1;\n\t\t$codigo = str_pad($dig, 5, \"0\", STR_PAD_LEFT);\n\t\techo $codingrediente = $codigo;\n\t}\n\n\t$sql = \" select codingrediente from ingredientes where codingrediente = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"codingrediente\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\t\t\t$query = \" insert into ingredientes values (null, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1, $codingrediente);\n\t\t\t$stmt->bindParam(2, $nomingrediente);\n\t\t\t$stmt->bindParam(3, $cantingrediente);\n\t\t\t$stmt->bindParam(4, $costoingrediente);\n\t\t\t$stmt->bindParam(5, $unidadingrediente);\n\t\t\t$stmt->bindParam(6, $codproveedor);\n\t\t\t$stmt->bindParam(7, $stockminimoingrediente);\n\n\t\t\t//$codingrediente = strip_tags($_POST[\"codingrediente\"]);\n\t\t\t$nomingrediente = strip_tags($_POST[\"nomingrediente\"]);\n\t\t\t$cantingrediente = strip_tags($_POST[\"cantingrediente\"]);\n\t\t\t$costoingrediente = strip_tags($_POST[\"costoingrediente\"]);\n\t\t\t$unidadingrediente = strip_tags($_POST[\"unidadingrediente\"]);\n\t\t\t$codproveedor = strip_tags($_POST[\"codproveedor\"]);\n\t\t\t$stockminimoingrediente = strip_tags($_POST[\"stockminimoingrediente\"]);\n\t\t\t$stmt->execute();\n\n\t\t\t$query = \" insert into kardexingredientes values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1, $codproceso);\n\t\t\t$stmt->bindParam(2, $codresponsable);\n\t\t\t$stmt->bindParam(3, $codigoproducto);\n\t\t\t$stmt->bindParam(4, $codingrediente);\n\t\t\t$stmt->bindParam(5, $movimiento);\n\t\t\t$stmt->bindParam(6, $entradas);\n\t\t\t$stmt->bindParam(7, $salidas);\n\t\t\t$stmt->bindParam(8, $stockactual);\n\t\t\t$stmt->bindParam(9, $preciounit);\n\t\t\t$stmt->bindParam(10, $costototal);\n\t\t\t$stmt->bindParam(11, $documento);\n\t\t\t$stmt->bindParam(12, $fechakardex);\n\n\t\t\t$codproceso = strip_tags(GenerateRandomString());\n\t\t\t$codresponsable = strip_tags(\"0\");\n\t\t\t$codigoproducto = strip_tags('0');\n\t\t\t$codingrediente = strip_tags($_POST['codingrediente']);\n\t\t\t$movimiento = strip_tags(\"ENTRADAS\");\n\t\t\t$entradas = strip_tags($_POST['cantingrediente']);\n\t\t\t$salidas = strip_tags(\"0\");\n\t\t\t$stockactual = strip_tags($_POST['cantingrediente']);\n\t\t\t$preciounit = strip_tags($_POST['costoingrediente']);\n\t\t\t$costototal = strip_tags($_POST['costoingrediente'] * $_POST['cantingrediente']);\n\t\t\t$documento = strip_tags(\"INVENTARIO INICIAL\");\n\t\t\t$fechakardex = strip_tags(date(\"Y-m-d\"));\n\t\t\t$stmt->execute();\n\n\t\t\techo \"<div class='alert alert-success'>\";\n\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\t\t\techo \"<span class='fa fa-check-square-o'></span> EL INGREDIENTE FUE REGISTRADO EXITOSAMENTE\";\n\t\t\techo \"</div>\";\t\t\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"3\";\n\t\t\texit;\n\t\t}\n\t}\n}",
"public function run()\n {\n DB::table('ingredient')->insert([\n [\n 'recipe_id' => 1,\n 'ingredient_name' => 'ほうれん草',\n 'ingredient_detail' => '2束',\n 'ingredient_num' => 1,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n [\n 'recipe_id' => 1,\n 'ingredient_name' => '人参',\n 'ingredient_detail' => '1/2本',\n 'ingredient_num' => 2,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n [\n 'recipe_id' => 1,\n 'ingredient_name' => '卵',\n 'ingredient_detail' => '2個',\n 'ingredient_num' => 3,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n [\n 'recipe_id' => 1,\n 'ingredient_name' => 'マヨネーズ',\n 'ingredient_detail' => '大さじ1/2',\n 'ingredient_num' => 4,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n [\n 'recipe_id' => 1,\n 'ingredient_name' => 'ごま油',\n 'ingredient_detail' => '大さじ1',\n 'ingredient_num' => 5,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n [\n 'recipe_id' => 1,\n 'ingredient_name' => '鶏がらスープの素',\n 'ingredient_detail' => '小さじ1',\n 'ingredient_num' => 6,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n [\n 'recipe_id' => 1,\n 'ingredient_name' => '塩コショウ',\n 'ingredient_detail' => '適量',\n 'ingredient_num' => 7,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n ]);\n }",
"public function prepare_items()\r\n\t{\r\n\t\t$columns = $this->get_columns();\r\n\t\t$hidden = $this->get_hidden_columns();\r\n\t\t$sortable = $this->get_sortable_columns();\r\n\r\n\t\t$currentPage = $this->get_pagenum();\r\n\r\n\t\t$this->total = Lead::count();\r\n\t\t$data = Lead::take( $this->per_page )->skip( ( $currentPage - 1 ) * $this->per_page )\r\n\t\t ->get()->toArray();\r\n\r\n\t\t$this->set_pagination_args( [\r\n\t\t\t'total_items' => $this->total,\r\n\t\t\t'per_page' => $this->per_page\r\n\t\t] );\r\n\r\n\t\t$this->_column_headers = [ $columns, $hidden, $sortable ];\r\n\r\n\t\t$this->items = $data;\r\n\t}",
"public function prepareForList($page)\n {\n $this->setPageSize(Mage::helper('recomiendo_recipes')->getRecipeIngredientPerPage());\n return $this;\n }",
"public function run()\n {\n $now = Carbon::now('utc')->toDateTimeString();\n $faker = Faker\\Factory::create();\n $faker->addProvider(new \\FakerRestaurant\\Provider\\fr_FR\\Restaurant($faker));\n $data = array();\n\n $type_primaire = [\"Principal\",\"Accompagnement\",\"Assaisonnement\"];\n $type_secondaire = [\"Viande\",\"Poisson\",\"Féculent\",\"Légumes\",\"Fruits\",\"Sauce\",\"Epice\"];\n\n for ($i = 0; $i < 100; $i++){\n $data[] = array(\n \"nom\"=>$faker->vegetableName(),\n \"type_primaire\"=>$faker->randomElement($type_primaire),\n \"type_secondaire\"=>$faker->randomElement($type_secondaire),\n \"user_id\"=>1,\n \"created_at\"=>$now,\n \"updated_at\"=>$now\n );\n }\n\n Ingredient::insert($data);\n }",
"function attachIngredientsToMeal($meal, $lang){\n\n $ingredients_array = [];\n\n foreach($meal->ingredients as $ingredient){\n $temp_array = [];\n $translation = IngredientTranslations::all()\n ->where('ingredient_id',$ingredient->id)\n ->where('locale',$lang)\n ->first();\n \n $temp_array['id'] = $ingredient->id;\n $temp_array['title'] = $translation->title;\n $temp_array['slug'] = $ingredient->slug;\n $ingredients_array[] = $temp_array;\n }\n\n return $ingredients_array;\n\n\n }",
"public function run()\n {\n DB::table('ingredients')->delete();\n\n Ingredient::create(array(\n 'Name' => 'Flour',\n 'MeasurementType' => 'cups'\n ));\n\n Ingredient::create(array(\n 'Name' => 'Butter',\n 'MeasurementType' => 'tablespoon'\n ));\n\n Ingredient::create(array(\n 'Name' => 'Baking Powder',\n 'MeasurementType' => 'teaspoons'\n ));\n\n Ingredient::create(array(\n 'Name' => 'Eggs',\n 'MeasurementType' => 'ea'\n ));\n\n Ingredient::create(array(\n 'Name' => 'Oil',\n 'MeasurementType' => 'tablespoons'\n ));\n }",
"public function run()\n {\n foreach (Basket::with('recipes')->additional()->get() as $basket) {\n if (count($basket->recipes)) {\n for ($i = 0; $i < rand(1, 2); $i++) {\n $basket->recipes()->create([\n 'recipe_id' => $basket->recipes->random()->id,\n ]);\n }\n }\n }\n }",
"public function run()\n\t{\n\t\tfactory(Ingredient::class, 25)->create();\n\t}",
"public function prepare_items() {\r\n\t\t$this->_column_headers = $this->get_column_info();\r\n\r\n\t\t/** Process bulk action */\r\n\t\t$this->process_bulk_action();\r\n\r\n\t\t$per_page = $this->get_items_per_page( 'customers_per_page', 5 );\r\n\t\t$current_page = $this->get_pagenum();\r\n\t\t$total_items = self::record_count();\r\n\r\n\t\t$this->set_pagination_args( [\r\n\t\t\t'total_items' => $total_items,\r\n\t\t\t'per_page' => $per_page\r\n\t\t] );\r\n\r\n\t\t$this->items = self::get_customers( $per_page, $current_page );\r\n\t}",
"public function setIngredients(){\n $igr_name = $this->input->post('name');\n $igr_description = $this->input->post('description');\n $igr_img = $this->input->post('image');\n $igr_linecolor = intval($this->input->post('line_color'));\n $igr_backcolor = intval($this->input->post('back_color'));\n $fruity = $this->input->post('fruity');\n $green = $this->input->post('green');\n $roasted = $this->input->post('roasted');\n\n $sql = \"INSERT INTO ingredients (igr_name, igr_description, igr_img, igr_linecolor, igr_backcolor, fruity, green, roasted) \n VALUES('\" . $igr_name . \"', \n '\" . $igr_description . \"', \n '\" . $igr_img . \"', \n '\" . $igr_linecolor . \"', \n '\" . $igr_backcolor . \"', \n '\" . $fruity . \"', \n '\" . $green . \"', \n '\" . $roasted . \"')\"; \n $result = $this->db->query($sql); \n return $result;\n }",
"private function prepareSimpleProduct() {\n if ($this->getSaverData()->isFirstPage()) {\n $this->setPrice();\n $this->setDownloadOptions();\n $this->setSKU();\n $this->setStockOptions();\n $this->setSoldIndividually();\n $this->setShippingOptions();\n $this->setPurchaseNote();\n $this->setEnableReviews();\n $this->setMenuOrder();\n }\n\n $this->setTags();\n $this->setAttributes();\n }",
"public function prepare_items()\r\n {\r\n $columns = $this->get_columns();\r\n $hidden = $this->get_hidden_columns();\r\n $sortable = $this->get_sortable_columns();\r\n\r\n /** Process bulk action */\r\n $this->process_bulk_action();\r\n\r\n $data = $this->table_data();\r\n usort($data, array(&$this, 'sort_data'));\r\n $perPage = 30;\r\n $currentPage = $this->get_pagenum();\r\n $totalItems = count($data);\r\n $this->set_pagination_args(array(\r\n 'total_items' => $totalItems,\r\n 'per_page' => $perPage\r\n ));\r\n $data = array_slice($data, (($currentPage - 1) * $perPage), $perPage);\r\n // var_dump($data);\r\n // die();\r\n $this->_column_headers = array($columns, $hidden, $sortable);\r\n $this->items = $data;\r\n }",
"public function prepare(Item $item, DataObject $request, Product $candidate): void\n {\n /**\n * We specify qty after we know about parent (for stock)\n */\n if ($request->getResetCount() && !$candidate->getStickWithinParent() && $item->getId() == $request->getId()) {\n $item->setData(CartItemInterface::KEY_QTY, 0);\n }\n $item->addQty($candidate->getCartQty());\n\n $customPrice = $request->getCustomPrice();\n if (!empty($customPrice)) {\n $item->setCustomPrice($customPrice);\n $item->setOriginalCustomPrice($customPrice);\n }\n }",
"public function run()\n {\n $products = [\n [\n 'name' => 'Riso alla Cantonese',\n 'description' => 'Riso tipico cinese saltato con prosciutto, piselli, mais, uova.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/ras/Assets/1dd71a6b-bd81-4a7a-8013-114c731d1165/Derivates/21db79a0-9d69-44d2-8852-6945bc8fc0de.jpg',\n 'user_id' => 2 \n ],\n [\n 'name' => 'Margherita',\n 'description' => 'La pizza più famosa e più buona del mondo. Ingredienti: pomodoro, mozzarella e basilico.',\n 'price' => 6.50,\n 'visibility' => 1,\n 'cover' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Pizza-napoletana.jpg/1200px-Pizza-napoletana.jpg',\n 'user_id' => 1\n ],\n [\n 'name' => 'Margherita',\n 'description' => 'Classica pizza. Ingredienti: pomodoro, mozzarella e basilico.',\n 'price' => 6.00,\n 'visibility' => 1,\n 'cover' => 'https://www.ricettapizzanapoletana.it/wp-content/uploads/2019/07/pizza-napoletana.jpg',\n 'user_id' => 10\n ],\n [\n 'name' => 'Bufala',\n 'description' => 'Ingredienti: Pomodoro, mozzarella di bufala, basilico, olio evo.',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://www.alice.tv/img/cache/610x380/media/ricette/tjnh0rl/img_2846410445500804.jpg',\n 'user_id' => 33\n ],\n [\n 'name' => 'Calzone',\n 'description' => 'Ingredienti: Pomodoro, mozzarella fior di latte, prosciutto, basilico, olio evo.',\n 'price' => 6.50,\n 'visibility' => 1,\n 'cover' => 'https://www.alice.tv/img/cache/610x380/media/ricette/i96fvvb/calzone-classico.jpg',\n 'user_id' => 1\n ],\n [\n 'name' => 'Capriciosa',\n 'description' => 'Ingredienti: Pomodoro, mozzarella fior di latte, prosciutto, funghi champignon, carciofi, olive, basilico, olio evo.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://i2.wp.com/www.piccolericette.net/piccolericette/wp-content/uploads/2017/12/3240_Pizza.jpg?resize=895%2C616&ssl=1',\n 'user_id' => 10\n ],\n [\n 'name' => 'Frutti di mare',\n 'description' => 'Ingredienti: Pomodoro, mozzarella fior di latte, cozze, seppie*, polipo*, basilico, olio evo.',\n 'price' => 10.00,\n 'visibility' => 1,\n 'cover' => 'https://i1.wp.com/www.piccolericette.net/piccolericette/wp-content/uploads/2017/08/3238_Pizza-1.jpg?resize=895%2C616&ssl=1',\n 'user_id' => 33\n ],\n [\n 'name' => 'Marinara',\n 'description' => 'Ingredienti: Pomodoro, aglio, origano, basilico, olio evo.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/05/pizza-marinara-5.jpg',\n 'user_id' => 10\n ],\n [\n 'name' => 'Quattro stagioni',\n 'description' => 'Ingredienti: Pomodoro, mozzarella fior di latte, prosciutto cotto, funghi champignon, carciofi*, basilico, olio evo.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://i1.wp.com/www.piccolericette.net/piccolericette/wp-content/uploads/2016/07/3017_Pizza.jpg?resize=895%2C616&ssl=1',\n 'user_id' => 1\n ],\n [\n 'name' => 'Wurstel',\n 'description' => 'Ingredienti: Pomodoro, mozzarella, wurstel e olio evo.',\n 'price' => 6.00,\n 'visibility' => 1,\n 'cover' => 'https://ivoatrastevere.it/wp-content/uploads/2021/03/PIZZA-ROSSA-CON-WURSTEL.jpg',\n 'user_id' => 1\n ],\n [\n 'name' => 'Diavola',\n 'description' => 'Ingredienti: Pomodoro, mozzarella fior di latte, salame piccante, olio evo.',\n 'price' => 6.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/05/69630013_m.jpg',\n 'user_id' => 1\n ],\n [\n 'name' => 'Involtini primavera',\n 'description' => 'Ingredienti: Carote, cipolla, cavolo cappuccio, farina.',\n 'price' => 2.00,\n 'visibility' => 1,\n 'cover' => 'https://blog.giallozafferano.it/martolinaincucina/wp-content/uploads/2020/02/Involtini-primavera-B1200x1200.jpg',\n 'user_id' => 2\n ],\n [\n 'name' => 'Ravioli di verdure',\n 'description' => 'Ingredienti: Farina, spinaci, carote, cipolla.',\n 'price' => 3.30,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2018/12/SH_Ravioli_verdure_al_vapore.jpg',\n 'user_id' => 2\n ],\n [\n 'name' => 'Riso al curry',\n 'description' => 'Ingredienti: Riso, curry, piselli e uova.',\n 'price' => 3.30,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2019/01/SH_riso_con_curry-640x350.jpg.webp',\n 'user_id' => 2\n ],\n [\n 'name' => 'Zuppa orientale',\n 'description' => 'Ingredienti: Piselli, funghi, mazzancolla, salsa di soia, prosciutto.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://www.ricettegourmet.com/wp-content/uploads/2016/12/Zuppa-orientale.jpg',\n 'user_id' => 2\n ],\n [\n 'name' => 'Cous Cous di verdure',\n 'description' => 'Ingredienti: Cous cous, verdure di stagione.',\n 'price' => 6.60,\n 'visibility' => 1,\n 'cover' => 'https://d2sj0xby2hzqoy.cloudfront.net/kenwood_italy/attachments/data/000/007/984/medium/cous-cous.jpg',\n 'user_id' => 3\n ],\n [\n 'name' => 'Spaghetti di mare',\n 'description' => 'Ingredienti: Spaghetti, pesce del giorno.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://images.lacucinaitaliana.it/gallery/81502/Big/824e4bb7-2416-40b6-9b5a-5beaf2452911.jpg',\n 'user_id' => 3\n ],\n [\n 'name' => 'Penne all\\'arrabbiata',\n 'description' => 'Ingredienti: Penne, pomodori pelati, peperoncino secco, prezzemolo.',\n 'price' => 6.50,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2019/03/SH_Pasta_arrabbiata-1200x800.jpg',\n 'user_id' => 3\n ],\n [\n 'name' => 'Tagliatelle al tartufo nero',\n 'description' => 'Ingredienti: Tagliatelle, tartufo nero, burro, prezzemolo.',\n 'price' => 12.50,\n 'visibility' => 1,\n 'cover' => 'https://static.cookist.it/wp-content/uploads/sites/21/2018/01/tagliatelle-al-tartufo.jpg',\n 'user_id' => 3\n ],\n [\n 'name' => 'Coniglio in umido',\n 'description' => 'Ingredienti: Coniglio, carote, basilico, vino bianco.',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://www.melarossa.it/wp-content/uploads/2021/03/coniglio-in-umido-1.jpg',\n 'user_id' => 3\n ],\n [\n 'name' => 'Gran Crispy McBacon',\n 'description' => 'Ingredienti: Carne 100% bovina, bacon croccante, formaggio, salsa crispy.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'https://www.mcdonalds.it/sites/default/files/styles/compressed/public/products/crispy-20anni--mcbacon-hero_desk.jpg?itok=AksAqxjr',\n 'user_id' => 4\n ],\n [\n 'name' => 'Crispy McWrap',\n 'description' => 'Ingredienti: Carne 100% bovina, bacon croccante, formaggio, salsa crispy.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://www.mcdonalds.it/sites/default/files/styles/compressed/public/bundle/mcmenu-crispy-wrap-hero-dsk.jpg?itok=uhY1DPvX',\n 'user_id' => 4\n ],\n [\n 'name' => 'Crispy McWrap',\n 'description' => '100% petto di pollo italiano avvolto in una nuova croccante panatura, Pecorino Toscano DOP, insalata, pomodoro, salsa ai tre pepi e pane con semi di sesamo.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'https://www.mcdonalds.it/sites/default/files/styles/compressed/public/bundle/menu-mys-chicken_pepper-hero-dsk.jpg?itok=HAPMbcc9',\n 'user_id' => 4\n ],\n [\n 'name' => 'Chicken McNuggets',\n 'description' => 'Croccantissimi bocconcini di 100% petto di pollo proveniente da allevamenti italiani, allevato a terra, senza mangimi OGM.',\n 'price' => 2.50,\n 'visibility' => 1,\n 'cover' => 'https://www.mcdonalds.it/sites/default/files/styles/compressed/public/bundle/mcmenu_large_McNuggets_desktop.jpg?itok=14iA8gwy',\n 'user_id' => 4\n ],\n [\n 'name' => 'Caesar Salad con pollo croccante',\n 'description' => 'Hai mai provato la Caesar Salad con il petto pollo croccante 100% italiano? La sua gustosa panatura si sposa alla perfezione con il mix di insalata tenera, la dolcezza dei pomodorini ciliegia e il formaggio a scaglie. Un mix di ingredienti dal sapore unico.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://www.mcdonalds.it/sites/default/files/styles/compressed/public/bundle/bundle-insalata-pollo_croccante-hero-dsk.jpg?itok=hWRGqIbg',\n 'user_id' => 4\n ],\n [\n 'name' => 'Nighiri sake',\n 'description' => 'Ingredienti: Salmone, riso.',\n 'price' => 2.80,\n 'visibility' => 1,\n 'cover' => 'https://homebeer.it/wp-content/uploads/2019/11/otosan_nigiri_salmone.jpg',\n 'user_id' => 5\n ],\n [\n 'name' => 'Gunkan maguro',\n 'description' => 'Ingredienti: Tonno.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'https://www.sushibe.it/wordpress/wp-content/uploads/2018/04/Gunkan-Maguro-Spicy.jpg',\n 'user_id' => 5\n ],\n [\n 'name' => 'Hosomaki ebiten',\n 'description' => 'Ingredienti: Riso, alghe, gambero in tempura.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://www.youkimagenta.it/wp-content/uploads/2020/03/45.jpg',\n 'user_id' => 5\n ],\n [\n 'name' => 'Sake tartare',\n 'description' => 'Ingredienti: Salmone, avocado, sesamo.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://www.daiki.it/wp-content/uploads/2019/11/IMG_8599.jpg',\n 'user_id' => 5\n ],\n [\n 'name' => 'Sushi misto',\n 'description' => '',\n 'price' => 8.90,\n 'visibility' => 1,\n 'cover' => 'https://www.sakurarc.it/wp-content/uploads/2020/04/55.-sushi-misto.jpg',\n 'user_id' => 5\n ],\n [\n 'name' => 'Piada salsiccia e patate',\n 'description' => 'Ingredienti: Farina, olio evo, acqua, sale, patate e salsiccia',\n 'price' => 5.90,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/0c/fe/29/cd/piada-salsiccia-e-patate.jpg',\n 'user_id' => 6\n ],\n [\n 'name' => 'Piada Lucia',\n 'description' => 'Ingredienti: Farina, olio evo, acqua, sale, rucoal, scamorza, pomodorini, cotto',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2020/03/SH_piadina.jpg',\n 'user_id' => 6\n ],\n [\n 'name' => 'Piada Ernesto',\n 'description' => 'Ingredienti: Farina, olio evo, acqua, sale, crudo, rucola, pomodoro, bufala',\n 'price' => 6.50,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2019/01/piadina-al-crudo.jpg',\n 'user_id' => 6\n ],\n [\n 'name' => 'Piada Vittoria',\n 'description' => 'Ingredienti: Farina, olio evo, acqua, sale, avocado, salmone',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://www.piadinaromagnola.info/wp-content/uploads/2020/02/piadina-salmone-avocado-scaled-e1581457082394-1024x766.jpg',\n 'user_id' => 6\n ],\n [\n 'name' => 'Piada Franco',\n 'description' => 'Ingredienti: Farina, olio evo, acqua, sale, funghi, speck, crescenza',\n 'price' => 6.00,\n 'visibility' => 1,\n 'cover' => 'https://www.negroni.com/sites/negroni.com/files/piadina-con-prosciutto-crudo-e-funghi.jpg',\n 'user_id' => 6\n ],\n [\n 'name' => 'Classico',\n 'description' => 'Ingredienti: Pane, hamburger da 150g di manzo, cheddar, bacon, insalata, pomodoro, cipolla',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://www.mrdoyle.it/wp-content/uploads/2019/01/AdobeStock_209775207-scaled-e1575394210352.jpeg',\n 'user_id' => 7\n ],\n [\n 'name' => '1987',\n 'description' => 'Ingredienti: Hamburger da 150g di Angus, doppio bacon, scamorza, pomodoro',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://www.tribugolosa.com/media/untitled-collage-jpg_crop.jpeg/rh/hamburger-con-fonduta-di-brie-e-pancetta-croccante.jpg',\n 'user_id' => 7\n ],\n [\n 'name' => 'Old style',\n 'description' => 'Ingredienti: Hamburger da 150g di maiale, soffritto della casa, melanzana, maionese',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://www.schaer.com/sites/default/files/2016-07/1064_Hamburger%20ai%20capperi%20con%20porri%20e%20melanzane.jpg',\n 'user_id' => 7\n ],\n [\n 'name' => 'Veggie',\n 'description' => 'Ingredienti: Farina, olio evo, lenticchie, carote, cipolla, paprika dolca, dadolata di peperoni',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://www.buttalapasta.it/wp-content/uploads/2016/06/Hamburger-di-lenticchie.jpg',\n 'user_id' => 7\n ],\n [\n 'name' => 'Bismark',\n 'description' => 'Ingredienti: Hamburger da 200g di bovino, bacon, uovo occhio di bue, battuta di aromi',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://www.donnamoderna.com/content/uploads/2006/11/Hamburger-alla-Bismarck-ricetta-830x625.jpg',\n 'user_id' => 7\n ],\n [\n 'name' => 'Pistacchio',\n 'description' => 'Ingredienti: Latte, crema di pistacchio e pistacchio.',\n 'price' => 2.00,\n 'visibility' => 1,\n 'cover' => 'https://cdn.shopify.com/s/files/1/0262/8580/1553/products/coppetta-gelato.jpg?v=1590158435',\n 'user_id' => 8\n ],\n [\n 'name' => 'Fragola',\n 'description' => 'Ingredienti: Latte, sciroppo di fragola fragole.',\n 'price' => 2.50,\n 'visibility' => 1,\n 'cover' => 'https://cdn.shopify.com/s/files/1/0262/8580/1553/products/coppetta-fragola.jpg?v=1590159387',\n 'user_id' => 8\n ],\n [\n 'name' => 'Yin yang',\n 'description' => 'Ingredienti: Fior di latte e caffè',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://cdn.shopify.com/s/files/1/0262/8580/1553/products/coppetta-gelato-panna-piccola.jpg?v=1590158513',\n 'user_id' => 8\n ],\n [\n 'name' => 'Cioccolato',\n 'description' => 'Ingredienti: Latte, cacao',\n 'price' => 2.00,\n 'visibility' => 1,\n 'cover' => 'https://www.tuttogelatoshop.it/wp-content/uploads/2021/02/012_coppetta_cioccolato_fragola_tuttogelato.jpg',\n 'user_id' => 8\n ],\n [\n 'name' => 'Tropical',\n 'description' => 'Ingredienti: Latte, banane, ciliege',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'https://www.bombagiu.it/wp-content/uploads/2017/07/gelato-coppetta-600x353-3.jpg',\n 'user_id' => 8\n ],\n [\n 'name' => 'Pasticcini assortiti',\n 'description' => 'Pasticcini vari, prezzo al kg.',\n 'price' => 25.00,\n 'visibility' => 1,\n 'cover' => 'https://redacademy.it/wp-content/uploads/2017/07/mignon-pasticceria-1.jpg',\n 'user_id' => 9\n ],\n [\n 'name' => 'Sbrisolona',\n 'description' => 'Prezzo al kg.',\n 'price' => 30.00,\n 'visibility' => 1,\n 'cover' => 'https://i0.wp.com/www.piccolericette.net/piccolericette/wp-content/uploads/2018/09/3711_Sbrisolona.jpg?resize=895%2C616&ssl=1',\n 'user_id' => 9\n ],\n [\n 'name' => 'Sacher',\n 'description' => 'Prezzo al kg.',\n 'price' => 33.50,\n 'visibility' => 1,\n 'cover' => 'https://www.buttalapasta.it/wp-content/uploads/2012/07/torta-sacher.jpg',\n 'user_id' => 9\n ],\n [\n 'name' => 'Millefoglie',\n 'description' => 'Prezzo al kg.',\n 'price' => 40.50,\n 'visibility' => 1,\n 'cover' => 'https://matildevicenzi.it/wp-content/uploads/2016/11/Vicenzi-069-e1478278252111.jpg',\n 'user_id' => 9\n ],\n [\n 'name' => 'Muffin alla nutella',\n 'description' => 'Prezzo al kg.',\n 'price' => 31.50,\n 'visibility' => 1,\n 'cover' => 'https://images.fidhouse.com/fidelitynews/wp-content/uploads/sites/6/2015/10/muffin-al-cocco-ripieni-di-Nutella-e1444311173417.jpg?w=580',\n 'user_id' => 9\n ],\n [\n 'name' => 'Ortolana',\n 'description' => 'Ingredienti: Mozzarella, melanzae, cipolla, peperoni, funghi.',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://i0.wp.com/www.piccolericette.net/piccolericette/wp-content/uploads/2017/12/3243_Pizza.jpg?resize=895%2C616&ssl=1',\n 'user_id' => 10\n ],\n [\n 'name' => 'Fiori di zucca e acciughe',\n 'description' => 'Ingredienti: Mozzarella, fiori di zucca, acciughe basilico.',\n 'price' => 31.50,\n 'visibility' => 1,\n 'cover' => 'https://www.ricettedalmondo.it/images/foto-ricette/p/31389-pizza-con-fiori-di-zucca-e-alici.jpg',\n 'user_id' => 10\n ],\n [\n 'name' => 'Trancio di spada alla griglia',\n 'description' => 'Ingredienti: Pesce spada.',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://www.misya.info/wp-content/uploads/2017/03/pesce-spada-alla-piastra.jpg',\n 'user_id' => 11\n ],\n [\n 'name' => 'Filetto di manzo alla griglia',\n 'description' => 'Ingredienti: Manzo Italiano.',\n 'price' => 14.50,\n 'visibility' => 1,\n 'cover' => 'https://www.lacucinadipier.it/wp-content/uploads/2017/09/Filetto-vitello-e1508918901371.jpg',\n 'user_id' => 11\n ],\n [\n 'name' => 'Tagliere di formaggi',\n 'description' => 'Ingredienti: formaggi del giorno.',\n 'price' =>7.50,\n 'visibility' => 1,\n 'cover' => 'https://www.ilgiornaledelcibo.it/wp-content/uploads/2018/01/tagliere-di-formaggi.jpg',\n 'user_id' => 11\n ],\n [\n 'name' => 'Cotoletta alla milanese',\n 'description' => 'Ingredienti: Vitello italiano.',\n 'price' => 10.00,\n 'visibility' => 1,\n 'cover' => 'https://www.divinamilano.it/wp-content/uploads/2020/02/cotoletta-alla-milanese.jpg',\n 'user_id' => 11\n ],\n [\n 'name' => 'Petto di pollo alla griglia',\n 'description' => 'Ingredienti: Pollo italiano alla griglia.',\n 'price' => 6.50,\n 'visibility' => 1,\n 'cover' => 'https://cdn.ilclubdellericette.it/wp-content/uploads/2018/05/petto-pollo-griglia-790x500.jpg',\n 'user_id' => 11\n ],\n [\n 'name' => 'Maiale funghi e bambù',\n 'description' => 'Ingredienti: Carne di maiale, funghi e bambù.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://www.unmondodisapori.it/wp-content/uploads/2017/10/vitellofunghibambu-1.jpg',\n 'user_id' => 12\n ],\n [\n 'name' => 'Maiale agrodolce',\n 'description' => 'Ingredienti: Maiale, peperoni, ananas.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'https://static.cookist.it/wp-content/uploads/sites/21/2017/05/maiale-in-agrodolce-copertina.png',\n 'user_id' => 12\n ],\n [\n 'name' => 'Spaghetti di soia',\n 'description' => 'Ingredienti: Spaghetti di riso, germogli di soia, zucchine, carote.',\n 'price' => 3.80,\n 'visibility' => 1,\n 'cover' => 'https://blog.giallozafferano.it/danicucina/wp-content/uploads/2020/09/DSC_0871q-720x480.jpg',\n 'user_id' => 12\n ],\n [\n 'name' => 'Ravioli di gambero al vapore',\n 'description' => 'Ingredienti: Farina di riso, gamberi.',\n 'price' => 2.50,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2016/11/SH_ravioli_cinesi_gamberi_vapore.jpg',\n 'user_id' => 12\n ],\n [\n 'name' => 'Alghe fritte',\n 'description' => 'Ingredienti: alghe fritte.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://www.tuttogreen.it/wp-content/uploads/2016/04/shutterstock_255225709.jpg',\n 'user_id' => 12\n ],\n [\n 'name' => 'Mix pakora',\n 'description' => 'Ingredienti: Verdure miste fritte in pastella e spezie.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://ikneadtoeat.com/wp-content/uploads/2019/09/Mixed-Vegetable-Pakora-1.jpg',\n 'user_id' => 13\n ],\n [\n 'name' => 'Samosa',\n 'description' => 'Ingredienti: Paste triangolari fritte ripiene di verdure miste.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/02/samosa-6.jpg',\n 'user_id' => 13\n ],\n [\n 'name' => 'Basmati bianco',\n 'description' => 'Ingredienti: Riso basmati al vapore.',\n 'price' => 2.50,\n 'visibility' => 1,\n 'cover' => 'https://www.donnesulweb.it/wp-content/uploads/2018/01/cucinare-riso-al-vapore-senza-vaporiera.jpg',\n 'user_id' => 13\n ],\n [\n 'name' => 'Riso zafferano',\n 'description' => 'Ingredienti: Riso basmati allo zafferano e mandorle.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'https://cdn.shortpixel.ai/client/to_avif,q_glossy,ret_img,w_980/https://www.combiyou.it/wp-content/uploads/2018/11/riso-basmati-al-curry.jpg',\n 'user_id' => 13\n ],\n [\n 'name' => 'Coconut barfi',\n 'description' => 'Ingredienti: Cocco, aroma di rose.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://nishkitchen.com/wp-content/uploads/2016/03/coconut-burfi-1B-480x480.jpg',\n 'user_id' => 13\n ],\n [\n 'name' => 'Tagliata di angus',\n 'description' => 'Ingredienti: Controfiletto di Angus',\n 'price' => 13.00,\n 'visibility' => 1,\n 'cover' => 'https://www.ristorantecotcos.it/media/k2/items/cache/fe4bbe81600a40063594e597e00eb05b_L.jpg',\n 'user_id' => 14\n ],\n [\n 'name' => 'Tagliere si salumi e formaggi',\n 'description' => 'Ingredienti: Salumi e formaggi della zona, in base alla disponibilità del giorno.',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/0e/03/e8/6c/tagliere-di-salumi-e.jpg',\n 'user_id' => 14\n ],\n [\n 'name' => 'Risotto alla milanese',\n 'description' => 'Ingredienti: Riso carnaroli, zafferano, burro, grana.',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://www.conad.it/content/dam/conad/conad-consumer/ricette/DayOne%20Ricette/S&D/S&D_RisottoMilanese.jpg',\n 'user_id' => 14\n ],\n [\n 'name' => 'Caprese di bufala',\n 'description' => 'Ingredienti: Mozzarella di bufala D.O.P., pomodoro cuore di bue, basilico, olio evo.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://img1.spiiky.com/events/10/80045_0_59c6ba957ab74990ad9ac1da02bde605.jpg?format=webp&quality=80&scale=both&mode=crop&maxwidth=735&maxheight=427&bgcolor=F6F6F6&crop=(3,51,760,490)',\n 'user_id' => 14\n ],\n [\n 'name' => 'Insalata di pollo',\n 'description' => 'Ingredienti: Lattuga, pollo grigliato, capperi, olive.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://www.cucchiaio.it/content/cucchiaio/it/ricette/2019/06/insalata-di-pollo/jcr:content/header-par/image-single.img10.jpg/1560261890876.jpg',\n 'user_id' => 14\n ],\n [\n 'name' => 'French toast',\n 'description' => 'Ingredienti: Pane in cassetta, edamer, cotto, uovo occhio di bue, pepe.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://coopmaster.it/blog/wp-content/uploads/2021/01/french-toast.jpg',\n 'user_id' => 15\n ],\n [\n 'name' => 'Classico',\n 'description' => 'Ingredienti: Pane in cassetta, edamer, cotto.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'https://www.negroni.com/sites/negroni.com/files/styles/scale__1440_x_1440_/public/storiatoast.jpg?itok=NqRQjOjM',\n 'user_id' => 15\n ],\n [\n 'name' => 'Gorgo toast',\n 'description' => 'Ingredienti: Pane in cassetta, gorgonzola dolce, confettura di pere fatta in casa, nocciole tostate.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://www.igorgorgonzola.com/sistemaNews/newsFoto/videoricette/ricetta-toast-pere-gorgonzola-dolce.jpg',\n 'user_id' => 15\n ],\n [\n 'name' => 'Toast veggie',\n 'description' => 'Ingredienti: Pane in cassetta, uovo in camicia, pesto di avocado e basilico.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://static.cookist.it/wp-content/uploads/sites/21/2019/11/toast-con-avocado-e-uova-in-camicia-1200x675.jpg',\n 'user_id' => 15\n ],\n [\n 'name' => 'Toast gourmet',\n 'description' => 'Ingredienti: Pane in cassetta, brie, mortadella, pesto di zucchine e pistacchi.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://capatoast.it/blog/images/articoli/Ricette/Buongustaio/anteprima.jpg',\n 'user_id' => 15\n ],\n [\n 'name' => 'Tempura di verdure',\n 'description' => 'Ingredienti: Verdure del giorno in pastella.',\n 'price' => 3.20,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2017/02/SH_tempura_verdure.jpg',\n 'user_id' => 16\n ],\n [\n 'name' => 'Pollo fritto alla cinese',\n 'description' => 'Ingredienti: Bocconcini di pollo fritto in pastella.',\n 'price' => 3.40,\n 'visibility' => 1,\n 'cover' => 'https://blog.giallozafferano.it/delizieinpentola/wp-content/uploads/2021/01/Pollo-fritto.jpg',\n 'user_id' => 16\n ],\n [\n 'name' => 'Gnocchi di riso',\n 'description' => 'Ingredienti: Gnocchi di riso, carote, funghi, zucchine.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://m.my-personaltrainer.it/images/ricette/791/gnocchi-riso-verdure.jpg',\n 'user_id' => 16\n ],\n [\n 'name' => 'Pollo con ananas',\n 'description' => 'Ingredienti: Carne di pollo, ananas.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://www.misya.info/wp-content/uploads/2018/02/pollo-all-ananas.jpg',\n 'user_id' => 16\n ],\n [\n 'name' => 'Manzo al curry',\n 'description' => 'Ingredienti: Carne di manzo, patate, curry.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'https://www.gustissimo.it/articoli/ricette/carne-di-manzo/manzo-al-curry.jpg',\n 'user_id' => 16\n ],\n [\n 'name' => 'Naan',\n 'description' => 'Ingredienti: Focaccia classica cotta nel forno tandoor.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://rasamalaysia.com/wp-content/uploads/2019/03/naan2.jpg',\n 'user_id' => 17\n ],\n [\n 'name' => 'Pollo zafferano',\n 'description' => 'Ingredienti: Pollo in pezzi, zafferano e spezie.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://www.lacucinaimperfetta.com/wp-content/uploads/2015/10/Pollo-allo-zafferano.jpg',\n 'user_id' => 17\n ],\n [\n 'name' => 'Pollo tandori',\n 'description' => 'Ingredienti: Fusi di pollo, yogurt, tandori e zenzero.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'https://www.cucchiaio.it/content/cucchiaio/it/ricette/2010/06/ricetta-pollo-tandoori/_jcr_content/header-par/image_single.img10.jpg/1452273814970.jpg',\n 'user_id' => 17\n ],\n [\n 'name' => 'Lassi',\n 'description' => 'Ingredienti: Yogurt, acqua, semi di cumino e cardamomo.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://www.greenme.it/wp-content/uploads/2016/07/lassi_indiano.jpg',\n 'user_id' => 17\n ],\n [\n 'name' => 'Bhel Puri',\n 'description' => 'Ingredienti: Riso soffiato, verdure saltate, salsa piccante al tamarindo.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://rasamalaysia.com/wp-content/uploads/2019/03/naan2.jpg',\n 'user_id' => 17\n ],\n [\n 'name' => 'Onion rings',\n 'description' => 'Ingredienti: Anelli di cipolla impanati.',\n 'price' => 6.00,\n 'visibility' => 1,\n 'cover' => 'https://www.nuevomundopub.com/PubFoggia/wp-content/uploads/2020/04/onion-rings-1.jpg',\n 'user_id' => 18\n ],\n [\n 'name' => 'Cheese fried',\n 'description' => 'Ingredienti: Anelli di cipolla impanati.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://food-fanatic-res.cloudinary.com/iu/s--m7eeADvN--/c_thumb,f_auto,g_auto,h_1200,q_auto,w_1200/v1537755904/fried-cheese-balls-photo',\n 'user_id' => 18\n ],\n [\n 'name' => 'Hamurger del diablo',\n 'description' => 'Ingredienti: Bun con sesamo, doppia carne di bovino da 250g, doppio cheddar, doppio bacon, salsa bbq.',\n 'price' => 13.00,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/12/3c/f7/a1/er-grande-doppio-manzo.jpg',\n 'user_id' => 18\n ],\n [\n 'name' => 'King burger',\n 'description' => 'Ingredienti: Bun con sesamo, doppia carne di cavallo da 300g, cheddar, bacon insalata, pomodoro, accompagnata da patatine fritte.',\n 'price' => 18.00,\n 'visibility' => 1,\n 'cover' => 'https://www.piaceriditalia.it/wp/wp-content/uploads/2019/05/AdobeStock_157743662-1500x1069.jpeg',\n 'user_id' => 18\n ],\n [\n 'name' => 'Beef fajitas',\n 'description' => 'Ingredienti: Straccetti di manzo saltati in padella con salsa di soia, peperoni e cipolla, accompagnate da calde tortillas.',\n 'price' => 26.00,\n 'visibility' => 1,\n 'cover' => 'https://theeverykitchen.com/wp-content/uploads/2019/04/easy-steak-fajitas-500x500.jpg',\n 'user_id' => 18\n ],\n [\n 'name' => 'Texas salad',\n 'description' => 'Ingredienti: Insalata verde, scaglie di grana, pollo, fagioli, pomodori, mais.',\n 'price' => 10.00,\n 'visibility' => 1,\n 'cover' => 'https://images.otstatic.com/prod/25954352/1/large.jpg',\n 'user_id' => 19\n ],\n [\n 'name' => 'Chicken caesar salad',\n 'description' => 'Ingredienti: Insalata verde, scaglie di grana, crostini di pane, acciughe, pollo, salsa dressing.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://i2.wp.com/mygorgeousrecipes.com/wp-content/uploads/2019/01/Grilled-Chicken-Caesar-Salad-with-Heatlhy-Yogurt-Dressing-j6.jpg',\n 'user_id' => 19\n ],\n [\n 'name' => 'Rib eye',\n 'description' => 'Ingredienti: Tenero controfiletto di Black Angus irlandese senza osso 370g. circa, servito con patate al forno, quesadillas e insalata mista.',\n 'price' => 18.00,\n 'visibility' => 1,\n 'cover' => 'https://s3.amazonaws.com/thegrillfather/wp-content/uploads/2019/06/hawaiian-rib-eye-steak-1.jpeg',\n 'user_id' => 19\n ],\n [\n 'name' => 'Churrasco',\n 'description' => 'Ingredienti: Fettine di manzo irlandese (350gr circa) speziato servito con patate fritte e quesadillas.',\n 'price' => 14.00,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantechacarero.it/uploads/immagini_pagine/piatti/grigliata-gaucha-modific.jpg',\n 'user_id' => 19\n ],\n [\n 'name' => 'Apple pie',\n 'description' => 'Ingredienti: Classica torta di mele all\\'americana.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/02/apple-pie.jpg?w=713&a=c&h=407',\n 'user_id' => 19\n ],\n [\n 'name' => 'Burritos',\n 'description' => 'Ingredienti: Maiale stufato, riso, mais, fagioli messicani.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/ras/Assets/DAC7A66A-BB1B-49AD-95BF-83EF881DEDAE/Derivates/1abc774a-220c-4d98-912a-2ad56675b6a6.jpg',\n 'user_id' => 20\n ],\n [\n 'name' => 'Tacos di pollo',\n 'description' => 'Ingredienti: Pollo grigliato, guacamole tortilla, tabasco.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://www.soniaperonaci.it/wp-content/uploads/2021/01/Tacos-con-pollo-e-guacamole-quadrata-anteprima-960x960.jpg',\n 'user_id' => 20\n ],\n [\n 'name' => 'Chili',\n 'description' => 'Classico chili di carne di manzo alla texana.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/ras/Assets/4AABF349-67E4-44C5-9C07-153CF5897C3F/Derivates/4F81BC9B-DAD7-4887-B12B-0EC0C1935906.jpg',\n 'user_id' => 20\n ],\n [\n 'name' => 'Nacho con chili',\n 'description' => 'Ingredienti: Nachos con chili alla messicana, guacamole, panna acida.',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://juegoscocinarpasteleria.org/wp-content/uploads/2020/02/Los-mejores-nachos.jpg',\n 'user_id' => 20\n ],\n [\n 'name' => 'Quesadilla',\n 'description' => 'Ingredienti: Quesadilla ripiena di chili e formaggio cheddar.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'https://images.ctfassets.net/2x1b56neok6m/it-media-3402-asset/cc30deb6cd125328c213169aa955d426/shutterstock_531876007.jpg?w=799&q=50',\n 'user_id' => 20\n ],\n [\n 'name' => 'Tartare di tonno',\n 'description' => 'Ingredienti: Tonno rosso, avocado, menta',\n 'price' => 12.00,\n 'visibility' => 1,\n 'cover' => 'https://cottoecrudo.it/wp-content/uploads/2019/09/tartare-tonno-avocado-tonno-1300x867.jpg',\n 'user_id' => 21\n ],\n [\n 'name' => 'Plateau dello chef',\n 'description' => 'Ingredienti: Plateau di pesce fresco di giornata.',\n 'price' => 20.00,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/06/44/f3/59/plateau-di-pesce-crudo.jpg',\n 'user_id' => 21\n ],\n [\n 'name' => 'Linguine allo scoglio',\n 'description' => 'Ingredienti: Linguine, calamari, seppie, gamberi, cozze, prezzemolo.',\n 'price' => 12.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/11/linguine-pescatora.jpg?w=712&a=c&h=406',\n 'user_id' => 21\n ],\n [\n 'name' => 'Tagliolini all\\'astice',\n 'description' => 'Ingredienti: Linguine, astice, pomodori cigliegino, peperonicno, prezzemolo.',\n 'price' => 15.00,\n 'visibility' => 1,\n 'cover' => 'https://it.rc-cdn.community.thermomix.com/recipeimage/ydq8wh5d-228ea-357019-d2121-u2wlwfnp/198e07c5-eba3-42cc-a30f-2dfe9a0a80a8/main/linguine-allastice-con-pomodorini.jpg',\n 'user_id' => 21\n ],\n [\n 'name' => 'Risotto con polipo',\n 'description' => 'Ingredienti: Riso carnaroli, polipo, pomodoro ramato, prezzemolo.',\n 'price' => 13.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2011/09/risotto-con-il-polpo.jpg',\n 'user_id' => 21\n ],\n [\n 'name' => 'Spaghetti alle vongole',\n 'description' => 'Ingredienti: Spaghetti, vongole, peperoncino, prezzemolo.',\n 'price' => 12.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/04/spaghetti-alle-vongole-5.jpg',\n 'user_id' => 22\n ],\n [\n 'name' => 'Seppie alla grigli',\n 'description' => 'Ingredienti: Seppie, prezzemolo, limone.',\n 'price' => 10.00,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2019/07/SH_seppie_griglia.jpg',\n 'user_id' => 22\n ],\n [\n 'name' => 'Tonno scottato',\n 'description' => 'Ingredienti: Tonno rosso, semi di sesamo, salsa di soia.',\n 'price' => 14.00,\n 'visibility' => 1,\n 'cover' => 'https://static.cookist.it/wp-content/uploads/sites/21/2018/07/tataki-di-tonno.jpg',\n 'user_id' => 22\n ],\n [\n 'name' => 'Branzino al forno',\n 'description' => 'Ingredienti: Branzino, pomodoro, cipolla, prezzemolo.',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2011/08/branzino-al-forno.jpg',\n 'user_id' => 22\n ],\n [\n 'name' => 'Lasagne di mare',\n 'description' => 'Ingredienti: Lasagne all\\'uovo, pesce del giorno, besciamella, prezzemolo.',\n 'price' => 9.50,\n 'visibility' => 1,\n 'cover' => 'https://www.repstatic.it/content/nazionale/img/2020/12/16/235712833-5922acc0-7441-4763-a50a-229e053d404c.jpg',\n 'user_id' => 22\n ],\n [\n 'name' => 'Gran fritto misto',\n 'description' => 'Ingredienti: Triglie, calamari, gamberi, alici impanati e fritti.',\n 'price' => 16,00,\n 'visibility' => 1,\n 'cover' => 'https://www.pizzeriaatarantella.it/wp-content/themes/yootheme/cache/paranza-frittura-mista-49a7e4fa.jpeg',\n 'user_id' => 23\n ],\n [\n 'name' => 'Trofie ragù di mare',\n 'description' => 'Ingredienti: Trofie, ragù con pesce del giorno.',\n 'price' => 9.50,\n 'visibility' => 1,\n 'cover' => 'https://www.repstatic.it/content/nazionale/img/2020/12/16/235712833-5922acc0-7441-4763-a50a-229e053d404c.jpg',\n 'user_id' => 23\n ],\n [\n 'name' => 'Salmone gratinato',\n 'description' => 'Ingredienti: Salmone, panatura dello chef.',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://www.manjoo.it/wp-content/uploads/large_dsk/1466692322_539_img.jpg',\n 'user_id' => 23\n ],\n [\n 'name' => 'Grigliata di pesce',\n 'description' => 'Ingredienti: Pesce fresco del giorno.',\n 'price' => 11.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2013/04/grigliata-di-pesce.jpg?w=712&a=c&h=406',\n 'user_id' => 23\n ],\n [\n 'name' => 'Lasagne di mare',\n 'description' => 'Ingredienti: Lasagne all\\'uovo, pesce del giorno, besciamella, prezzemolo.',\n 'price' => 9.50,\n 'visibility' => 1,\n 'cover' => 'https://www.repstatic.it/content/nazionale/img/2020/12/16/235712833-5922acc0-7441-4763-a50a-229e053d404c.jpg',\n 'user_id' => 23\n ],\n [\n 'name' => 'Insalata con germogli di soia',\n 'description' => 'Ingredienti: Cetrioli, carote, germogli di soia, sesamo, salsa di soia, bamboo.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/11/insalata-ai-germogli-di-soia.jpg?w=541&a=c&h=309',\n 'user_id' => 24\n ],\n [\n 'name' => 'Gamberi sale e pepe',\n 'description' => 'Ingredienti: Gamberi, sale, pepe.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://i0.wp.com/www.cucinasenzaglutine.it/wp-content/uploads/2020/06/gamberi-sale-e-pepe-cucinasenzaglutine-sito4-scaled.jpg',\n 'user_id' => 24\n ],\n [\n 'name' => 'Anatra funghi e bambu',\n 'description' => 'Ingredienti: Anatra impanata e fritta, bambù, verdure.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/16/f1/99/6a/anatra-con-funghi-e-bambu.jpg',\n 'user_id' => 24\n ],\n [\n 'name' => 'Bao',\n 'description' => 'Ingredienti: Pane cinese al vapore.',\n 'price' => 2.50,\n 'visibility' => 1,\n 'cover' => 'https://www.saporie.com/content/dam/saporie/it/ricette/Panini%20cinesi%20finale_0006%20copia.jpg',\n 'user_id' => 24\n ],\n [\n 'name' => 'Tempura di patate dolci',\n 'description' => 'Patate dolci in pastella.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'https://p0.pikist.com/photos/867/129/tempura-sweet-potato-pumpkin-japanese-food-food.jpg',\n 'user_id' => 24\n ],\n [\n 'name' => 'Zuppa di wonton',\n 'description' => 'Pasta di wonton, zenzero, verza, macinato di maiale, coriandolo.',\n 'price' => 4.20,\n 'visibility' => 1,\n 'cover' => 'https://www.gustissimo.it/articoli/ricette/minestre-creme-zuppe/zuppa-wonton.jpg',\n 'user_id' => 25\n ],\n [\n 'name' => 'Nuvoletta di drago',\n 'description' => 'Fecola di patate e aroma di gamberi, fritti.',\n 'price' => 2.00,\n 'visibility' => 1,\n 'cover' => 'https://timgate.it/ecm/online-content/369/eac/a4d/nuvole-di-drago_d036ef71.jpg',\n 'user_id' => 25\n ],\n [\n 'name' => 'Tempura di patate dolci',\n 'description' => 'Patate dolci in pastella.',\n 'price' => 3.90,\n 'visibility' => 1,\n 'cover' => 'https://p0.pikist.com/photos/867/129/tempura-sweet-potato-pumpkin-japanese-food-food.jpg',\n 'user_id' => 25\n ],\n [\n 'name' => 'Riso saltato con gamberi',\n 'description' => 'Riso basmati, gamberi, zucchine, carote.',\n 'price' => 3.10,\n 'visibility' => 1,\n 'cover' => 'https://www.gnamgnam.it/wp-content/uploads/2017/11/6-riso-saltato-in-padella.jpg',\n 'user_id' => 25\n ],\n [\n 'name' => 'Calamari fritti',\n 'description' => 'Calamari fritti in pastella.',\n 'price' => 4.30,\n 'visibility' => 1,\n 'cover' => 'https://www.sanvitolocapoweb.co.uk/sw_images/ricette/anelli-di-calamari-fritti_14.jpg',\n 'user_id' => 25\n ],\n [\n 'name' => 'Ravioli alla piastra',\n 'description' => 'Ravioli ripieni di carne e verdure alla piastra.',\n 'price' => 4.30,\n 'visibility' => 1,\n 'cover' => 'https://www.ilricettariodibianca.com/wp-content/uploads/2020/05/Schermata-2020-05-20-alle-12.19.40.png?v=1589970175',\n 'user_id' => 26\n ],\n [\n 'name' => 'Calamari fritti',\n 'description' => 'Calamari fritti in pastella.',\n 'price' => 4.30,\n 'visibility' => 1,\n 'cover' => 'https://www.sanvitolocapoweb.co.uk/sw_images/ricette/anelli-di-calamari-fritti_14.jpg',\n 'user_id' => 26\n ],\n [\n 'name' => 'Uramaki ebiten',\n 'description' => '8 pezzi, riso, alga, tempura di gamberi.',\n 'price' => 10.00,\n 'visibility' => 1,\n 'cover' => 'https://i.pinimg.com/originals/47/96/91/4796916650fd8f76d150d589703edf12.jpg',\n 'user_id' => 26\n ],\n [\n 'name' => 'Chirashi miyumi',\n 'description' => 'Ciotola di riso con salmone, mais, insalata, avocado, salsa di soia.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://cdn.simplesite.com/i/10/95/286823007430415632/i286823014327461298._rsw480h480_szw480h480_.jpg',\n 'user_id' => 26\n ],\n [\n 'name' => 'Futomaki',\n 'description' => '5 pezzi, riso, alga , salmone, avocado, fritto.',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://amysushi.it/wp-content/uploads/2016/06/29-Futomaki-fritto.jpg',\n 'user_id' => 26\n ],\n [\n 'name' => 'Pane al vapore fritto',\n 'description' => 'Pane cinese al vapore fritto.',\n 'price' => 2.50,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/10-768x512.jpg',\n 'user_id' => 27\n ],\n [\n 'name' => 'Riso saltato con salmone',\n 'description' => 'riso saltato con salmone, verdure miste, uova e salsa teriyaki.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/102-768x512.jpg',\n 'user_id' => 27\n ],\n [\n 'name' => 'Pollo alle madorle',\n 'description' => 'pollo saltato con verdure e mandorle.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/113-768x511.jpg',\n 'user_id' => 27\n ],\n [\n 'name' => 'Vitello con patate',\n 'description' => 'vitello saltato con patate.',\n 'price' => 5.50,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/120-768x511.jpg',\n 'user_id' => 27\n ],\n [\n 'name' => 'Doufu',\n 'description' => 'doufu saltate con funghi e bambù.',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/133-768x512.jpg',\n 'user_id' => 27\n ],\n [\n 'name' => 'Stick di gamberi',\n 'description' => 'stick di gamberi* avvolti in una sfoglia croccante.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/1.png',\n 'user_id' => 28\n ],\n [\n 'name' => 'Gambero kataifi',\n 'description' => 'gambero avvolto da pasta kataifi.',\n 'price' => 5.00,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/3-768x574.jpg',\n 'user_id' => 28\n ],\n [\n 'name' => 'Edamame',\n 'description' => 'bacelli di soia.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/16.png',\n 'user_id' => 28\n ],\n [\n 'name' => 'Zuppa di miso',\n 'description' => 'zuppa di miso con alghe e doufu.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/24.png',\n 'user_id' => 28\n ],\n [\n 'name' => 'Hosomaki kappa',\n 'description' => 'piccoli roll di riso farciti con cetrioli.',\n 'price' => 3.00,\n 'visibility' => 1,\n 'cover' => 'http://www.ristorantelin.it/wp-content/uploads/2019/10/55-768x683.jpg',\n 'user_id' => 28\n ],\n [\n 'name' => 'Pork burritos',\n 'description' => 'Tortilla grande ripiena di maiale sfilacciato cotto in salsa bbq e formaggio, riso bianco e fagioli neri, avocado.',\n 'price' => 11.00,\n 'visibility' => 1,\n 'cover' => 'https://img.taste.com.au/JUM3_5uZ/w506-h253-cfill/taste/2017/04/pulled-pork-burrito-125400-1.jpg',\n 'user_id' => 29\n ],\n [\n 'name' => 'Chicken tulip',\n 'description' => 'Sfiziose coscette di pollo fritto servite con salsa bbq.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://www.kitchenclub.eu/sites/default/files/styles/full-format/public/product/webfoto-chickentulips.jpg?itok=Eb84JTNb',\n 'user_id' => 29\n ],\n [\n 'name' => 'Pastrami',\n 'description' => 'Panino farcito con ca. 250 gr. di manzo cotto, affumicato e speziato con senape, cheddar e salsa speciale.',\n 'price' => 12.00,\n 'visibility' => 1,\n 'cover' => 'https://www.agrodolce.it/app/uploads/2020/02/pastrami-2020-r-011.jpg',\n 'user_id' => 29\n ],\n [\n 'name' => 'Ribs',\n 'description' => 'ostine di maiale in salsa bbq servite con patate al forno.',\n 'price' => 14.00,\n 'visibility' => 1,\n 'cover' => 'https://www.godairyfree.org/wp-content/uploads/2008/03/pics-sweet-bbq-ribs-feature.jpg',\n 'user_id' => 29\n ],\n [\n 'name' => 'Veggie burger',\n 'description' => 'La nostra speciale proposta vegetariana, 180g hamburger vegetale con maionese, insalata, pomodoro, cipolla e scamorza .',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://www.noracooks.com/wp-content/uploads/2018/09/Square-500x375.jpg',\n 'user_id' => 29\n ],\n [\n 'name' => 'Simple burger',\n 'description' => 'Bun con sesamo, insalata, pomodoro, cheddar, bacon, cipolla e carne di bovino. Accompagnato con patatine e salsa a scelta.',\n 'price' => 11.50,\n 'visibility' => 1,\n 'cover' => 'https://www.buttalapasta.it/wp-content/uploads/2016/01/hamburger-di-carne-americano.jpg',\n 'user_id' => 30\n ],\n [\n 'name' => 'Double burger',\n 'description' => 'Bun con sesamo, doppio hamburger da 150g di manzo, rucola, grana, pomodoro e senape, accompagnato da patatine.',\n 'price' => 14.00,\n 'visibility' => 1,\n 'cover' => 'https://www.ilgiornaledelcibo.it/wp-content/uploads/2018/01/hamburger-milano-2.jpg',\n 'user_id' => 30\n ],\n [\n 'name' => 'Italy burger',\n 'description' => 'Bun con semi di papavero, carne di suino da 150g, caciocavallo, pomodori secchi, marmellata di cipolle rosse, insalata, accompagnato da patatine.',\n 'price' => 11.00,\n 'visibility' => 1,\n 'cover' => 'https://www.giallozafferano.it/images/169-16957/Hamburger-all-italiana_650x433_wm.jpg',\n 'user_id' => 30\n ],\n [\n 'name' => 'N.Y. Burger',\n 'description' => 'Bun con semi di papavero, carne di angus da 159g, ketchup, cetrioli, cipolla, cheddar, pomodoro e insalata, accompagnato da patatine.',\n 'price' => 9.50,\n 'visibility' => 1,\n 'cover' => 'https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/ras/Assets/1C3E2D92-6F5D-4AE1-A01D-C7374B371494/Derivates/A91E2EA7-7066-4250-8C04-C72F15F29353.jpg',\n 'user_id' => 30\n ],\n [\n 'name' => 'Veggie burger',\n 'description' => '180g hamburger vegetale con maionese, insalata, pomodoro, cipolla e scamorza .',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://www.noracooks.com/wp-content/uploads/2018/09/Square-500x375.jpg',\n 'user_id' => 30\n ],\n [\n 'name' => 'European burger',\n 'description' => 'Bun con semi di sesamo, uovo fritto, carne di pecosa da 150g, spinaci, accompagnato da patatine.',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://static.cookist.it/wp-content/uploads/sites/21/2020/10/hamburger-storia-1200x900.jpg',\n 'user_id' => 30\n ],\n [\n 'name' => 'Hamburger di pesce spada',\n 'description' => 'Bun con semi vari, burger di spada, pesto di zucchine e timo, cipolla.',\n 'price' => 12.50,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2017/10/SH_hamburger_pesce_spada-1200x800.jpg',\n 'user_id' => 31\n ],\n [\n 'name' => 'Hamburger di merluzzo',\n 'description' => 'Bun con semi di sesamo, burger di merluzzo in pastella, zucchine marinate, cipolla, pomodoro, insalata.',\n 'price' => 11.50,\n 'visibility' => 1,\n 'cover' => 'https://www.agrodolce.it/app/uploads/2020/03/hamburger-di-pesce-2020-i-050-980x400.jpg',\n 'user_id' => 31\n ],\n [\n 'name' => 'Hamburger di salmone',\n 'description' => 'Bun con semi di sesamo, burger di salmone, maionese allo zenzero, insalata.',\n 'price' => 11.50,\n 'visibility' => 1,\n 'cover' => 'https://s3.eu-central-1.amazonaws.com/quomi/media/2331/conversions/Hamburger-di-pesce-con-maionese-allo-zenzero-thumb-big.jpg',\n 'user_id' => 31\n ],\n [\n 'name' => 'Hamburger di gamberi',\n 'description' => 'Bun con semi di sesamo, burger di gamberi, gorgonzola, lattuga.',\n 'price' => 12.50,\n 'visibility' => 1,\n 'cover' => 'https://www.ricettedigusto.info/wp-content/uploads/2017/03/fishburger-hamburger-di-pesce3.jpg',\n 'user_id' => 31\n ],\n [\n 'name' => 'Hamburger di polpo e gamberi',\n 'description' => 'Bun con semi di papavero, burger di polipo e gamberi, salsa allo yogurt con cetriolo e lime, marmellata di pomodorino giallo, songino.',\n 'price' => 15.50,\n 'visibility' => 1,\n 'cover' => 'https://www.contemporaneofood.com/NEW/wp-content/uploads/2015/07/hamburger-di-pesce-2-contemporaneo-food.jpg',\n 'user_id' => 31\n ],\n [\n 'name' => 'Penne all\\'amatriciana',\n 'description' => 'Ingredienti: Penne, guanciale, pomodori ramati, pepe, pecorino.',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2016/11/sugo-amatriciana.jpg',\n 'user_id' => 32\n ],\n [\n 'name' => 'Spaghetti alla carbonara',\n 'description' => 'Ingredienti: Spaghetti, guanciale, uovo, pecorino romano, pepe.',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://www.scambiaricette.it/wp-content/uploads/2018/11/carbonara2.jpg',\n 'user_id' => 32\n ],\n [\n 'name' => 'Lasagne alla bolognese',\n 'description' => 'Ingredienti: Lasagne all\\'uovo, ragu di manzo con carote, sedano e cipolla, besciamella, grana.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://www.granarolo.it/system/granarolo_consumer/attachments/data/000/001/606/original/lasagne-alla-bolognese.jpg?1490627827',\n 'user_id' => 32\n ],\n [\n 'name' => 'Trofie al pesto',\n 'description' => 'Ingredienti: Trofie, pesto fatto con: parmigiano, olio evo, basilico, pinoli, pecorino sardo.',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://images.lacucinaitaliana.it/wp-content/uploads/2015/07/25124620/trofie-al-pesto1.jpg',\n 'user_id' => 32\n ],\n [\n 'name' => 'Spaghetti alla puttanesca',\n 'description' => 'Ingredienti: Spaghetti, pomodori pelati, capperi, prezzemolo, acciughe, olive.',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://www.giallozafferano.it/images/ricette/197/19789/foto_hd/hd650x433_wm.jpg',\n 'user_id' => 32\n ],\n [\n 'name' => 'Valtellina',\n 'description' => 'Ingredienti: Pomodoro, mozzarella, bresaola, rucola, grana.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://cortilettomazzini.com/wp-content/uploads/2020/05/pizza_bres_rucola_grana.png',\n 'user_id' => 33\n ],\n [\n 'name' => 'Amatriciana',\n 'description' => 'Ingredienti: Pomodoro, mozzarella, guanciale, pecorino, pepe.',\n 'price' => 7.50,\n 'visibility' => 1,\n 'cover' => 'https://www.unmondodisapori.it/wp-content/uploads/2017/10/Amatriciana-e1508425759164.jpg',\n 'user_id' => 33\n ],\n [\n 'name' => 'Norvegese',\n 'description' => 'Ingredienti: Mozzarella, salmone, crescenza, prezzemolo.',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://www.mysocialrecipe.com/files/admin/immagini/batrakov-master.jpg',\n 'user_id' => 33\n ],\n [\n 'name' => 'Friarielli',\n 'description' => 'Ingredienti: Mozzarella, salsiccia, friarielli.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://www.ristorazioneitalianamagazine.it/CMS/wp-content/uploads/2019/11/pizza-salsiccia-e-friarielli-napoleat-malta-walter-caputo.jpeg',\n 'user_id' => 33\n ],\n [\n 'name' => 'Frutti di mare',\n 'description' => 'Ingredienti: Pomodoro, cozze, vongole, calamari, gamberetti, prezzemolo.',\n 'price' => 9.50,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/05/pizza-con-zafferano-e-frutti-di-mare.jpg',\n 'user_id' => 33\n ],\n [\n 'name' => 'Samosa di carne',\n 'description' => 'Ingredienti: Manzo macinato, carote, cipolle, curry, zenzero, coriandolo, cardamomo, olio evo.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://indiaincucina.files.wordpress.com/2020/10/samosa.png',\n 'user_id' => 34\n ],\n [\n 'name' => 'Gamberoni tandoori',\n 'description' => 'Ingredienti: Gamberoni, yogurt greco, spezie miste, succo di limone.',\n 'price' => 6.50,\n 'visibility' => 1,\n 'cover' => 'https://www.guruganesh.it/img/cibo/gamberoni%20tandoori.JPG',\n 'user_id' => 34\n ],\n [\n 'name' => 'Zuppa dahl',\n 'description' => 'Ingredienti: Lenticchie rosse, curcuma, paprika, pepe nero, zenzero, curry, germogli alfa alfa, canapa.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://static.cookist.it/wp-content/uploads/sites/21/2019/11/dahl-curry-di-lenticchie-indiano.jpg',\n 'user_id' => 34\n ],\n [\n 'name' => 'Dhai raitha',\n 'description' => 'Ingredienti: Yogurt, cumino, peperoncino verde, peperoncino in polvere, cetrioli, pomodoro.',\n 'price' => 3.50,\n 'visibility' => 1,\n 'cover' => 'https://myfoodstory.com/wp-content/uploads/2018/08/Indian-Raita-How-to-make-it-2.jpg',\n 'user_id' => 34\n ],\n [\n 'name' => 'Pollo kashmir',\n 'description' => 'Ingredienti: Pollo, zenzero, finocchio in polvere, pepe nero,curry.',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://rs-menus-api.roocdn.com/images/4c275571-a594-4cf5-83f1-52eef563d9f9/image.jpeg?width=1200&height=630&auto=webp&format=jpg&fit=crop&v=',\n 'user_id' => 34\n ],\n [\n 'name' => 'Lamb biryani',\n 'description' => 'Riso aromatizzato cotto insieme all\\'agnello.',\n 'price' => 14.50,\n 'visibility' => 1,\n 'cover' => 'https://images.immediate.co.uk/production/volatile/sites/30/2020/08/lamb-biryani-83e5c3d.jpg?quality=90&resize=504,458',\n 'user_id' => 35\n ],\n [\n 'name' => 'Rogan josh',\n 'description' => 'Agnello cotto in una salsa a base di yogurt, peperoni e cumino.',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://static.toiimg.com/photo/53192600.cms',\n 'user_id' => 35\n ],\n [\n 'name' => 'Pollo korma',\n 'description' => 'Pollo cotto con yogurt e cocco.',\n 'price' => 12.00,\n 'visibility' => 1,\n 'cover' => 'https://food-images.files.bbci.co.uk/food/recipes/chicken_korma_09900_16x9.jpg',\n 'user_id' => 35\n ],\n [\n 'name' => 'Sag gost',\n 'description' => 'Agnello speziato con spinaci',\n 'price' => 14.50,\n 'visibility' => 1,\n 'cover' => 'https://www.foodrepublic.com/wp-content/uploads/2017/01/saaggosht-700x596.jpg',\n 'user_id' => 35\n ],\n [\n 'name' => 'Matar pani',\n 'description' => 'Formaggio magro con piselli e spezie',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://recipesinhindi.net/wp-content/uploads/2018/06/matar-paneer-recipe-in-hindi-1.jpg',\n 'user_id' => 35\n ],\n [\n 'name' => 'Nachos',\n 'description' => 'Chips ricoperte con formaggio fuso e chili jalapeno',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2018/12/SH_pollo_con_nachos.jpg',\n 'user_id' => 36\n ],\n [\n 'name' => 'Ojos del diablo',\n 'description' => 'Polpette di carne piccanti',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://blog.giallozafferano.it/danicucina/wp-content/uploads/2020/07/DSC_0943-720x480.jpg',\n 'user_id' => 36\n ],\n [\n 'name' => 'Chimichangas',\n 'description' => 'Tortilla fritte, ripiene di pollo, manzo o formaggio e verure',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://www.lemontreedwelling.com/wp-content/uploads/2021/02/chimichangas-11.jpg',\n 'user_id' => 36\n ],\n [\n 'name' => 'Enchiladas',\n 'description' => 'Tortilla ripiene di pollo e ricoperte con salsa chilie, formaggio e sour cream',\n 'price' => 15.50,\n 'visibility' => 1,\n 'cover' => 'https://d1e3z2jco40k3v.cloudfront.net/-/media/mccormick-us/recipes/mccormick/b/800/beef-enchiladas.jpg',\n 'user_id' => 36\n ],\n [\n 'name' => 'Plato charrito',\n 'description' => 'Tagliata di maiale speziata al chile, servita con riso e fagioli',\n 'price' => 10.50,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/0d/7a/9f/f1/photo1jpg.jpg',\n 'user_id' => 36\n ],\n [\n 'name' => 'Chilaquiles',\n 'description' => 'Triangoli di mais con crema di pomodoro e formaggio',\n 'price' => 8.50,\n 'visibility' => 1,\n 'cover' => 'https://thriftandspice.com/wp-content/uploads/2018/07/chilaquiles-rojos-on-a-white-plate.jpg',\n 'user_id' => 37\n ],\n [\n 'name' => 'Camarones al ajillo',\n 'description' => 'Gamberi al profumo di aglio',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://comidasecuatorianas.online/wp-content/uploads/2020/01/camarones-al-ajillo.jpg',\n 'user_id' => 37\n ],\n [\n 'name' => 'Tinga',\n 'description' => 'Piatto di carne sfilacciata con pomodoro, cipolle e spezie',\n 'price' => 15.50,\n 'visibility' => 1,\n 'cover' => 'https://www.recetin.com/wp-content/uploads/2012/03/tinga-de-pollo.jpg',\n 'user_id' => 37\n ],\n [\n 'name' => 'Flautas',\n 'description' => 'Flauti di mais fritti, ripieni di pollo o formaggio e ricoperti con sour cream, guacamole e insalata',\n 'price' => 12.50,\n 'visibility' => 1,\n 'cover' => 'https://lilluna.com/wp-content/uploads/2019/05/flautas-resize-6.jpg',\n 'user_id' => 37\n ],\n [\n 'name' => 'Pollo fritto',\n 'description' => 'Bocconcini di pollo marinati nel lime, accompagnati da insalata e riso',\n 'price' => 17.50,\n 'visibility' => 1,\n 'cover' => 'https://i0.wp.com/www.piccolericette.net/piccolericette/wp-content/uploads/2019/01/3849_Bocconcini.jpg?resize=895%2C616&ssl=1',\n 'user_id' => 37\n ],\n [\n 'name' => 'Lamponi e cioccolato',\n 'description' => 'Frolla con crema al cioccolato e lamponi, prezzo al kg.',\n 'price' => 30.00,\n 'visibility' => 1,\n 'cover' => 'https://www.dolcementeconmagda.it/wp-content/uploads/2018/10/WhatsApp-Image-2018-10-17-at-09.09.19.jpeg',\n 'user_id' => 38\n ],\n [\n 'name' => 'Crostata ai frutti di bosco',\n 'description' => 'prezzo al kg',\n 'price' => 32.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2018/11/Crostata-ai-frutti-di-bosco.jpg',\n 'user_id' => 38\n ],\n [\n 'name' => 'Saint honoré',\n 'description' => 'Prezzo al kg.',\n 'price' => 38.50,\n 'visibility' => 1,\n 'cover' => 'https://www.dolcicolcuore.it/wp-content/uploads/2018/09/IMG_0059-1.jpg',\n 'user_id' => 38\n ],\n [\n 'name' => 'Sacher',\n 'description' => 'Prezzo al kg.',\n 'price' => 31.00,\n 'visibility' => 1,\n 'cover' => 'https://www.tribugolosa.com/uploads/media/sacher-torte-2.jpg?1390503791',\n 'user_id' => 38\n ],\n [\n 'name' => 'Tiramisù',\n 'description' => 'Prezzo al kg.',\n 'price' => 34.00,\n 'visibility' => 1,\n 'cover' => 'https://www.conad.it/content/dam/conad/conad-consumer/ricette/viabagutta/logo_rosso/tiramis%C3%B9%20ricetta%20classica.jpg',\n 'user_id' => 38\n ],\n [\n 'name' => 'Crostata marmellata di mirtilli',\n 'description' => 'Prezzo al kg.',\n 'price' => 26.00,\n 'visibility' => 1,\n 'cover' => 'https://ilpiccoloseme.altervista.org/wp-content/uploads/2018/10/crostata-alla-confettura-di-mirtilli-neri.jpg',\n 'user_id' => 39\n ],\n [\n 'name' => 'Bignè al cioccolato',\n 'description' => 'Prezzo al kg.',\n 'price' => 13.00,\n 'visibility' => 1,\n 'cover' => 'https://www.gustissimo.it/articoli/ricette/dolci-paste-fresche/bigne-al-cioccolato.jpg',\n 'user_id' => 39\n ],\n [\n 'name' => 'Bavarese al limone',\n 'description' => 'Prezzo al kg.',\n 'price' => 29.00,\n 'visibility' => 1,\n 'cover' => 'https://blog.giallozafferano.it/lericettesvelate/wp-content/uploads/2018/01/E4D90421-6A5B-4DD3-BF1C-906AEC728C19.jpeg',\n 'user_id' => 39\n ],\n [\n 'name' => 'Tartellette alle fragole',\n 'description' => 'Prezzo al kg.',\n 'price' => 14.00,\n 'visibility' => 1,\n 'cover' => 'http://pasticceriaclandestina.it/wp-content/uploads/2014/03/tartelletta-fragole-e-crema-al-limone.jpg',\n 'user_id' => 39\n ],\n [\n 'name' => 'Cannoli siciliani',\n 'description' => 'Prezzo al kg.',\n 'price' => 18.00,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2017/06/SH_Gli-spettacolari-cannoli-siciliani.jpg',\n 'user_id' => 39\n ],\n [\n 'name' => 'Torta gelato mango e fragole',\n 'description' => 'Prezzo al kg.',\n 'price' => 30.00,\n 'visibility' => 1,\n 'cover' => 'https://cucinaamoremio.it/wp-content/uploads/2018/07/CheesecakeMango.jpg',\n 'user_id' => 40\n ],\n [\n 'name' => 'Torta gelato cioccolato e caffè',\n 'description' => 'Prezzo al kg.',\n 'price' => 30.00,\n 'visibility' => 1,\n 'cover' => 'https://primochef.it/wp-content/uploads/2021/05/SH_torta_gelato_bimby.jpg',\n 'user_id' => 40\n ],\n [\n 'name' => 'Torta gelato vaniglia e fragola',\n 'description' => 'Prezzo al kg.',\n 'price' => 29.00,\n 'visibility' => 1,\n 'cover' => 'https://www.dolcidee.it/media/uploads/recipe/5d3089b09d4af_torta-gelato-vaniglia-e-fragole-cover-web.jpg',\n 'user_id' => 40\n ],\n [\n 'name' => 'Torta gelato 3 gusti',\n 'description' => 'Prezzo al kg.',\n 'price' => 34.00,\n 'visibility' => 1,\n 'cover' => 'https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/vimdb/157279.jpg',\n 'user_id' => 40\n ],\n [\n 'name' => 'Torta gelato fantasia di cioccolato',\n 'description' => 'Prezzo al kg.',\n 'price' => 40.00,\n 'visibility' => 1,\n 'cover' => 'https://www.cuochemabuone.it/wp-content/uploads/2020/09/torta-gelato-alla-nutella.jpg',\n 'user_id' => 40\n ],\n [\n 'name' => 'Panino kebab',\n 'description' => 'Ingredienti: carne, insalata, pomodoro, maionese, patatine.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://www.ristorantepizzeriajanna.com/wp-content/uploads/2015/12/panino-kebab1.jpg',\n 'user_id' => 41\n ],\n [\n 'name' => 'Piadina kebab',\n 'description' => 'Ingredienti: carne, cipolla, insalata, pomodoro, salse.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/05/1f/f6/d4/tie-break.jpg',\n 'user_id' => 41\n ],\n [\n 'name' => 'Pizza kebab',\n 'description' => 'Ingredienti: carne, pomodoro, mozzarella, salse.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://static.nexilia.it/indiscreto/2015/07/Pizza-Kebab.jpg',\n 'user_id' => 41\n ],\n [\n 'name' => 'Calzone kebab',\n 'description' => 'Ingredienti: carne, pomodoro, mozzarella, salse.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://dzpybaqldk5xx.cloudfront.net/prod/spree/2130/products/785/product/CALZONE_KEBAB.jpg?1616418156',\n 'user_id' => 41\n ],\n [\n 'name' => 'Falafel',\n 'description' => 'Falafel con patate e salse.',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/03/falafel-di-fagioli.jpg?w=712&a=c&h=406',\n 'user_id' => 41\n ],\n [\n 'name' => 'Pizza kebab',\n 'description' => 'Ingredienti: carne, pomodoro, mozzarella, salse.',\n 'price' => 8.00,\n 'visibility' => 1,\n 'cover' => 'https://static.nexilia.it/indiscreto/2015/07/Pizza-Kebab.jpg',\n 'user_id' => 42\n ],\n [\n 'name' => 'Falafel',\n 'description' => 'Falafel con patate e salse.',\n 'price' => 9.00,\n 'visibility' => 1,\n 'cover' => 'https://wips.plug.it/cips/buonissimo.org/cms/2012/03/falafel-di-fagioli.jpg?w=712&a=c&h=406',\n 'user_id' => 42\n ],\n [\n 'name' => 'Calzone kebab',\n 'description' => 'Ingredienti: carne, pomodoro, mozzarella, salse.',\n 'price' => 7.00,\n 'visibility' => 1,\n 'cover' => 'https://dzpybaqldk5xx.cloudfront.net/prod/spree/2130/products/785/product/CALZONE_KEBAB.jpg?1616418156',\n 'user_id' => 42\n ],\n [\n 'name' => 'Piadina kebab',\n 'description' => 'Ingredienti: carne, cipolla, insalata, pomodoro, salse.',\n 'price' => 4.00,\n 'visibility' => 1,\n 'cover' => 'https://media-cdn.tripadvisor.com/media/photo-s/05/1f/f6/d4/tie-break.jpg',\n 'user_id' => 42\n ],\n [\n 'name' => 'Panino kebab',\n 'description' => 'Ingredienti: carne, insalata, pomodoro, maionese, patatine.',\n 'price' => 4.50,\n 'visibility' => 1,\n 'cover' => 'https://www.ristorantepizzeriajanna.com/wp-content/uploads/2015/12/panino-kebab1.jpg',\n 'user_id' => 42\n ],\n ];\n\n foreach($products as $product) {\n $new_product = new Product;\n\n $new_product->name = $product['name'];\n $new_product->description = $product['description'];\n $new_product->price = $product['price'];\n $new_product->visibility = $product['visibility'];\n $new_product->cover = $product['cover'];\n $new_product->user_id = $product['user_id'];\n \n $new_product->save();\n }\n }",
"protected function prepareForValidation()\n {\n $this->merge([\n 'nome' => $this->nome,\n 'nascimento' => convertDateToDatabase($this->nascimento),\n 'cpf' => returnOnlyNumbers($this->cpf),\n 'email' => $this->email,\n ]);\n }",
"public function ListarIngredientesVendidos() \n{\n\tself::SetNames();\n\t$sql =\"SELECT \n\tproductos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, productos.stockminimo, categorias.nomcategoria, SUM(detalleventas.cantventa) as cantidad \n\tFROM\n\t(productos LEFT OUTER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto) LEFT OUTER JOIN categorias ON \n\tcategorias.codcategoria=productos.codcategoria WHERE detalleventas.codproducto is not null GROUP BY productos.codproducto\";\n\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}"
] | [
"0.6603842",
"0.6096413",
"0.6059011",
"0.57614875",
"0.56514746",
"0.56503844",
"0.5648528",
"0.5648528",
"0.5648528",
"0.56449336",
"0.5598058",
"0.55464023",
"0.5541658",
"0.5538923",
"0.54876715",
"0.54562014",
"0.53697586",
"0.5296862",
"0.52912205",
"0.5282122",
"0.5280195",
"0.52555895",
"0.52148485",
"0.5174461",
"0.5173445",
"0.516803",
"0.51672804",
"0.51568866",
"0.5129478",
"0.512271",
"0.511382",
"0.5105496",
"0.5083564",
"0.5059176",
"0.5057384",
"0.5039154",
"0.5017706",
"0.49913314",
"0.49843886",
"0.49814805",
"0.49575052",
"0.49513495",
"0.49454728",
"0.49433893",
"0.4908662",
"0.4894731",
"0.488273",
"0.486488",
"0.48519492",
"0.48449716",
"0.48443735",
"0.48391095",
"0.48298925",
"0.4824478",
"0.48014444",
"0.47941938",
"0.47914654",
"0.47816262",
"0.47702032",
"0.47662362",
"0.476191",
"0.47569272",
"0.4752921",
"0.47344977",
"0.47338477",
"0.47322565",
"0.47234383",
"0.47216904",
"0.47210425",
"0.47126397",
"0.47050342",
"0.47033215",
"0.46927577",
"0.46893647",
"0.46871635",
"0.46807164",
"0.46757045",
"0.4674797",
"0.46719882",
"0.466935",
"0.4667474",
"0.46621838",
"0.46610707",
"0.46595308",
"0.46550566",
"0.46541893",
"0.46469718",
"0.4646653",
"0.46465024",
"0.46462327",
"0.46453667",
"0.46392497",
"0.46351457",
"0.4631372",
"0.4626134",
"0.462592",
"0.46097773",
"0.4604286",
"0.4598413",
"0.45949534",
"0.4594404"
] | 0.0 | -1 |
Returns list of ingredients. | public function listIngredients(): string
{
$listIngredients = '';
if (null !== $this->name) {
$listIngredients = sprintf('%s:', $this->name);
}
if (null !== $this->dough) {
$listIngredients = sprintf('%s %s,', $listIngredients, $this->dough);
}
if (null !== $this->topping) {
$listIngredients = sprintf('%s %s,', $listIngredients, $this->topping);
}
if (null !== $this->sauce) {
$listIngredients = sprintf('%s %s.', $listIngredients, $this->sauce);
}
return $listIngredients;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function list()\n {\n return Recipe::all()->load('ingredients');\n }",
"public function getIngredients()\n {\n return $this->ingredients;\n }",
"public function getIngredients()\r\n {\r\n return $this->_ingredients;\r\n }",
"public function getIngredients():array\n {\n return $this->ingredients;\n }",
"public function getIngredients(): array{\r\n $ingredients = array();\r\n $con = $this->db->getConnection();\r\n foreach(mysqli_query($con, 'SELECT * FROM ingredients')as $key){ $ingredients[$key['idingredients']] = $key['ingredient']; }\r\n return $ingredients;\r\n $this->con->closeConnection();\r\n }",
"public function getAllIngredients(): array {\n try {\n return DB::select('select * from ingredients');\n } catch(Exception $e) {\n throw new Exception(\"Si è verificato un errore nel recupero degli ingredienti.\");\n }\n }",
"public function ingredients() {\n return $this->hasMany(Ingredient::class);\n }",
"public function index()\n {\n $ingredientes = Ingredientes::all();\n return $ingredientes;\n }",
"public function ingredients()\n {\n return $this->hasMany('App\\Http\\Models\\Ingredient');\n }",
"public function ingredients()\n {\n return $this->hasMany('App\\Ingredient');\n }",
"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}",
"public function getIngredientes()\n {\n try {\n $sql = $this->conexao->prepare(\"select * from \" . TABLENAME . \" where exc = 0\");\n $resultado = $sql->query();\n $ingrediente = $resultado->fetchAll();\n return $ingrediente;\n } catch (PDOException $e) {\n echo \"Erro atualizar: \" . $e->getMessage();\n }\n }",
"public function index()\n {\n return json_encode(Ingredient::all());\n }",
"public function getItems()\n {\n return $this->hasMany(Items::className(), ['ingredient_id' => 'id']);\n }",
"public function ingredients()\n {\n return $this->hasMany('App\\Models\\Product');\n }",
"public function actionIngredientRecipes()\n {\n $ingredientRecipes = IngredientRecipeDao::findAll([\"idRecipe\" => SiteUtil::getUrlParameters()[2]] );\n echo json_encode($this->ingredientRecipesToArray($ingredientRecipes));\n }",
"public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n\n if ($user->hasRole('ROLE_ECOMMERCE_ADMIN')) {\n $ingredients = $em->getRepository(Ingredient::class)->findAll();\n } else {\n $ingredients = $em->getRepository(Ingredient::class)->getOwnedByUser($user);\n }\n\n return [\n 'ingredients' => $ingredients,\n ];\n }",
"public function index()\n {\n $response = GroceryList::all()->map(function ($item) {\n return $item->ingredient;\n });\n\n return $response;\n }",
"public function getIngredientes($id) {\n $ingredientesArray = \\app\\models\\Recetasproducto::find()->where(['recetastbl_id' => $id])->all();\n return $ingredientesArray;\n }",
"public function index()\n {\n return IngredientResource::collection(Ingredient::all());\n }",
"function getRecipeIngredients($recipe){\n\t $recipeid = $this->getRecipeID($recipe);\n\t $array = array();\n\t\t$i = 0;\n\t $list = @mysql_query(\"SELECT * FROM Ingredients WHERE Recipe = '$recipeid'\");\n\t\t while($row = @mysql_fetch_assoc($list)) \n\t\t { \n\t\t $name=$row['IngredientName'];\n\t\t $qty = $row['Quantity'];\n\t\t $unit = $row['Units'];\n\t\t $array2 = array($qty,$unit,$name);\n\t\t\t$array[$i] = $array2;\n\t\t\t$i = $i+1;\n\t\t\t\n\t\t }\t\n\t\treturn $array;\n\t}",
"function getIngredients($servings=NULL,$optional=FALSE) {\n\t\tglobal $DB_LINK, $db_table_ingredientmaps;\n\t\t$ingredients = array();\n\t\t\n\t\t$scaling = null;\n\t\t\n\t\t// compute the scaling\n\t\tif ($this->serving_size != 0 && $this->serving_size != \"\")\n\t\t{\n\t\t\t$scaling = $servings / $this->serving_size;\n\t\t}\n\n\t\tif ($scaling == NULL || $servings == 0)\n\t\t{\n\t\t\t$scaling=1;\n\t\t}\n\t\t$sql = \"SELECT * FROM $db_table_ingredientmaps WHERE map_recipe=\" . $DB_LINK->addq($this->id, get_magic_quotes_gpc());\n\t\t$rc = $DB_LINK->Execute($sql);\n\t\twhile (!$rc->EOF) {\n\t\t\t// Only add the ingredient if we are suppose to\n\t\t\tif (($optional && $rc->fields['map_optional']==$DB_LINK->true) ||\n\t\t\t\t\t$rc->fields['map_optional']!=$DB_LINK->true)\n\t\t\t{\n\t\t\t\t$ingObj = new Ingredient();\n\t\t\t\t$ingObj->setIngredientMap($rc->fields['map_ingredient'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_recipe'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_qualifier'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_quantity'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_unit'],\n\t\t\t\t\t\t\t\t\t$rc->fields['map_order']);\n\t\t\t\t$ingObj->loadIngredient();\n\t\t\t\t$ingObj->convertToBaseUnits($scaling);\n\t\t\t\t$ingredients = ShoppingList::combineIngredients($ingredients, $ingObj);\n\t\t\t}\n\t\t\t$rc->MoveNext();\n\t\t}\n\t\treturn $ingredients;\n\t}",
"public function ingredientesAComparar($list){\n\n $arrIngredientes = array();\n\n foreach($list as $item){\n $ingre = new Ingrediente($item -> getIngrediente());\n $ingre -> getInfoBasic();\n array_push($arrIngredientes, $ingre);\n }\n return $arrIngredientes;\n }",
"public function getIngredient(){\n\n // echo \"Recipes\";exit;\n // $recipe = \\App\\Recipe::;\n $ingredient = Ingredient::where('id','=', 1)->first();\n\n // echo '<pre>'; print_r($recipe); echo '</pre>'; exit;\n\n foreach($ingredient as $r){\n echo '<pre>'; print_r($r); echo '</pre>'; \n }\n // echo Auth::user(1);\n // echo '<pre>'.$recipe.'</pre>'; \n exit;\n return View::make('admin.ingredients');\n // ->with(array(\n // 'recipe' => $recipe,\n // ));\n }",
"public function ingredient()\n {\n $ingredients = Ingredient::select('id', 'name', 'price')->paginate(30);\n return view('admin.ingredient.index')->with('ingredients', $ingredients);\n }",
"public function ListarIngredientesVendidos() \n{\n\tself::SetNames();\n\t$sql =\"SELECT \n\tproductos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, productos.stockminimo, categorias.nomcategoria, SUM(detalleventas.cantventa) as cantidad \n\tFROM\n\t(productos LEFT OUTER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto) LEFT OUTER JOIN categorias ON \n\tcategorias.codcategoria=productos.codcategoria WHERE detalleventas.codproducto is not null GROUP BY productos.codproducto\";\n\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}",
"public function recipeingredients(){\n return $this->hasMany(RecipeIngredient::class);\n }",
"public function recipes()\n\t\t{\n\t\t\t\n\t\t\tif (! $this->recipes)\n\t\t\t{\n\t\t\t\t$this->recipes = BLGenericRecord::find(\"Recipe\");\n\t\t\t}\n\t\t\treturn $this->recipes;\n\t\t}",
"public function getRecipes()\n\t{\n\t\treturn $this->recipes;\n\t}",
"public function index()\n {\n $ingredients = Ingredient::all();\n return response()->json($ingredients);\n }",
"public function index()\n {\n $ingredients = Ingredient::all();\n\n return $this->showAll($ingredients);\n }",
"public function getRecipeIngredients(int $id_recipe): array {\n try {\n $list = DB::select('select * from recipe_has_ingredients where id_recipe = :id', ['id'=>$id_recipe]);\n $ingredients = [];\n foreach ($list as $value) {\n $ingredient = $this->getIngredient($value->id_ingredient);\n $ingredient->quantity = $value->quantity;\n $ingredients[] = $ingredient;\n }\n return $ingredients;\n } catch(Exception $e) {\n throw new Exception(\"Si è verificato un errore nel recupero degli ingredienti della ricetta.\");\n }\n }",
"public function getRecipes():array\n {\n return $this->recipes;\n }",
"public function searchIngredients(string $searchTerm)\n {\n $ingredients = Ingredient::where('label', 'LIKE', \"{$searchTerm}%\")->get();\n return $ingredients;\n }",
"public function ingredientes(){\n return $this->belongsToMany(Ingrediente::class);\n }",
"public function show($id)\n {\n $ingredient = Ingredient::find($id);\n\n return $ingredient->count() > 0\n ? new IngredientResource($ingredient)\n : [];\n }",
"public function getActiveIngredients(): ?array\n {\n try {\n $list = DB::select('select * from ingredients where active = :active', ['active'=>1]);\n return $list ?? null;\n } catch(Exception $e) {\n throw new Exception(\"Si è veririficato un errore nel recupero degli ingredienti attivi.\");\n }\n }",
"public function ingredients()\n {\n return $this->belongsTo('App\\Models\\Ingredient');\n }",
"public function getRecetteIngredients($id){\n $sql = \"SELECT * FROM RecetteIngredients INNER JOIN Ingredient ON Ingredient.idIngred= RecetteIngredients.idIngred WHERE (RecetteIngredients.idRecette= :id)\";\n $query = $this->_connexion->prepare($sql);\n $query->bindValue(':id', $id, PDO::PARAM_INT);\n $query->execute();\n return $query->fetchAll(); \n }",
"public function run()\n {\n //\n\n Ingredient::truncate();\n\n $ingredients = [\n [\n \"name\" => \"Лосось\", \"price\" => 100, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Тунец\", \"price\" => 110, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Угорь\", \"price\" => 130, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Креветка Тигровая\", \"price\" => 140, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Окунь\", \"price\" => 60, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Кунжут Белый\", \"price\" => 20, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Кунжут Черный\", \"price\" => 20, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Кунжут ч/б\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Икра Тобико Красная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Икра Тобико Зелёная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Икра Тобико Черная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Старушка Тунца\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Огурец\", \"price\" => 20, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Авакадо\", \"price\" => 100, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Укроп\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Нори\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Coating\n ],\n [\n \"name\" => \"Лосось\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Тунец\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Угорь\", \"price\" => 65, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Креветка Тигровая\", \"price\" => 70, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Окунь\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Снежный Краб\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Креветка Салатная\", \"price\" => 40, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Мидии\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Кальмар\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Курица Жареная\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Лосось Жаренный\", \"price\" => 55, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Окунь Жаренный\", \"price\" => 35, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Сливочный Сыр\", \"price\" => 30, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Плаванный сыр\", \"price\" => 25, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Икра Тобико Красная\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Икра Лосося\", \"price\" => 100, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Огурец\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Авакадо\", \"price\" => 50, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Чука\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Помидор\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Сладкиц Перец \", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Айсберг\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Лук зелёный\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Соус спайси\", \"price\" => 15, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n [\n \"name\" => \"Майонез\", \"price\" => 10, \"type\" => \\App\\Enums\\UseIngredientType::Filling\n ],\n ];\n\n\n foreach ($ingredients as $ingredient)\n \\App\\Ingredient::create([\n 'title' => $ingredient[\"name\"],\n 'mass' => \"30\",\n 'quantity' => \"1\",\n 'price' => $ingredient[\"price\"],\n 'use_type' => $ingredient[\"type\"],\n ]);\n\n\n }",
"public function index()\n {\n $ingredients = ingredient::get()->all();\n return view('ingredients.index', compact('ingredients'));\n }",
"public function index()\n {\n $ingredients = Ingredient::all();\n\n $data = [\n 'ingredients' => $ingredients\n ];\n\n return view('user.ingredient.index', $data);\n }",
"public function inventory()\n\t{\n\t\t$list = array();\n\n\t\tif (count($this->items) > 0)\n\t\t{\n\t\t\tforeach ($this->items as $item)\n\t\t\t{\n\t\t\t\t$list[] = array(\n\t\t\t\t\t'id' => $item->id,\n\t\t\t\t\t'name' => $item->name(),\n\t\t\t\t\t'price' => $item->parameter,\n\t\t\t\t\t'img' => $item->img(),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $list;\n\t}",
"public function getIngredientsById($r_id)\r\n {\r\n require 'database.php';\r\n $sql = \"SELECT i.ingredient, i.amount, m.measurements FROM `ingredients` AS i LEFT JOIN measurement AS m ON m.id = i.measurement WHERE i.recipe_id = $r_id\";\r\n $output = $DB_con->query($sql);\r\n foreach ($output as $outputs) {\r\n echo \"<p>\" . $outputs['ingredient'] . \" \" . $outputs['amount'] . \" \". $outputs['measurements'] . \"</p>\";\r\n \r\n \r\n }\r\n }",
"public function getProductoIngredientes($idProducto){\n $ingredientes = new IngredienteProducto($idProducto);\n return $ingredientes -> buscarIngredienteOb();\n\n }",
"private function readIngredientsData() {\n $data = file_get_contents(__DIR__ . '/../../../src/app/Ingredient/data.json'); \n $arr_data = json_decode($data);\n\n return $arr_data; \n }",
"public function show($id)\n {\n $ingredients = Ingredient::all();\n return response()->json([$ingredients]);\n }",
"public function indexAndTagsAndIngredients()\n {\n $recipes = Recipe::all()->load([\"recipeTags\", \"recipeIngredients.ingredient\"]);\n\n return response()->json([\n 'message' => 'Great success!',\n 'recipes' => $recipes,\n ]);\n }",
"private function getIngredientNames(ArrayCollection $ingredients = null): array\n {\n $ingredients = $ingredients ?? $this->ingredients;\n\n $ingredient_names = $ingredients->map(function (Ingredient $ingredient) {\n return $ingredient->title;\n })->toArray();\n\n return $ingredient_names;\n }",
"public function recipes()\n\t{\n\t\treturn $this->belongsToMany(Ingredient::class, 'recipe_ingredients', 'ingredient_id', 'recipe_id');\n\t}",
"public function setIngredients($ingredients)\n {\n $this->ingredients = $ingredients;\n\n return $this;\n }",
"public static function all() {\n\n $query = DB::connection()->prepare('SELECT * FROM Ruokalaji');\n $query->execute();\n\n $rows = $query->fetchAll();\n\n $recipes = array();\n\n foreach ($rows as $row) {\n $recipes[] = new Recipe(array(\n 'id' => $row['id'],\n 'kayttaja' => $row['kayttaja'],\n 'nimi' => $row['nimi'],\n 'ateriatyyppi' => $row['ateriatyyppi'],\n 'paaraaka_aine' => $row['paaraaka_aine'],\n 'vaikeustaso' => $row['vaikeustaso'],\n 'valmistusaika' => $row['valmistusaika'],\n 'resepti' => $row['resepti']\n ));\n }\n\n return $recipes;\n }",
"function Ingredient()\n {\n return $this->hasMany('App\\Ingredient');\n }",
"public static function import_nutrition( $ingredients ) {\n\t\t$wpurp_nutrition = get_option( 'wpurp_nutritional_information', array() );\n\n\t\tforeach ( $ingredients as $ingredient_id ) {\n\t\t\t$ingredient = get_term( $ingredient_id, 'ingredient' );\n\n\t\t\t$nutrition = isset( $wpurp_nutrition[ $ingredient_id ] ) ? $wpurp_nutrition[ $ingredient_id ] : false;\n\n\t\t\tif ( $nutrition ) {\n\t\t\t\t$wprm_nutrition = array(\n\t\t\t\t\t'amount' => isset( $nutrition['_meta']['serving_quantity'] ) ? sanitize_text_field( $nutrition['_meta']['serving_quantity'] ) : '',\n\t\t\t\t\t'unit' => isset( $nutrition['_meta']['serving_unit'] ) ? sanitize_text_field( $nutrition['_meta']['serving_unit'] ) : '',\n\t\t\t\t\t'nutrients' => array(),\n\t\t\t\t);\n\n\t\t\t\t$nutrition_mapping = array(\n\t\t\t\t\t'calories' => 'calories',\n\t\t\t\t\t'carbohydrate' => 'carbohydrates',\n\t\t\t\t\t'protein' => 'protein',\n\t\t\t\t\t'fat' => 'fat',\n\t\t\t\t\t'saturated_fat' => 'saturated_fat',\n\t\t\t\t\t'polyunsaturated_fat' => 'polyunsaturated_fat',\n\t\t\t\t\t'monounsaturated_fat' => 'monounsaturated_fat',\n\t\t\t\t\t'trans_fat' => 'trans_fat',\n\t\t\t\t\t'cholesterol' => 'cholesterol',\n\t\t\t\t\t'sodium' => 'sodium',\n\t\t\t\t\t'potassium' => 'potassium',\n\t\t\t\t\t'fiber' => 'fiber',\n\t\t\t\t\t'sugar' => 'sugar',\n\t\t\t\t\t'vitamin_a' => 'vitamin_a',\n\t\t\t\t\t'vitamin_c' => 'vitamin_c',\n\t\t\t\t\t'calcium' => 'calcium',\n\t\t\t\t\t'iron' => 'iron',\n\t\t\t\t);\n\t\t\n\t\t\t\t$migrate_values = array(\n\t\t\t\t\t'vitamin_a' => 5000,\n\t\t\t\t\t'vitamin_c' => 82.5,\n\t\t\t\t\t'calcium' => 1000,\n\t\t\t\t\t'iron' => 18,\n\t\t\t\t);\n\t\t\n\t\t\t\tforeach ( $nutrition_mapping as $wpurp_field => $wprm_field ) {\n\t\t\t\t\t$wprm_nutrition['nutrients'][ $wprm_field ] = isset( $nutrition[ $wpurp_field ] ) ? $nutrition[ $wpurp_field ] : '';\n\t\t\n\t\t\t\t\tif ( array_key_exists( $wprm_field, $migrate_values ) && $recipe['nutrition'][ $wprm_field ] ) {\n\t\t\t\t\t\t// Daily needs * currently saved as percentage, round to 1 decimal.\n\t\t\t\t\t\t$wprm_nutrition['nutrients'][ $wprm_field ] = round( $migrate_values[ $nutrient ] * ( $recipe['nutrition'][ $wprm_field ] / 100 ), 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$term_id = self::get_or_create_ingredient( $ingredient->name );\n\t\t\t\tupdate_term_meta( $term_id, 'wprpn_nutrition', $wprm_nutrition );\n\t\t\t}\n\t\t}\n\t}",
"public function getRecipes(){\n\t\t$cache = Zend_Registry::get('cache');\n\t\t// see if product - list is already in cache\n\t\tif(!$recipes = $cache->load('recipesByManufacturerId'.$this->id)) {\n\t\t\t$recipes = array();\n\t\t\tif(is_array($this->getProducts())){\n\t\t\t\tforeach ($this->getProducts() as $product){\n\t\t\t\t\t$componentsArray = Website_Model_Component::componentsByIngredientId($product->getIngredient()->id);\n\t\t\t\t\tif(is_array($componentsArray)){\n\t\t\t\t\t\tforeach ($componentsArray as $component){\n\t\t\t\t\t\t\t$recipes[$component->recipeId] = Website_Model_CbFactory::factory('Website_Model_Recipe',$component->recipeId);\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$cache->save($recipes,'recipesByManufacturerId'.$this->id,array('model'));\n\t\t}\n\t\treturn $recipes;\n\t}",
"public function index()\n {\n //перевірити чи існує рецепт\n $ingredient = Ingredient::all();\n return view('admin.ingredients.index',['ingredient'=>$ingredient]);\n }",
"public function view_ingredients($id) {\n //permittedArea();\n $data['view_assistant'] = $this->db->get_where('product_ingredients', ['product_preparation' => $id]);\n theme('view_ingredients', $data);\n }",
"public function getInventoryItems(){\n $accounts = [];\n return $accounts;\n }",
"function viewIngredient(){\n $id=$_REQUEST['id'];\n include(\"../model/ingredient.php\");\n $obj=new ingredient();\n\n if($obj->getIngredients($id)) {\n $row=$obj->fetch();\n echo '{\"result\":1,\"ingredients\":[';\n while($row){\n echo json_encode($row);\n $row=$obj->fetch();\n if($row){\n echo \",\";\n }\n }\n echo \"]}\";\n }\n else {\n echo '{\"result\":0}';\n }\n }",
"protected static function GET_list() {\n\t\tif($db = self::RequireLatestDatabase())\n\t\t\tif($select = $db->prepare('select id, name, lastServed, complexity from recipe order by name'))\n\t\t\t\tif($select->execute()) {\n\t\t\t\t\t$recipe = new Row();\n\t\t\t\t\tif($select->bind_result($recipe->id, $recipe->name, $recipe->lastServed, $recipe->complexity)) {\n\t\t\t\t\t\t$recipes = [];\n\t\t\t\t\t\twhile($select->fetch())\n\t\t\t\t\t\t\t$recipes[] = $recipe->dupe();\n\t\t\t\t\t\tself::Success($recipes);\n\t\t\t\t\t} else\n\t\t\t\t\t\tself::DatabaseError('Error binding results from looking up recipes', $select);\n\t\t\t\t} else\n\t\t\t\t\tself::DatabaseError('Error looking up recipes', $select);\n\t\t\telse\n\t\t\t\tself::DatabaseError('Error preparing to look up recipes', $db);\n\t}",
"public function getInsuredItems()\n {\n return isset($this->InsuredItems) ? $this->InsuredItems : null;\n }",
"function getIngredientes($arr){\n\treturn array_map(function($val){return getIngrediente($val);}, $arr);\n}",
"public function show($id) {\n\n $ingredient = DB::table('ingredients')\n ->join('recipes', 'ingredients.RID', '=', 'recipes.id')\n ->select('ingredients.*', 'recipes.Name as recipeName','recipes.id as recipeID')\n ->where('ingredients.id','=',$id)\n ->get();\n return $ingredient;\n }",
"public function ingredient()\n {\n return $this->belongsTo('App\\Models\\Ingredient');\n }",
"function get_ingredients_html($string, $echo = false) {\n\t// trim excess whitespace\n\t$html = trim($string);\n\n\t// if first line is followed by blank line, it should be wrapped in an h6 and followed by the start of a list\n\tif (preg_match('#\\A(.*)\\r\\n\\r\\n#m', $html, $matches)) {\n\t\t$html = str_replace($matches[0], '<h6>' . $matches[1] . '</h6><ul><li>', $html);\n\t}\n\t// otherwise, just start with a list\n\telse {\n\t\t$html = '<ul><li>' . $html;\n\t}\n\t// close list\n\t$html .= '</li></ul>';\n\n\t// titles (blank lines before and after) should be wrapped in an h6, close previous list, and start a new list\n\t$html = preg_replace('#\\r\\n\\r\\n(.*)\\r\\n\\r\\n#m', \"</li></ul><h6>$1</h6><ul><li>\", $html);\n\n\t// regular list items\n\t$html = str_replace(\"\\r\\n\", '</li><li>', $html);\n\n\tif ($echo) {\n\t\techo $html;\n\t}\n\telse {\n\t\treturn $html;\n\t}\n}",
"public static function queryListInmuebles()\n {\n $connect = Connect::getINSTANCE();\n $query = \"SELECT * FROM `list_inmuebles`\";\n $resultado = $connect->getConnection()->query($query);\n $inmuebles = array();\n if ($resultado->num_rows > 0) {\n // output data of each row\n while ($row = $resultado->fetch_assoc()) {\n $inmuebles[] = $row;\n }\n return $inmuebles;\n }\n return [];\n }",
"public function IngredientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM ingredientes LEFT JOIN proveedores ON ingredientes.codproveedor = proveedores.codproveedor WHERE ingredientes.codingrediente = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codingrediente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function index()\n {\n return $this->user->recipeLists()->get(['title', 'id']);\n }",
"private function getPetFoodDataArray()\n {\n $ingredients = ['Beef', 'Chicken', 'Fish', 'Rice', 'Oats', 'Water', 'Milk', 'Pork', 'Mouse', 'Rat', 'Bugs'];\n $counter = $this->foodCounter;\n if ($counter > (count($ingredients)-1)) {\n $counter = 0;\n $this->foodCounter = 0;\n } else {\n $this->foodCounter++;\n }\n return [\n 'ingredient' => $ingredients[$counter]\n ];\n }",
"public function getInvitations ()\n {\n return $this->invitations;\n }",
"public function getArtistsList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe artists list\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_artists.id,\n\t\t\t{$this->wpdb->prefix}topspin_artists.name,\n\t\t\t{$this->wpdb->prefix}topspin_artists.avatar_image,\n\t\t\t{$this->wpdb->prefix}topspin_artists.url,\n\t\t\t{$this->wpdb->prefix}topspin_artists.description,\n\t\t\t{$this->wpdb->prefix}topspin_artists.website\n\t\tFROM {$this->wpdb->prefix}topspin_artists\n\t\tORDER BY\n\t\t\t{$this->wpdb->prefix}topspin_artists.name ASC\nEOD;\n\t\treturn $this->wpdb->get_results($this->wpdb->prepare($sql),ARRAY_A);\n\t}",
"public function recipes()\n {\n return $this->belongsToMany(Recipe::class);\n }",
"public function getIngredient2dishes()\n {\n return $this->hasMany(Ingredient2dish::className(), ['ingredient_id' => 'id']);\n }",
"public function getInvestigatorsList() {\n return $this->_get(6);\n }",
"public function getInvestigatorsList() {\n return $this->_get(5);\n }",
"public function index($id = null) {\n if ($id == null) {\n \t$ingredient = DB::table('ingredients')\n ->join('recipes', 'ingredients.RID', '=', 'recipes.id')\n ->select('ingredients.*', 'recipes.Name as recipeName')\n ->get();\n return $ingredient;\n } else {\n return $this->show($id);\n }\n }",
"public function getItems()\r\n {\r\n return $this->user->wishlistItems;\r\n }",
"public function recipes()\n {\n return $this->hasMany('App\\Recipe');\n }",
"public function getList()\n {\n return array('entities' => $this->entities);\n }",
"public function get_inventory() {\n\n\t\t$inventory = array();\n\n\t\tforeach ( $this->resource->items as $item ) {\n\n\t\t\t$data = $item->resource;\n\n\t\t\t$inventory[ $data->sku ] = (array) $data;\n\t\t}\n\n\t\treturn $inventory;\n\t}",
"public function getIngredientsNum():int\n {\n return $this->ingredients_num;\n }",
"public function recipes(): \\Illuminate\\Database\\Eloquent\\Relations\\HasMany\n {\n return $this->hasMany('App\\Models\\Recipe', 'user_id');\n }",
"public function ingridients()\n {\n return $this->hasMany('App\\Ingridient');\n }",
"public function recipes() {\n return $this->hasMany('App\\Models\\Recipe');\n }",
"function attachIngredientsToMeal($meal, $lang){\n\n $ingredients_array = [];\n\n foreach($meal->ingredients as $ingredient){\n $temp_array = [];\n $translation = IngredientTranslations::all()\n ->where('ingredient_id',$ingredient->id)\n ->where('locale',$lang)\n ->first();\n \n $temp_array['id'] = $ingredient->id;\n $temp_array['title'] = $translation->title;\n $temp_array['slug'] = $ingredient->slug;\n $ingredients_array[] = $temp_array;\n }\n\n return $ingredients_array;\n\n\n }",
"public function index()\n {\n $ingredients = Ingredient::latest()->paginate(5);\n\n return view('ingredient.index', compact('ingredients'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }",
"public function getClientList()\n {\n $clients = $this->find('all')\n ->select(['id', 'salutation', 'name'])\n ->where(['role' => 'client'])\n ->order(['name' => 'ASC']);\n $retval = [];\n foreach ($clients as $client) {\n $retval[$client->id] = $client->full_name;\n }\n\n return $retval;\n }",
"public function getTags() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tAn array containing all of the spin tags\n\t\t$artist = $this->getArtist();\n\t\tif($artist) { return $artist->spin_tags; }\n\t}",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();"
] | [
"0.80285174",
"0.80125594",
"0.78574187",
"0.76654524",
"0.74776506",
"0.73250365",
"0.7182027",
"0.7180169",
"0.698155",
"0.68252313",
"0.6792017",
"0.67337394",
"0.66705185",
"0.66510975",
"0.6607595",
"0.66018",
"0.6584641",
"0.65265226",
"0.65189946",
"0.6496899",
"0.6438124",
"0.63883746",
"0.637026",
"0.63461787",
"0.63226014",
"0.63046426",
"0.630062",
"0.62906826",
"0.6288555",
"0.6277114",
"0.62376136",
"0.622561",
"0.6177518",
"0.6166539",
"0.6071212",
"0.6052974",
"0.60202783",
"0.6001146",
"0.59817976",
"0.59532756",
"0.59508526",
"0.59476286",
"0.59373635",
"0.5854822",
"0.5845641",
"0.5808524",
"0.5785482",
"0.5756071",
"0.57354957",
"0.5734282",
"0.57085925",
"0.56808186",
"0.5641467",
"0.56384355",
"0.5629747",
"0.56208354",
"0.5619785",
"0.5550295",
"0.5531594",
"0.54956675",
"0.5494021",
"0.5482933",
"0.5417776",
"0.53955585",
"0.5394909",
"0.5368237",
"0.53393966",
"0.53382206",
"0.5329591",
"0.5317785",
"0.53168684",
"0.5315612",
"0.531236",
"0.531074",
"0.5269249",
"0.5267041",
"0.5251894",
"0.52442306",
"0.5238835",
"0.5236992",
"0.5236641",
"0.52276284",
"0.52251625",
"0.5218233",
"0.5216491",
"0.5207329",
"0.52034605",
"0.5181516",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394",
"0.51809394"
] | 0.6059559 | 35 |
Returns the pizza name. | public function getName(): string
{
return $this->name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function name()\n {\n return 'pares';\n }",
"public function getName() {\n\t\treturn Language::_(\"Alipay.name\", true);\n\t}",
"public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }",
"public function getName() {\n\t\t\treturn \"<p class=\\\"name\\\">\".$this->name.\"</p>\";\n\t\t}",
"public function name(): string\n {\n return $this->pluck('trophyTitleName');\n }",
"public function getOppoName()\n {\n return $this->get(self::_OPPO_NAME);\n }",
"public function getName()\n {\n return 'ipsum';\n }",
"public function get_name()\n {\n // TODO: Implement get_name() method.\n }",
"public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }",
"public function getName() : string\n {\n return $this->get('name', 'products');\n }",
"public function getName()\n {\n return \"The Proving Grounds\";\n }",
"public function name()\n\t{\n\t\treturn $this->something;\n\t}",
"public function name(): string\n {\n return $this->name;\n }",
"public function name(): string\n {\n return $this->name;\n }",
"public function name(): string\n {\n return $this->name;\n }",
"public function name(): string\n {\n return $this->name;\n }",
"public function get_name();",
"public function get_name();",
"public function get_name();",
"function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}",
"public function get_name(): string\n {\n return $this->name;\n }",
"public static function get_name() : string ;",
"public static function get_name() : string ;",
"public function get_name()\r\n {\r\n \t$data = $this->get_exercise_data();\r\n \treturn $data['title'];\r\n }",
"public function fullname()\n\t{\n\t\treturn $this->product->name .' - '. $this->name();\n\t}",
"public function get_name()\n {\n return $this->name;\n }",
"public function get_name()\n {\n return $this->name;\n }",
"public function name()\n\t{\n\t\treturn nl2br(strtoupper($this->name));\n\t}",
"public function get_name() {\n return $this->name;\n }",
"public function get_name()\n {\n\n return $this->name;\n }",
"public function get_name() {\r\n return $this->name;\r\n }",
"function get_name() {\n return $this->name;\n }",
"public function show(Pizza $pizza)\n {\n return $pizza;\n }",
"public function get_name()\n {\n }",
"public function get_name()\n {\n }",
"public function get_name() \n {\n return $this->name;\n }",
"public function get_name() {\n\t\treturn esc_html__( $this->title, 'dashwp' );\n\t}",
"public function name() {\r\n $name = $this->first_name . ' ' . $this->last_name;\r\n return $name;\r\n }",
"public function name() {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function name()\n {\n return $this->name;\n }",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"final public function name(): string\n {\n return $this->name;\n }",
"public function get_name(){\n\t\treturn $this->name;\n\t}",
"public function get_name() {\r\n\t\treturn '';\r\n\t}",
"final public function name():string\n {\n return $this->name;\n }",
"public function get_name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name() {\n return $this->name;\n }",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function name(): string;",
"public function get_name() {\n\n\t\treturn $this->name;\n\t}",
"function get_name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name() { return $this->name; }",
"public function getName()\n {\n echo \"Name: \" . $this->name;\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName(): string\n {\n return Str::studly($this->name);\n }",
"abstract public function get_name();",
"abstract public function get_name();",
"abstract public function get_name();",
"public function name() {\n\t\treturn $this->name;\n\t}",
"function get_name () {\n return $this -> name;\n }",
"public function getname()\n {\n return $this->name;\n }",
"public function get_name() {\n return $this->_name;\n }",
"public function name()\n {\n return $this->getName();\n }",
"public function name()\n {\n return $this->getName();\n }",
"public function getNombre() {\n return $this->nombreProfesor;\n }",
"public function my_name() {\n return $this->name;\n }",
"public function name(): string\n {\n return 'Tinkoff';\n }",
"public function getName(): string\n {\n return $this->name;\n }",
"public function name()\n\t{\n\t\treturn $this->array['name'] ?? '';\n\t}",
"public function get_name(){\n return $this->name;\n }",
"public function getName()\n {\n return '';\n }",
"public function getName()\n {\n return '';\n }",
"public function getName(): string\n {\n return $this->title;\n }",
"public function getPizzaId() {\n return $this->pizza_id;\n }",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}"
] | [
"0.7068787",
"0.67725337",
"0.6728824",
"0.67263734",
"0.6719578",
"0.6693188",
"0.66798496",
"0.65574485",
"0.6557075",
"0.6548272",
"0.6529344",
"0.6524297",
"0.6522655",
"0.6522655",
"0.6522655",
"0.6522655",
"0.6518164",
"0.6518164",
"0.6518164",
"0.65102875",
"0.6507997",
"0.6478927",
"0.6478927",
"0.64692736",
"0.64611375",
"0.64562654",
"0.64562654",
"0.64482546",
"0.64324766",
"0.6431652",
"0.64277875",
"0.6424574",
"0.64159614",
"0.64100426",
"0.6408325",
"0.64035463",
"0.6401032",
"0.63966054",
"0.63908285",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.6384697",
"0.63829863",
"0.63829863",
"0.63829863",
"0.63829863",
"0.6381709",
"0.6355862",
"0.63556004",
"0.63498425",
"0.6349002",
"0.6340109",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6326289",
"0.6319787",
"0.6315402",
"0.6314556",
"0.63117343",
"0.6311625",
"0.6311625",
"0.6311625",
"0.6311625",
"0.62970185",
"0.6294036",
"0.6294036",
"0.6294036",
"0.6287",
"0.62837684",
"0.62833595",
"0.6274062",
"0.6272266",
"0.6272266",
"0.6272258",
"0.62711495",
"0.6264432",
"0.626127",
"0.6243139",
"0.62425363",
"0.62419295",
"0.62419295",
"0.6241835",
"0.6240319",
"0.62369",
"0.62369",
"0.62369"
] | 0.0 | -1 |
Sets the pizza dough. | public function setDough(Dough $dough): void
{
$this->dough = $dough;
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(Paesi $paese)\n {\n $this->paese = $paese;\n }",
"public function setPizzaId($id){\n $intVal = filter_var($id, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);\n if(isset($intVal)){\n $this->pizza_id = $intVal;\n return true;\n } \n return false; \n }",
"public function testSetPension() {\n\n $obj = new Employes();\n\n $obj->setPension(true);\n $this->assertEquals(true, $obj->getPension());\n }",
"public function edit(Pizza $pizza)\n {\n //\n }",
"public function edit(Pizza $pizza)\n {\n //\n }",
"public function customizePizza() {\n\t\t$id = $this->uri->segment(3);\n\n\t\t//Get required details by pizza id and toppings list and pass to the view\n\t\t$this->load->model('MenuModel');\n\n\t\t$details = $this->MenuModel->getPizzaById($id);\n\n\t\t$details = array('details' => $details, 'toppingsList' => $this ->MenuModel->getAllToppings());\n\n\t\t$this->load->view('customizePizza', $details);\n\t}",
"public function getPizzaId() {\n return $this->pizza_id;\n }",
"private function setDepositFromData()\n {\n if ($this->dataHasDeposit()) {\n $this->collection->items[$this->cart_hash]->deposit = $this->data['deposit'];\n $this->collection->deposit += $this->data['deposit'];\n }\n }",
"protected function setVida() {\n $this->vida = 200;\n }",
"public function setFood($food)\n {\n $this->food = $food;\n\n return $this;\n }",
"function setPrice($new_price)\n {\n $this->price = $new_price;\n }",
"public function setDishId($_dishId)\n {\n $_dishId = (int) $_dishId;\n $this->_dishId = $_dishId;\n }",
"function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}",
"public function setPreferred(PurchasingData $pd)\n {\n $qb = $this->_em->createQueryBuilder();\n $qb->update(PurchasingData::class, 'pd')\n ->set('pd.preferred', 'if(pd.id = :id, 1, 0)')\n ->setParameter('id', $pd->getId())\n ->where('pd.stockItem = :item')\n ->setParameter('item', $pd->getSku());\n $query = $qb->getQuery();\n $query->execute();\n $this->_em->clear(PurchasingData::class);\n }",
"public function set_pais(Pais $object)\n {\n $this->pais = $object;\n $this->pais_id = $object->id;\n }",
"function setGutter($gutter) {\t \r\n\t $this->gutter = $gutter;\r\n\t}",
"public function setPaid()\n {\n $this->update([\n 'status' => self::STATUS_PAID,\n 'paid_date' => Carbon::now(),\n ]);\n }",
"public function setPesoArea($peso) {\n $this->_peso = $peso; \n }",
"public function testSetDroitCp() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setDroitCp(10.092018);\n $this->assertEquals(10.092018, $obj->getDroitCp());\n }",
"public function setedadPaciente($value){\n\n\t\t$this->_edadPaciente = $value;\n\t}",
"public function set_pedido(Pedido $p){\n $this->pedido=$p;\n }",
"public function setFood($x, $y)\n {\n $this->setMapContent($x + 1, $y + 1, 'food');\n }",
"public function setCodope($codope){\n\t\t$this->codope = $codope;\n\t}",
"public function testSetPrice()\n {\n $item = $this->addItem();\n $item->price = 3;\n\n $this->assertEquals(3, $item->price);\n\n $item->price = 3.52313123;\n $this->assertEquals(3.52313123, $item->price);\n\n $item->price = -123123.000;\n $this->assertEquals(-123123.000, $item->price);\n\n try {\n $item->price = 'a';\n $this->setExpectedException(\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice::class);\n } catch (\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice $e) {\n $this->assertEquals('The price must be a valid number', $e->getMessage());\n }\n }",
"function setPrice($price)\n {\n $this->price = $price;\n }",
"public function setPheanstalk(PheanstalkInterface $pheanstalk)\n {\n $this->pheanstalk = $pheanstalk;\n }",
"public function setSauce(Sauce $sauce): void\n {\n $this->sauce = $sauce;\n\n return;\n }",
"public function setIdpension($idpension){\n $this->idpension = $idpension;\n }",
"public function setGoal()\n {\n }",
"function setItem_price($price){\n $this->item_price = $price;\n }",
"public function drinkSetting(IAssortment $assortment): void;",
"function toPay()\r\n {\r\n try {\r\n $this->mKart->setPaidKart();\r\n }catch(Exception $e){\r\n $this->error->throwException('310', 'No s`ha pogut realitzar el pagament.', $e);\r\n }\r\n }",
"public function setPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we){\n\t\t\n\t\tif ($this->isPricing($id_ressource, $id_pricing)){\n\t\t\t$this->editPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we);\n\t\t}\n\t\telse{\n\t\t\t$this->addPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we);\n\t\t}\n\t}",
"public function setFixed() {\n }",
"public function setDispute(?Dispute $dispute): void\n {\n $this->dispute = $dispute;\n }",
"public function setVoiture($voiture){\n $this->$voiture = $voiture;\n }",
"public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }",
"public function testGetSetSides()\n {\n $dice = new Dice(6);\n $dice->set_sides(5);\n \n $this->assertEquals($dice->get_sides(), 5);\n }",
"function setEpoca($iepoca = '')\n {\n $this->iepoca = $iepoca;\n }",
"public function setCep( $cep )\n\t{\t\n\t\t/**\n\t\t * Armazena Cep do cliente\n\t\t * @name $cep\n\t\t */\n\t\t$this->cep = $cep;\n\t}",
"public static function set_costo_promedio($id_bodega,$id_producto,$costo_prom)\n {\n $item = InvProducto::find( $id_producto );\n $item->set_costo_promedio( $id_bodega, $costo_prom );\n }",
"function set_discount($discount_id = FALSE)\n\t\t{\n\t\t\t$this->load->model('demo_cart_model');\n\t\t\t\n\t\t\t$this->demo_cart_model->demo_set_discount($discount_id);\n\t\t\t\n\t\t\tredirect('cart');\n\t\t}",
"public function throwDice()\n {\n $this->value = rand(1, 6);\n }",
"public function setDiamonds($value)\n {\n return $this->set(self::_DIAMONDS, $value);\n }",
"public function setDiamond($value)\n {\n return $this->set(self::_DIAMOND, $value);\n }",
"public function setDiamond($value)\n {\n return $this->set(self::_DIAMOND, $value);\n }",
"public function setDiamond($value)\n {\n return $this->set(self::_DIAMOND, $value);\n }",
"public function setDiamond($value)\n {\n return $this->set(self::_DIAMOND, $value);\n }",
"public static function setPdo($pdo)\n {\n }",
"public function paid()\n {\n $this->paidAmount = $this->price;\n }",
"public function setDate($date){\r\n\t\t$this->wishDate = $date;\r\n\t}",
"public function setDealPrice($value)\n {\n return $this->set(self::deal_price, $value);\n }",
"public function setPalletized($palletized) {\n $this->_palletized = $palletized;\n }",
"public function setGold($gold) {\n\t\t$this->gold = $gold;\n\t}",
"public function ancho($ancho){\r\n\t\tif ($ancho>0) {\r\n\t\t\t$this->ancho=$ancho;\r\n\t\t}\r\n\t}",
"public function show(Pizza $pizza)\n {\n return $pizza;\n }",
"public function deliveryPriceDhaka()\n {\n }",
"public function setShippingPrice() {\n if ($this->price > 200) {\n $this->shippingPrice = 0;\n }\n }",
"public function setPaid()\n {\n return $this->setMarkedAs($this->getPaidValue());\n }",
"public function setCfg(Down_ExcavateCfg $value)\n {\n return $this->set(self::_CFG, $value);\n }",
"protected function setZpTprop($clave) {\n $this->zpTprop = $clave;\n }",
"function setBalanceOwing($owed) \n {\n $this->setValueByFieldName('balance_owing',$owed);\n }",
"function setPrice($price, $taxPercentage = 25)\n {\n $this->taxPercentage = $taxPercentage;\n $this->taxA = $price / 100 * 100;\n $this->price = $price;\n }",
"public function testSetGetPrice()\n {\n $this->item->setPrice(85.00);\n $this->assertEquals($this->item->getPrice(), 85.00);\n }",
"public function setDormant(bool $value = true): void\n {\n $this->dormant = $value;\n }",
"function setProperty($name, $value) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_module_options.php');\n base_module_options::writeOption($this->moduleGuid, $name, $value);\n }",
"protected function plow(Seter $seter){\n\t\t$seter->CltvoPlow($this->command);\n\t\t$this->command->line( '<info>'.$seter->CltvoGetLabel().':</info>'.\" set successfully.\" );\n }",
"public function resetDpNpc()\n {\n if (is_null($this->mrGoldenKeyObj)\n || !$this->isPresent($this->mrGoldenKeyObj)) {\n // Creates a golden key based on the standard DpObject, moves it\n // here:\n $this->mrGoldenKeyObj = get_current_dpuniverse()->newDpObject(\n DPUNIVERSE_STD_PATH . 'DpObject.php');\n $this->mrGoldenKeyObj->addId(dp_text('key'));\n $this->mrGoldenKeyObj->title = dp_text('golden key');\n $this->mrGoldenKeyObj->titleDefinite = dp_text('the golden key');\n $this->mrGoldenKeyObj->titleIndefinite = dp_text('a golden key');\n $this->mrGoldenKeyObj->titleImg = DPUNIVERSE_IMAGE_URL\n . 'golden_key.png';\n $this->mrGoldenKeyObj->titleImgWidth = 44;\n $this->mrGoldenKeyObj->titleImgHeight = 46;\n $this->mrGoldenKeyObj->body = '<img src=\"' . DPUNIVERSE_IMAGE_URL\n . 'golden_key.png\" width=\"44\" height=\"46\" border=\"0\" '\n . 'alt=\"\" align=\"left\" style=\"margin-right: 15px\" />'\n . dp_text('A golden key.<br />You wonder what it can unlock...');\n $this->mrGoldenKeyObj->value = 180;\n $this->mrGoldenKeyObj->coinherit(DPUNIVERSE_STD_PATH . 'mass.php');\n $this->mrGoldenKeyObj->weight = 1;\n $this->mrGoldenKeyObj->volume = 1;\n $this->mrGoldenKeyObj->isNoStore = new_dp_property(TRUE);\n $this->mrGoldenKeyObj->moveDpObject($this);\n }\n }",
"public function pizzas(){\n return $this->hasMany(Pizza::class);\n }",
"public function setDps($value)\n {\n return $this->set(self::_DPS, $value);\n }",
"public function setDps($value)\n {\n return $this->set(self::_DPS, $value);\n }",
"public function setDps($value)\n {\n return $this->set(self::_DPS, $value);\n }",
"function setPrice( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Price = $value;\n setType( $this->Price, \"double\" );\n }",
"public function setCashOnDelivery($value): void\n {\n $this->cash_on_delivery = $value;\n }",
"public function setPais(string $pais)\n {\n $this->pais = $pais;\n }",
"public function setFresh($fresh)\n {\n $this->fresh = intval($fresh);\n }",
"public function setCep($cep): Pessoa\n {\n $this->cep = $cep;\n return $this;\n }",
"public function setHire(Down_HireData $value)\n {\n return $this->set(self::_HIRE, $value);\n }",
"public function updatePizza(){\n\t\t$pizza = new PizzaModel();\n\t\t$pizza->update($_POST['id'], $_POST);\n\t\treturn redirect()->to('/pizza');\n\t}",
"public function orderPizza($type)\n {\n $pizza = $this->factory->createPizza($type);\n\n return $pizza->making();\n }",
"public function setTopping(Topping $topping): void\n {\n $this->topping = $topping;\n\n return;\n }",
"public function setMink(Mink $mink)\n {\n $this->mink = $mink;\n }",
"public function calculatePrices(): void\n {\n $orders = ServiceContainer::orders();\n $pizzaPrice = $orders->calculatePizzaPrice($this->items);\n $deliveryPrice = $orders->calculateDeliveryPrice($pizzaPrice, $this->outside, $this->currency);\n $this->delivery_price = $deliveryPrice;\n $this->total_price = $pizzaPrice + $deliveryPrice;\n }",
"public function setProducto($pro){ $this->producto = $pro;}",
"public function setPdo(\\PDO $pdo) {\n\t\t$this->pdo = $pdo;\n\t}",
"public function setIdCook($id_cook)\n {\n $this->id_cook = $id_cook;\n\n return $this;\n }",
"function setRestarPais(){\n\t\t$this->cantidad_paises--;\n\t}",
"public function run()\n {\n $meal = new Meal;\n $meal->type_id = 3;\n $meal->save();\n\n $meal->recipes()->attach(1, ['sidedish' => 1]);\n }",
"public function created(Food $food)\n {\n $food->calories = ($food->carbohydrate * 4) + ($food->protein * 4) + ($food->fat * 9);\n $food->save();\n }",
"protected function setMoneyBar()\n {\n $mysidia = Registry::get(\"mysidia\");\n $this->moneyBar = new Paragraph;\n $this->moneyBar->add(new Comment(\"You have {$mysidia->user->money} {$mysidia->settings->cost}.\"));\n \n $donate = new Link(\"donate\");\n $donate->setText(\"Donate Money to Friends\");\n $this->moneyBar->add($donate);\n $this->setDivision($this->moneyBar);\n }",
"public function setDeposit($deposit)\n {\n $this->deposit = $deposit;\n }",
"public function testSetPourcentEffectifDucs() {\n\n $obj = new Employes();\n\n $obj->setPourcentEffectifDucs(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentEffectifDucs());\n }",
"public function setUp()\n {\n $this->salt = new Ingredient('salt');\n $this->tomato = new Ingredient('tomato');\n $this->kg = new Unit('kilogram', 'kg');\n $this->l = new Unit('liter', 'l');\n $this->recipe = new Recipe('tomato sauce', [\n new Quantity(0.5, $this->kg, $this->tomato),\n new Quantity(0.2, $this->kg, $this->salt),\n ], true, $this->l, 0.8);\n }",
"public function testSetEffectifDas() {\n\n $obj = new Employes();\n\n $obj->setEffectifDas(true);\n $this->assertEquals(true, $obj->getEffectifDas());\n }",
"public function update(Request $request, Pizza $pizza)\n {\n //\n }",
"public function setShoeID($value) {\n\t\t$this->_shoe_id = $value;\n\t}",
"public function setDropGive(Down_GuildDropGive $value)\n {\n return $this->set(self::_DROP_GIVE, $value);\n }",
"protected function setUp(){\n $this->poneys = new Poneys;\n $this->poneys->setCount(8);\n }",
"public function __construct($dosen)\n {\n $this->dosen = $dosen;\n }",
"public function setUp()\n {\n $this->amount = 500;\n $this->currency = 'RUB';\n $this->sector = 222;\n $this->password = 'qwprc1';\n $this->id = 400;\n\n parent::setUp();\n }"
] | [
"0.5482008",
"0.5440977",
"0.53999126",
"0.52591",
"0.52591",
"0.5135431",
"0.5074818",
"0.5048097",
"0.5012528",
"0.50069964",
"0.5006073",
"0.49991414",
"0.49497598",
"0.4941194",
"0.4931902",
"0.49110115",
"0.4902301",
"0.48957062",
"0.48688293",
"0.48685005",
"0.48663428",
"0.48648706",
"0.48483115",
"0.484824",
"0.48323876",
"0.48064494",
"0.4801736",
"0.4792884",
"0.4768662",
"0.47657895",
"0.4758717",
"0.47544914",
"0.47430268",
"0.47314635",
"0.47300857",
"0.47292057",
"0.47270212",
"0.47170228",
"0.47017485",
"0.46916875",
"0.46886587",
"0.4688192",
"0.46849877",
"0.4681549",
"0.46590167",
"0.46590167",
"0.46590167",
"0.46590167",
"0.46582955",
"0.46385053",
"0.46381584",
"0.46241686",
"0.46019644",
"0.46013504",
"0.46001327",
"0.4593953",
"0.45922163",
"0.45867807",
"0.45832708",
"0.45638335",
"0.45580974",
"0.45563293",
"0.4554723",
"0.45500308",
"0.4549989",
"0.45439255",
"0.45411626",
"0.4536428",
"0.4531683",
"0.45314097",
"0.45302197",
"0.45302197",
"0.45268396",
"0.45260608",
"0.45193362",
"0.45181903",
"0.45144287",
"0.45038033",
"0.4501807",
"0.4498563",
"0.44967324",
"0.44900572",
"0.44873175",
"0.44821104",
"0.4479103",
"0.44737217",
"0.44729605",
"0.44650498",
"0.44626936",
"0.44551632",
"0.44519225",
"0.44499257",
"0.44487903",
"0.44343483",
"0.44311982",
"0.4429144",
"0.44287094",
"0.44276974",
"0.44254458",
"0.44199055"
] | 0.57144964 | 0 |
Sets the pizza sauce. | public function setSauce(Sauce $sauce): void
{
$this->sauce = $sauce;
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(Paesi $paese)\n {\n $this->paese = $paese;\n }",
"public function customizePizza() {\n\t\t$id = $this->uri->segment(3);\n\n\t\t//Get required details by pizza id and toppings list and pass to the view\n\t\t$this->load->model('MenuModel');\n\n\t\t$details = $this->MenuModel->getPizzaById($id);\n\n\t\t$details = array('details' => $details, 'toppingsList' => $this ->MenuModel->getAllToppings());\n\n\t\t$this->load->view('customizePizza', $details);\n\t}",
"public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }",
"function setCausaleEvasione($codice)\n {\n $this->cauEvasione = $codice; \n }",
"protected function setSessionSauce($user, $key) {\r\n\t\t$this->sauceKey = $key;\r\n\t\t$this->sauceUser = $user;\r\n\t}",
"public function setPaisAttribute($value)\n\t{\n\t\t$this->attributes['pais'] = mb_strtoupper($value);\n\t}",
"protected function setUp(): void\n {\n parent::setUp();\n config([\"services.{$this->provider}.client_id\" => $this->faker->uuid]);\n config([\"services.{$this->provider}.client_secret\" => $this->faker->uuid]);\n }",
"public function edit(Pizza $pizza)\n {\n //\n }",
"public function edit(Pizza $pizza)\n {\n //\n }",
"function setEpoca($iepoca = '')\n {\n $this->iepoca = $iepoca;\n }",
"public function setOffer(?string $value): void {\n $this->getBackingStore()->set('offer', $value);\n }",
"function setPrice($price)\n {\n $this->price = $price;\n }",
"public function setPesoArea($peso) {\n $this->_peso = $peso; \n }",
"public function setUp()\n {\n $this->fixture = new SetShippingMethod();\n }",
"public function setUp()\n {\n $this->amount = 500;\n $this->currency = 'RUB';\n $this->sector = 222;\n $this->password = 'qwprc1';\n $this->id = 400;\n\n parent::setUp();\n }",
"public function setCep( $cep )\n\t{\t\n\t\t/**\n\t\t * Armazena Cep do cliente\n\t\t * @name $cep\n\t\t */\n\t\t$this->cep = $cep;\n\t}",
"function setItem_price($price){\n $this->item_price = $price;\n }",
"public function setPais(string $pais)\n {\n $this->pais = $pais;\n }",
"public function setUp()\n {\n $this->salt = new Ingredient('salt');\n $this->tomato = new Ingredient('tomato');\n $this->kg = new Unit('kilogram', 'kg');\n $this->l = new Unit('liter', 'l');\n $this->recipe = new Recipe('tomato sauce', [\n new Quantity(0.5, $this->kg, $this->tomato),\n new Quantity(0.2, $this->kg, $this->salt),\n ], true, $this->l, 0.8);\n }",
"function setPrice($new_price)\n {\n $this->price = $new_price;\n }",
"public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value*100;\n }",
"public function setMerchantPurse($value)\n {\n return $this->setParameter('merchantPurse', $value);\n }",
"public function setUp()\n {\n $this->amount = mt_rand(1, 100);\n $this->returnUrl = 'https://test.com/' . uniqid('', true);\n $this->orderNumber = uniqid('order_number_', true);\n $this->currency = 'RUB';\n\n parent::setUp();\n }",
"public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value * 100;\n }",
"public function setShelf($shelf){\n $this->shelf = $shelf;\n }",
"public function setCodope($codope){\n\t\t$this->codope = $codope;\n\t}",
"public function setPizzaId($id){\n $intVal = filter_var($id, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);\n if(isset($intVal)){\n $this->pizza_id = $intVal;\n return true;\n } \n return false; \n }",
"public function setVoiture($voiture){\n $this->$voiture = $voiture;\n }",
"protected function setCae($value)\n\t{\n\t\t$this->setTextFont(10);\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->drawText($value, 466, 67, 'UTF-8');\n\t\t}\n\t\t$this->barcode->addCAE($value);\n\t}",
"public function testSetValue()\n {\n $this->todo('stub');\n }",
"public function setRecommendedSku(?string $value): void {\n $this->getBackingStore()->set('recommendedSku', $value);\n }",
"public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }",
"function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}",
"private function setOptions()\n {\n $this->clientId = $this->config['stravaSettings']['clientId'];\n $this->clientSecret = $this->config['stravaSettings']['clientSecret'];\n $this->redirectUri = $this->config['stravaSettings']['redirectUri'];\n $this->aprovalPrompt = $this->config['stravaSettings']['approval_prompt'];\n $this->scopes = $this->config['stravaSettings']['scopes'];\n }",
"public function testSetPrice()\n {\n $item = $this->addItem();\n $item->price = 3;\n\n $this->assertEquals(3, $item->price);\n\n $item->price = 3.52313123;\n $this->assertEquals(3.52313123, $item->price);\n\n $item->price = -123123.000;\n $this->assertEquals(-123123.000, $item->price);\n\n try {\n $item->price = 'a';\n $this->setExpectedException(\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice::class);\n } catch (\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice $e) {\n $this->assertEquals('The price must be a valid number', $e->getMessage());\n }\n }",
"public function __construct($flavor=null)\n { try{\n if(!$flavor)\n throw new \\Exception('Please select an available ice Cream flavor for this spoon');\n $this->setFlavor($flavor);\n }catch (\\Exception $e){\n echo \"\\n\\n*****Error****\\n\".$e->getMessage().\"\\n*********\\n\\n\";\n }\n }",
"protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }",
"public function setCashOnDelivery($value): void\n {\n $this->cash_on_delivery = $value;\n }",
"public function setShoeID($value) {\n\t\t$this->_shoe_id = $value;\n\t}",
"public function setCep($cep): Pessoa\n {\n $this->cep = $cep;\n return $this;\n }",
"public function setPriceAttribute($value)\n {\n $this->attributes['price'] = Utils::numbersOnly($value);\n }",
"public function setUp()\r\n {\r\n $this->extra = new \\tabs\\api\\pricing\\Extra(\r\n 'BKFE',\r\n 'Booking Fee',\r\n 20,\r\n 1,\r\n 'compulsory'\r\n );\r\n }",
"private function setSoldIndividually() {\n $this->product->set_sold_individually($this->wcData->isSoldIndividually());\n }",
"public function __construct()\n {\n $this->name = \"A Style com pepperoni\";\n $this->toppings[] = \"Queijo\";\n $this->toppings[] = \"Pepperoni\";\n $this->toppings[] = \"Cebola\";\n $this->toppings[] = \"Oregano\";\n }",
"public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}",
"public function testSetHandicape() {\n\n $obj = new Employes();\n\n $obj->setHandicape(true);\n $this->assertEquals(true, $obj->getHandicape());\n }",
"public function show(Pizza $pizza)\n {\n return $pizza;\n }",
"function setPrice($price, $taxPercentage = 25)\n {\n $this->taxPercentage = $taxPercentage;\n $this->taxA = $price / 100 * 100;\n $this->price = $price;\n }",
"public static function setDefaultPurse($user, $purse);",
"public function getSku()\n {\n return 'Tomato';\n }",
"function it_gets_and_sets_the_color_option()\n {\n $this->getColor()->shouldReturn('yellow');\n\n // Set the color key\n $this->setColor('random');\n\n // Get the current color setting\n $this->getColor()->shouldReturn('random');\n }",
"public function setCarteAppel(?string $carteAppel): CartesAppelEtebac {\n $this->carteAppel = $carteAppel;\n return $this;\n }",
"protected function setUp()\n {\n $this->slipData = new OrangePaymentSlipData();\n }",
"public function getPizzaId() {\n return $this->pizza_id;\n }",
"public function testSetCodePaysNaissance() {\n\n $obj = new Employes();\n\n $obj->setCodePaysNaissance(\"codePaysNaissance\");\n $this->assertEquals(\"codePaysNaissance\", $obj->getCodePaysNaissance());\n }",
"public function setCart()\n {\n $this->cart = $this->session->get('cart');\n }",
"public function setUp(): void\n {\n parent::setUp();\n\n $this->credentials = [\n 'email' => '[email protected]',\n 'password' => 'admin1234',\n ];\n }",
"function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }",
"public function set_pais(Pais $object)\n {\n $this->pais = $object;\n $this->pais_id = $object->id;\n }",
"public function setUp()\n {\n // Create a new Laravel container instance.\n $container = new Container;\n\n // Resolve the pricing calculator (and any type hinted dependencies)\n // and set to class attribute.\n $this->priceHolder = $container->make('PAMH\\\\PriceHolder');\n }",
"public function setPriceAttribute($value) {\n\t\t$this->attributes['price'] = round(floatval($value), 2);\n\t}",
"public function setAddresstoCookie($places)\n {\n Mage::getModel('core/cookie')->set('places', serialize($places));\n }",
"public function setCliApellidoAttribute($value)\n {\n $this->attributes['cli_apellido'] = strtoupper($value);\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->value = random_int(1, 100000);\n\n $randomValue = md5((string)$this->value);\n\n $this->value1 = $randomValue . '_1';\n $this->value2 = $randomValue . '_2';\n $this->value3 = $randomValue . '_3';\n }",
"public function setCartAttribute($value)\n {\n $value['instance'] = 'order';\n $this->attributes['cart'] = serialize($value);\n }",
"public function testSetPension() {\n\n $obj = new Employes();\n\n $obj->setPension(true);\n $this->assertEquals(true, $obj->getPension());\n }",
"public function setPrice($value)\n {\n return $this->set(self::_PRICE, $value);\n }",
"public function __construct($coffee) //Default constructor\n\t\t{\n\t\t\t$this->coffee = $coffee;//Save pointer\n\t\t}",
"public function testSetDestinatairesCc() {\n\n $obj = new AppelsEnCours();\n\n $obj->setDestinatairesCc(\"destinatairesCc\");\n $this->assertEquals(\"destinatairesCc\", $obj->getDestinatairesCc());\n }",
"protected function setZpTprop($clave) {\n $this->zpTprop = $clave;\n }",
"public function setUp()\n {\n // $this->app->instance('Portfolio', $this->mock);\n }",
"public function update(Request $request, Pizza $pizza)\n {\n //\n }",
"protected static function _set_cookie()\n\t{\n\t\t/** @var Cookie::$salt string */\n\t\tCookie::$salt = Config::get('cookie.salt');\n\n\t\t/** @var Cookie::$expiration string */\n\t\tCookie::$expiration = Config::get('cookie.lifetime');\n\t}",
"public function setCoverAttribute($value) {\n\n\t\tif (!$this->preventAttrSet) {\n\t\t\t$field_name = 'profile.cover';\n\t\t\t$attribute_name = 'cover';\n\t\t\t$disk = config('filesystems.default');\n\n\t\t\t// Set the right field name\n\t\t\t$request = \\Request::instance();\n\t\t\tif (!$request->hasFile($field_name)) {\n\t\t\t\t$field_name = $attribute_name;\n\t\t\t}\n\n\t\t\t// if (!isset($this->country_code) || !isset($this->user_id)) {\n\t\t\t// $this->attributes[$attribute_name] = null;\n\t\t\t// return false;\n\t\t\t// }\n\n\t\t\t// Path\n\t\t\t$destination_path = 'profile/cover/'. $this->user_id;\n\n\t\t\t// Upload\n\t\t\t$this->uploadFileToDiskCustom($value, $field_name, $attribute_name, $disk, $destination_path);\n\t\t} else {\n\t\t\t$this->attributes['cover'] = $value;\n\t\t}\n\t}",
"public function testSetCodeProduit() {\n\n $obj = new AppelsEnCours();\n\n $obj->setCodeProduit(\"codeProduit\");\n $this->assertEquals(\"codeProduit\", $obj->getCodeProduit());\n }",
"public static function setUpBeforeClass(): void\n {\n parent::setUpBeforeClass();\n self::$secuconnectObjects = SecuconnectObjects::getInstance();\n self::$customerId = self::$secuconnectObjects->getCustomer()->getId();\n self::$amount = 6324;\n self::$currency = 'EUR';\n self::$orderId = 'ZZZZZZ';\n self::$accrual = true;\n self::$basket = self::$secuconnectObjects->getBasket();\n }",
"public function setAparece($value)\n\t{\n\t\t$this->aparece = $value;\n\t}",
"public function setCodice($codice) \n\t{\n $this->codice = $codice;\n }",
"function setSecure($secure)\n {\n $this->secure = $secure;\n }",
"public function setDealPrice($value)\n {\n return $this->set(self::deal_price, $value);\n }",
"public function setUp()\n {\n putenv(\"{$this->name}={$this->value}\");\n \n return;\n }",
"private function setPremiumCode(){\n for($i = 0; $i < 7; $i++) {\n $this->premiumCode .= rand(1,9);\n };\n $this->discount = 10;\n }",
"public function setUp()\n {\n $this->VenusFuelDepot = new VenusFuelDepot();\n }",
"public function setProvincia($provincia) {\n\t\t$this->provincia = $provincia;\n\t}",
"public function SetTestService($value)\n {\n $this->_TestService = $value;\n }",
"protected function setOfferNature ()\n {\n $this->offerNature = $this->offer->rate_nature->value;\n }",
"function setBeneficiario1($beneficiario1) {\r\n $this->beneficiario1 = $beneficiario1;\r\n }",
"public function run()\n {\n //Factory for the address\n CustomizePizza::create([\n 'order_item_id' => 1,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 2,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 3,\n 'item_price_id' => 63,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 4,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 5,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 6,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 7,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 8,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 9,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 10,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 11,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 12,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 13,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 14,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 15,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 16,\n 'item_price_id' => 63,\n 'quantity' => '3',\n ]);\n }",
"function setCakePath($cakePath) {\n $this->cakePath = $cakePath;\n }",
"public function setProducto($pro){ $this->producto = $pro;}",
"public function setPrice($price)\n {\n $this->price = $price;\n }",
"public function setUp(): void\n {\n // https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_environment.html\n putenv('AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE');\n putenv('AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY');\n }",
"private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}",
"public function testSetCodeClient() {\n\n $obj = new AppelsEnCours();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }",
"public function setSalaire($salaire)\n {\n $this->salaire = $salaire;\n }",
"public function setUp()\n {\n parent::setUp();\n $this->dryIce = new DryIce();\n }",
"public function setCoin(string $cryptoCoin);",
"public function setSandbox($value);",
"public function setSandbox($value);",
"public function setCover($value)\n {\n if (!array_key_exists('cover', $this->fieldsModified)) {\n $this->fieldsModified['cover'] = $this->data['fields']['cover'];\n } elseif ($value === $this->fieldsModified['cover']) {\n unset($this->fieldsModified['cover']);\n }\n\n $this->data['fields']['cover'] = $value;\n }"
] | [
"0.56502026",
"0.534343",
"0.5098083",
"0.5043481",
"0.5039214",
"0.5027306",
"0.49757734",
"0.49749497",
"0.49749497",
"0.49745837",
"0.4971266",
"0.49577004",
"0.49357644",
"0.49249613",
"0.49195704",
"0.49164546",
"0.48995477",
"0.48906335",
"0.48616737",
"0.48277554",
"0.48107746",
"0.48034358",
"0.48025015",
"0.4791514",
"0.47895554",
"0.47894308",
"0.47638214",
"0.47623384",
"0.4748689",
"0.4747489",
"0.47296768",
"0.47294047",
"0.47290444",
"0.4722798",
"0.47071576",
"0.46946087",
"0.4681523",
"0.4666384",
"0.4662931",
"0.46482956",
"0.46449143",
"0.46446165",
"0.46363455",
"0.4627486",
"0.46170247",
"0.46140862",
"0.46110746",
"0.46001542",
"0.45969847",
"0.45968434",
"0.45918304",
"0.45876396",
"0.45865706",
"0.458293",
"0.45710823",
"0.4563521",
"0.45627746",
"0.45592177",
"0.45575792",
"0.4555827",
"0.45200205",
"0.45190746",
"0.45183998",
"0.4514582",
"0.44989416",
"0.44926298",
"0.44904065",
"0.44785905",
"0.44761205",
"0.4466433",
"0.44651866",
"0.44650012",
"0.44563732",
"0.44515824",
"0.44442967",
"0.44442448",
"0.4427881",
"0.44276997",
"0.44259712",
"0.44201237",
"0.44154483",
"0.44071633",
"0.43974438",
"0.43894872",
"0.43884102",
"0.43780273",
"0.43779767",
"0.43757877",
"0.43749326",
"0.4374211",
"0.43620262",
"0.43611386",
"0.4357074",
"0.4355747",
"0.435519",
"0.43551028",
"0.43546724",
"0.43504298",
"0.43504298",
"0.43440077"
] | 0.6467909 | 0 |
Sets the pizza topping. | public function setTopping(Topping $topping): void
{
$this->topping = $topping;
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function customizePizza() {\n\t\t$id = $this->uri->segment(3);\n\n\t\t//Get required details by pizza id and toppings list and pass to the view\n\t\t$this->load->model('MenuModel');\n\n\t\t$details = $this->MenuModel->getPizzaById($id);\n\n\t\t$details = array('details' => $details, 'toppingsList' => $this ->MenuModel->getAllToppings());\n\n\t\t$this->load->view('customizePizza', $details);\n\t}",
"public function getPizzaId() {\n return $this->pizza_id;\n }",
"public function setPizzaId($id){\n $intVal = filter_var($id, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);\n if(isset($intVal)){\n $this->pizza_id = $intVal;\n return true;\n } \n return false; \n }",
"protected function setZpTprop($clave) {\n $this->zpTprop = $clave;\n }",
"public function orderPizza($type)\n {\n $pizza = $this->factory->createPizza($type);\n\n return $pizza->making();\n }",
"public function __construct(Paesi $paese)\n {\n $this->paese = $paese;\n }",
"public function edit(Pizza $pizza)\n {\n //\n }",
"public function edit(Pizza $pizza)\n {\n //\n }",
"public function testSetPension() {\n\n $obj = new Employes();\n\n $obj->setPension(true);\n $this->assertEquals(true, $obj->getPension());\n }",
"public function setUp()\n {\n $this->fixture = new SetShippingMethod();\n }",
"public function setPesoArea($peso) {\n $this->_peso = $peso; \n }",
"public function __construct()\n {\n $this->name = \"A Style com pepperoni\";\n $this->toppings[] = \"Queijo\";\n $this->toppings[] = \"Pepperoni\";\n $this->toppings[] = \"Cebola\";\n $this->toppings[] = \"Oregano\";\n }",
"public function setShippingPrice() {\n if ($this->price > 200) {\n $this->shippingPrice = 0;\n }\n }",
"public function __construct($puerto) {\n\t\t$this->puerto = $puerto;\t\n\t}",
"public function set_pais(Pais $object)\n {\n $this->pais = $object;\n $this->pais_id = $object->id;\n }",
"public function testSetTransfertPaie() {\n\n $obj = new PointBonTrav();\n\n $obj->setTransfertPaie(\"transfertPaie\");\n $this->assertEquals(\"transfertPaie\", $obj->getTransfertPaie());\n }",
"protected function setTo() {}",
"public function pizzas(){\n return $this->hasMany(Pizza::class);\n }",
"private function setShippingOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set dimensions and weight\n $this->product->set_weight('');\n $this->product->set_length('');\n $this->product->set_width('');\n $this->product->set_height('');\n\n // Set shipping class\n $this->product->set_shipping_class_id(0);\n }\n\n // No shipping for virtual products.\n if ($this->wcData->isVirtual()) {\n $this->product->set_virtual(true);\n return;\n }\n\n // Not a virtual product.\n $this->product->set_virtual(false);\n\n // Set dimensions and weight\n $this->product->set_weight($this->wcData->getWeight());\n $this->product->set_length($this->wcData->getLength());\n $this->product->set_width($this->wcData->getWidth());\n $this->product->set_height($this->wcData->getHeight());\n\n // Set shipping class\n $this->product->set_shipping_class_id($this->wcData->getShippingClassId());\n }",
"public function show(Pizza $pizza)\n {\n return $pizza;\n }",
"function setTo($to_set){\n\t\t\t$this->to=$to_set;\n\t\t}",
"function orderPizzaAll(){\n order_pizza('calzone', 'Koen');\n order_pizza('marguerita', 'Manuele');\n order_pizza('golden', 'students');\n}",
"protected function setUp(){\n $this->poneys = new Poneys;\n $this->poneys->setCount(8);\n }",
"public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }",
"private function setDepositFromData()\n {\n if ($this->dataHasDeposit()) {\n $this->collection->items[$this->cart_hash]->deposit = $this->data['deposit'];\n $this->collection->deposit += $this->data['deposit'];\n }\n }",
"public function destroy($topping)\n {\n return $this->toppings->destroy($topping);\n }",
"public function setPais(string $pais)\n {\n $this->pais = $pais;\n }",
"public function run()\n {\n DB::table('pizzas')->truncate();\n DB::table('pizza_topping')->truncate();\n\n Pizza::factory(12)\n ->create()\n ->each(function (Pizza $pizza) {\n $toppings = Topping::all()->random(rand(3, 6));\n $pizza->toppings()->saveMany($toppings);\n });\n }",
"public function setGoal()\n {\n }",
"public function SetStart()\n\t\t{\n\t\t\t$start = 0;\n\n\t\t\tswitch ($this->_pricepage) {\n\t\t\t\tcase 1: {\n\t\t\t\t\t$start = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// Page 2 or more\n\t\t\t\tdefault: {\n\t\t\t\t\t$start = ($this->GetPage() * GetConfig('CategoryProductsPerPage')) - GetConfig('CategoryProductsPerPage');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->_pricestart = $start;\n\t\t}",
"function pesanPizza($crust, $topping, $size=\"12\"){\n return \"Anda memesan sebuah pizza dengan ukuran $size-inci dengan crust $crust dan topping: \" . implode(', ', $topping);\n}",
"protected function plow(Seter $seter){\n\t\t$seter->CltvoPlow($this->command);\n\t\t$this->command->line( '<info>'.$seter->CltvoGetLabel().':</info>'.\" set successfully.\" );\n }",
"function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}",
"public function set_pedido(Pedido $p){\n $this->pedido=$p;\n }",
"public function abrirFlop()\n {\n $c1 = $this->baralho->getCartaDoTopo();\n $c2 = $this->baralho->getCartaDoTopo();\n $c3 = $this->baralho->getCartaDoTopo();\n array_push($this->cartasDaMesa, $c1, $c2, $c3);\n $this->flop = $this->cartasDaMesa;\n }",
"public function setCarteAppel(?string $carteAppel): CartesAppelEtebac {\n $this->carteAppel = $carteAppel;\n return $this;\n }",
"public function pickup() {\n\t\tglobal $warnings;\n\n\t\t// it wasn't out somewhere\n\t\tif ($this->status != 5) {\n\t\t\t$warnings[2][] = \"keg \" . $this->id . \"_\" . $this->size . \" was not marked as being in use\\r\";\n\t\t}\n\t\t// it didn't have beer in it\n\t\tif ($this->beer == 0) {\n\t\t\t$warnings[2][] = \"keg \" . $this->id . \"_\" . $this->size . \" was marked as empty\\r\";\n\t\t}\n\n\t\t$this->location = 1;\n\t\t$this->beer = 0;\n\t\t$this->status = 1;\n\t\t$this->update();\n\t}",
"protected function setUp()\n {\n $this->slipData = new OrangePaymentSlipData();\n }",
"public function updatePizza(){\n\t\t$pizza = new PizzaModel();\n\t\t$pizza->update($_POST['id'], $_POST);\n\t\treturn redirect()->to('/pizza');\n\t}",
"public function placeAndSettleBet();",
"protected function setVida() {\n $this->vida = 200;\n }",
"protected function setUp()\r\n {\r\n $this->object = new Pane;\r\n }",
"public function setPaisAttribute($value)\n\t{\n\t\t$this->attributes['pais'] = mb_strtoupper($value);\n\t}",
"public function setPrice()\n {\n $price = $this->price;\n $outFix = $this->outFix;\n $outPer = $this->outPer;\n $inPer = $this->inPer;\n $inFix = $this->inFix;\n $flag = $this->flagInOut;\n if ($price < 1) {\n $sumIn = $outFix > 0 ? 1 + $outFix : 1; //outFix\n $sumIn = $outPer > 0 ? $sumIn + ($sumIn * $outPer / 100) : $sumIn; //outPer\n $sumIn = $sumIn / $price; // price\n $sumIn = $inFix > 0 ? $sumIn + $inFix : $sumIn;// inFix\n $ss = $sumIn * $inPer / 100;\n $sumIn = $inPer > 0 ? $sumIn + $ss : $sumIn;\n $this->in = $this->format_amount($sumIn);\n $this->out = $flag ? 1 : 0;\n } else {\n $val = $inFix > 0 ? 1 - $inFix : 1;\n $val = $inPer > 0 ? $val - $val * ($inPer / 100) : $val;\n $sumOut = $price * $val;\n $sumOut = $outFix > 0 ? $sumOut - $outFix : $sumOut;\n $sumOut = $outPer > 0 ? $sumOut - $outPer / 100 * $sumOut : $sumOut;\n $this->out = $this->format_amount($sumOut);\n $this->in = $flag ? 1 : 0;\n }\n $this->price = (float)$price;\n }",
"function setRestarPais(){\n\t\t$this->cantidad_paises--;\n\t}",
"function set_pm_defecto($punto)\n\t{\n\t\t$db = $this->get_db();\n\t\t$id_punto = $db->quote($punto->get_id());\n\t\t$sql = \"UPDATE apex_proyecto\n\t\t\t\tSET pm_impresion = $id_punto,\n\t\t\t\t\tpm_sesion = $id_punto,\n\t\t\t\t\tpm_contexto = $id_punto,\n\t\t\t\t\tpm_usuario = $id_punto\n\t\t\t\tWHERE proyecto = \".$db->quote($this->identificador);\n\t\t$db->ejecutar($sql);\n\t}",
"function setPrice($price)\n {\n $this->price = $price;\n }",
"public function setVoiture($voiture){\n $this->$voiture = $voiture;\n }",
"function setTipo($itipo = '')\n {\n $this->itipo = $itipo;\n }",
"public function setPacht($pacht)\n {\n $this->pacht = $pacht;\n return $this;\n }",
"public function setUp()\n {\n $this->salt = new Ingredient('salt');\n $this->tomato = new Ingredient('tomato');\n $this->kg = new Unit('kilogram', 'kg');\n $this->l = new Unit('liter', 'l');\n $this->recipe = new Recipe('tomato sauce', [\n new Quantity(0.5, $this->kg, $this->tomato),\n new Quantity(0.2, $this->kg, $this->salt),\n ], true, $this->l, 0.8);\n }",
"public function setService(ServiceOTP $service) : self\n {\n $this->service = $service;\n\n return $this;\n }",
"public function testSetType()\n {\n $this->todo('stub');\n }",
"public function setPreference(?int $value): void {\n $this->getBackingStore()->set('preference', $value);\n }",
"protected function setUp()\n {\n $this->object = new PasselType;\n }",
"function setPrice($new_price)\n {\n $this->price = $new_price;\n }",
"public function testSetValue()\n {\n $this->todo('stub');\n }",
"function setEpoca($iepoca = '')\n {\n $this->iepoca = $iepoca;\n }",
"public function update(Request $request, Pizza $pizza)\n {\n //\n }",
"public function setRepeat($value) {\n $this->repeat= $value;\n }",
"protected function metodo_protegido() {\n }",
"protected function setUp() {\n\t\t$this->object = new Showings;\n\t}",
"function setItem_price($price){\n $this->item_price = $price;\n }",
"function validToppings($toppings)\n {\n $validToppings = array(\"pepperoni\", \"sausage\",\n \"olives\", \"artichokes\", \"anchovies\");\n\n\t\t// heck each selected topping, and return false\n\t\t// f it's not valid\n \t\tforeach ($toppings as $topping)\n {\n\t\t\tif (!in_array($topping, $validToppings))\n {\n \t\t\treturn false;\n\t\t\t}\n\t\t}\n \n \n\t\t// If we made it this far, all our toppings are valid\n\t\treturn true;\n }",
"public function setPa($pa)\n {\n $this->pa = $pa;\n\n return $this;\n }",
"public function setCep( $cep )\n\t{\t\n\t\t/**\n\t\t * Armazena Cep do cliente\n\t\t * @name $cep\n\t\t */\n\t\t$this->cep = $cep;\n\t}",
"public function run()\n {\n //Factory for the address\n CustomizePizza::create([\n 'order_item_id' => 1,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 2,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 3,\n 'item_price_id' => 63,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 4,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 5,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 6,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 7,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 8,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 9,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 10,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 11,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'item_price_id' => 63,\n 'order_item_id' => 12,\n 'quantity' => '3',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 13,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 14,\n 'item_price_id' => 63,\n 'quantity' => '2',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 15,\n 'item_price_id' => 63,\n 'quantity' => '1',\n ]);\n CustomizePizza::create([\n 'order_item_id' => 16,\n 'item_price_id' => 63,\n 'quantity' => '3',\n ]);\n }",
"function orderPizza($pizzatype, $customer)\n{\n\n $price = calculateCostPizza($pizzatype);\n $address = getAddress($customer);\n\n echo 'Creating new order... <br>';\n echo 'Order finished.<br><br>';\n echo \"A {$pizzatype} schould be be sent to {$customer} <br>\";\n echo \"The address: {$address} <br>\";\n echo \"The bill is € {$price} <br>\";\n}",
"public function setCashOnDelivery($value): void\n {\n $this->cash_on_delivery = $value;\n }",
"public function run()\n {\n $faker = Faker\\Factory::create('pl_PL');\n $numer = 1;\n/* for ($i = 1; $i <= 5; $i++)\n {\n DB::table('pizzeria_pizza')->insert([\n 'pizzeria_id' => $i,\n 'name' => 'Margarita',\n 'price' => $faker->numberBetween(10,20),\n ]);\n }\n for ($i = 1; $i <= 5; $i++)\n {\n DB::table('pizzeria_pizza')->insert([\n 'pizzeria_id' => $i,\n 'name' => 'Margarita z szyną',\n 'price' => $faker->numberBetween(10,20),\n ]);\n }*/\n \n for ($i = 1; $i <= 5; $i++)\n {\n for ($j = 1; $j <= 10; $j++)\n {\n DB::table('pizzeria_pizza')->insert([\n 'pizzeria_id' => $i,\n 'name' => 'Pizza '.$numer,\n 'price' => $faker->numberBetween(10,20),\n ]);\n $numer++;\n }\n }\n }",
"public function setFixed() {\n }",
"public function setShippingOptionId($id){\n $this->shippingOptionId = $id;\n }",
"public function poke_user($id){\n\t \t$user = $this->get_by_id($id);\n\t \t$sql = \"UPDATE users SET total_pokes = ? WHERE id = {$id}\";\n\t \t$updated_count = intval($user['total_pokes']);\n\t \t$updated_count++;\n\t \t$this->db->query($sql, $updated_count);\n\n\t }",
"public function setConfirmingService(ConfirmingService $service)\n {\n $this->confirmingService = $service;\n }",
"function setPlace( &$value )\n {\n $this->Place = $value;\n }",
"public function setFood($x, $y)\n {\n $this->setMapContent($x + 1, $y + 1, 'food');\n }",
"function setCakePath($cakePath) {\n $this->cakePath = $cakePath;\n }",
"function setNapetiKlima(int $napetiKlima):int {\n $this->napetiKlima = $napetiKlima;\n }",
"public function setToCart()\n\t{\n\t\t$this->cart->set($this->request->getInteger('record'), $this->request->getInteger('amount', 1), [\n\t\t\t'priceNetto' => (float) $this->request->get('priceNetto', 0.0),\n\t\t\t'priceGross' => (float) $this->request->get('priceGross', 0.0),\n\t\t]);\n\t\t$this->saveCart();\n\t}",
"protected function setData()\n {\n $user = Auth::getUser();\n $cart = Cart::byUser($user);\n if ( ! $cart->payment_method_id) {\n $cart->setPaymentMethod(PaymentMethod::getDefault());\n }\n $this->setVar('cart', $cart);\n $this->setVar('paymentMethod', PaymentMethod::find($cart->payment_method_id) ?? PaymentMethod::getDefault());\n $this->setVar('step', $this->property('step'));\n $this->setVar('accountPage', GeneralSettings::get('account_page'));\n\n if ($orderId = request()->get('order')) {\n $orderId = $this->decode($orderId);\n $this->setVar('order', Order::byCustomer($user->customer)->find($orderId));\n }\n }",
"public function setUp()\n {\n $this->VenusFuelDepot = new VenusFuelDepot();\n }",
"public function setIsFavorite($value)\n {\n $this->setProperty(\"IsFavorite\", $value, true);\n }",
"public function setPalletized($palletized) {\n $this->_palletized = $palletized;\n }",
"public function setPerPage($value){\n setcookie($this->main->module_mode.'_list_per_page_limit', $value, time() + 3600 * 24 * 365, '/admin/');\n $this->per_page = $value;\n }",
"public function setQuantity($value)\n {\n $this->quantity = $value;\n $this->recalculatePriceTotal();\n }",
"protected function setUp()\n {\n $this->fixture = new Parameter();\n }",
"public function setTarif(int $tarif): void\n {\n $this->tarif = $tarif;\n }",
"public function setFolio( $folio ){\n\t\t\t$this->folio = $folio;\n\t\t}",
"public function setTema($tema) {\n $this->tema = $tema;\n }",
"public function testSetPrice()\n {\n $item = $this->addItem();\n $item->price = 3;\n\n $this->assertEquals(3, $item->price);\n\n $item->price = 3.52313123;\n $this->assertEquals(3.52313123, $item->price);\n\n $item->price = -123123.000;\n $this->assertEquals(-123123.000, $item->price);\n\n try {\n $item->price = 'a';\n $this->setExpectedException(\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice::class);\n } catch (\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice $e) {\n $this->assertEquals('The price must be a valid number', $e->getMessage());\n }\n }",
"public function ancho($ancho){\r\n\t\tif ($ancho>0) {\r\n\t\t\t$this->ancho=$ancho;\r\n\t\t}\r\n\t}",
"public function setCep($cep): Pessoa\n {\n $this->cep = $cep;\n return $this;\n }",
"public function setPlacement($value) {\n\t\t$this->_placement = $value;\n\t}",
"public function createPizza(){\n\t\t$data = [];\n\t\tif($this->request->getMethod() == \"post\"){\n\t\t\thelper(['form']);\n\t\t\t$rules = [\n\t\t\t\t'name'=>'required|alpha_space',\n\t\t\t\t'price'=>'required|min_length[1]|max_length[50]|numeric',\t\n\t\t\t];\n\n\t\t\t if($this->validate($rules)){\n\t\t\t\t // insert to database\n\t\t\t\t$pizzaModel = new PizzaModel();\n\t\t\t\t$pizzaName = $this->request->getVar('name');\n\t\t\t\t$pizzaPrice = $this->request->getVar('price');\n\t\t\t\t$pizzaIngredient = $this->request->getVar('ingredients');\n\t\t\t\t$pizzaData = array(\n\t\t\t\t\t'name'=>$pizzaName,\n\t\t\t\t\t'price'=>$pizzaPrice,\n\t\t\t\t\t'ingredients'=>$pizzaIngredient\n\t\t\t\t);\n\t\t\t\t$pizzaModel->insert($pizzaData);\n\n\t\t\t}else{\n\t\t\t\t$sessionError = session();\n \t$validation = $this->validator;\n \t\t$sessionError->setFlashdata('error', $validation);\n\t\t\t}\n\t\t}\n\t\treturn redirect()->to('/pizza');\n\n\t}",
"public function Flop()\n {\n return $this->setOption('flop', true);\n }",
"public function setUp() {\n\n\t\tparent::setUp();\n\n\t\t$this->factory->order = new WordPoints_WooCommerce_UnitTest_Factory_For_Order();\n\t\t$this->factory->product = new WordPoints_WooCommerce_UnitTest_Factory_For_Product();\n\t}",
"public function setIdpension($idpension){\n $this->idpension = $idpension;\n }",
"public function setType(PagSeguroShippingType $type)\n {\n $this->type = $type;\n }",
"public function setupPesto() {\n\t\t\t$this->redirect(\"po-setup.php\");\n\t\t}",
"public function testGetAndSetSetting()\n {\n $this->assertEquals(0, $this->fixture->getSetting('foo'));\n\n $this->fixture->setSetting('foo', 'bar');\n\n $this->assertEquals('bar', $this->fixture->getSetting('foo'));\n }"
] | [
"0.56883943",
"0.55608183",
"0.5493001",
"0.5347093",
"0.5266497",
"0.524801",
"0.5240643",
"0.5240643",
"0.50541025",
"0.5009053",
"0.4992364",
"0.49491477",
"0.4928341",
"0.49065608",
"0.49000096",
"0.48817062",
"0.48088256",
"0.48072287",
"0.4782628",
"0.4753409",
"0.47514805",
"0.46962562",
"0.46928322",
"0.46825957",
"0.4675153",
"0.46709913",
"0.466423",
"0.4655477",
"0.46490467",
"0.46445358",
"0.462186",
"0.46055147",
"0.45993415",
"0.4593531",
"0.4559505",
"0.4538457",
"0.45299545",
"0.4526612",
"0.45217502",
"0.45114854",
"0.4498003",
"0.44966364",
"0.44944412",
"0.44911596",
"0.44843417",
"0.44693175",
"0.44632134",
"0.44539458",
"0.44495887",
"0.4447725",
"0.4442296",
"0.4432157",
"0.44316718",
"0.44263524",
"0.4424522",
"0.44244018",
"0.44195643",
"0.44101804",
"0.43980616",
"0.4393956",
"0.43915266",
"0.4383247",
"0.43805036",
"0.43750322",
"0.43719947",
"0.43699342",
"0.43699172",
"0.4367598",
"0.436557",
"0.43631786",
"0.43581265",
"0.43577424",
"0.43513787",
"0.43471378",
"0.43422663",
"0.43296686",
"0.43208677",
"0.43197128",
"0.43146348",
"0.43055606",
"0.43030733",
"0.43028405",
"0.42962572",
"0.42931798",
"0.42921028",
"0.42899144",
"0.4284139",
"0.42810938",
"0.42736596",
"0.42727077",
"0.42682356",
"0.42677823",
"0.42669374",
"0.42662543",
"0.4265142",
"0.4265029",
"0.42642865",
"0.42585123",
"0.4256999",
"0.4256802"
] | 0.71408445 | 0 |
Instantiate a new Message with a single recipient | function send_push_notification($token, $msg) {
$message = new ApnsPHP_Message($token);
// Set a custom identifier. To get back this identifier use the getCustomIdentifier() method
// over a ApnsPHP_Message object retrieved with the getErrors() message.
//$message->setCustomIdentifier("Message-Badge-3");
// Set badge icon to "3"
$message->setBadge(1);
// Set a simple welcome text
$message->setText($msg);
// Play the default sound
$message->setSound();
// Set a custom property
//$message->setCustomProperty('acme2', array('bang', 'whiz'));
// Set another custom property
//$message->setCustomProperty('acme3', array('bing', 'bong'));
// Set the expiry value to 30 seconds
$message->setExpiry(30);
return $message;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }",
"private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }",
"public function __construct(User $sender , User $recipient, Message $message)\n {\n //\n $this->sender = $sender;\n $this->recipient = $recipient;\n $this->message = $message;\n\n }",
"public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }",
"protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}",
"public function createMailMessage();",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"public static function Factory($recipient, &$config) {\n $senderclassname = 'Arcanum_SMS_Sender_'.ucfirst($config->sender);\n return new $senderclassname($recipient, $config);\n }",
"protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }",
"public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"public function __construct( $recipient = null ) {\n\t\tif ( null !== $recipient ) {\n\t\t\t$this->set( $recipient );\n\t\t}\n\t}",
"public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}",
"public function __construct()\n {\n parent::__construct(\"You didn't specify a `recipient` numeric field.\");\n }",
"public function create()\n {\n return view('architect.messageRecipient.create');\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n $this->message->load('sender');\n }",
"public function __construct( $to, $msg )\n\t{\n\n\t\t$this->from = Config::get('sms.from');\n\t\t$this->to = $to;\n\t\t$this->msg = $msg;\t\t\t\t\n\n\t}",
"public function createMessage(): MessageInterface;",
"public function __construct($recipient, $sender, $title)\n {\n $this->recipient = $recipient;\n $this->sender = $sender;\n $this->title = $title;\n }",
"function createMessage($email) {\n $message = new Google_Service_Gmail_Message();\n $message->setRaw(base64_encode($email));\n return $message;\n}",
"public function __construct(Vote $vote, User $recipient, array $message = [])\n {\n $this->vote = $vote;\n $this->recipient = $recipient;\n\n isset($message['subject']) && $this->message['subject'] = $message['subject'];\n isset($message['content']) && $this->message['content'] = $message['content'];\n }",
"function __construct($sender)\r\n {\r\n $this->sender = $sender;\r\n $this->recipients = array(); \r\n }",
"public static function create(string $text = null): GoogleChatMessage\n {\n $message = new static;\n\n if ($text) {\n $message->text($text);\n }\n\n return $message;\n }",
"public function __construct($sender, $recipient, $title, $content) {\n $this->sender = $sender;\n $this->recipient = $recipient;\n $this->title = $title;\n $this->content = $content;\n }",
"public function __construct($type, $message, $from_id)\n {\n $this->type = $type;\n $this->message = $message;\n $this->fromId = $from_id;\n }",
"public static function recipientNotProvided()\n {\n return new static('Facebook notification recipient ID or Phone Number was not provided. Please refer usage docs.');\n }",
"public function to($recipient)\n {\n throw_if(is_null($recipient), SmsException::class, 'Recipient cannot be empty');\n\n throw_if(!is_string($recipient) && $recipient instanceof HasPhoneNumber, SmsException::class, 'Invalid argument for recipient. Must be phone number (string) or entity that implements HasPhoneNumber interface.');\n\n $this->recipient = $recipient;\n\n return $this;\n }",
"public function create(string $message = ''): BusMessageInterface;",
"public function recipient($recipient)\n {\n\n\n $this->recipient = str_replace(' ', '', trim($recipient) ) ;\n\n return $this;\n\n\n }",
"public function __construct($threadid,$message,$sendername,$sender_id,$sender_role = \"\",$created_at)\n {\n //\n $this->message = $message;\n $this->threadid = $threadid;\n $this->sendername = $sendername;\n $this->senderid = $sender_id;\n if(!empty($sender_role)) {\n $this->senderrole = $sender_role;\n }\n $this->created_at = $created_at;\n }",
"public function recipient($recipient)\n {\n return $this->setProperty('recipient', $recipient);\n }",
"public function __construct($message, $userReceiver, $currentUser) {\n $this->message = $message;\n $this->userReceiver = $userReceiver;\n $this->currentUser = $currentUser;\n }",
"public static function missingRecipient()\n {\n return new static('Notification was not sent. You should specify peer_id, user_id, domain, chat_id or user_ids param.');\n }",
"public function __construct(ChatMesssageDTO $chatMesssageDTO, int $messageId)\n {\n $this->message = $chatMesssageDTO;\n $this->messageId = $messageId;\n }",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"function artmo_send_private_message($to, $from, $message){\n if ($from==$to) return;\n // Create conversation and add message\n $_POST['content'] = $message;\n $conversation_id = UM()->Messaging_API()->api()->create_conversation( $to, $from );;\n $_POST['content'] = \"\";\n do_action('um_after_new_message', $to, $from, $conversation_id );\n}",
"public static function create(string $text, User $author, ?Message $parent = null): Message {\n $message = new Message;\n $message->setText($text);\n $message->setAuthor($author);\n $message->setPublicId(Message::generatePublicId());\n if ($parent) {\n $depth = Message::getDepthOfMessage($parent) + 1;\n $message->setParentMessage($parent);\n $limit = (int) getenv('message_reply_limit');\n if ($depth > $limit) {\n throw new ReplyDepthException(sprintf('message was posted as a reply at a greater depth \"%d\" than allowed \"%d\"', $depth, $limit));\n }\n }\n $message->store();\n return $message;\n }",
"public function __construct($message,$for_user_id,$user)\n {\n //\n $this->message=$message;\n // $this->id=$id;\n $this->user=$user;\n $this->for_user_id=$for_user_id;\n }",
"public function __construct(Message $message, User $user)\n {\n $this->message = $message;\n $this->user = $user;\n }",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}",
"public function __construct(MailerContract $mailer, Swift_Mime_SimpleMessage $message, int $recipients)\n {\n $this->name = 'message.sending';\n $this->target = $mailer;\n $this->parameters = ['message' => $message, 'recipients' => $recipients];\n }",
"public function __construct($for, $message)\n {\n $this->for = $for;\n $this->message = $message;\n }",
"public static function create(\n array $recipients,\n Adherent $host,\n CommitteeEvent $event,\n string $eventLink,\n \\Closure $recipientVarsGenerator\n ): self {\n if (!$recipients) {\n throw new \\InvalidArgumentException('At least one Adherent recipient is required.');\n }\n\n $recipient = array_shift($recipients);\n if (!$recipient instanceof Adherent) {\n throw new \\RuntimeException('First recipient must be an Adherent instance.');\n }\n\n $vars = static::getTemplateVars(\n $host->getFirstName(),\n $event->getName(),\n static::formatDate($event->getLocalBeginAt(), 'EEEE d MMMM y'),\n sprintf(\n '%sh%s',\n static::formatDate($event->getLocalBeginAt(), 'HH'),\n static::formatDate($event->getLocalBeginAt(), 'mm')\n ),\n $event->getInlineFormattedAddress(),\n $eventLink,\n $event->getDescription(),\n $event->getCommittee()->getName()\n );\n\n $message = new static(\n Uuid::uuid4(),\n $recipient->getEmailAddress(),\n $recipient->getFullName(),\n sprintf(\n '%s - %s : Nouvel événement de %s : %s',\n static::formatDate($event->getLocalBeginAt(), 'd MMMM'),\n $vars['event_hour'],\n $event->getCommittee()->getName(),\n $vars['event_name']\n ),\n $vars,\n $recipientVarsGenerator($recipient),\n $host->getEmailAddress()\n );\n\n /* @var Adherent[] $recipients */\n foreach ($recipients as $recipient) {\n $message->addRecipient(\n $recipient->getEmailAddress(),\n $recipient->getFullName(),\n $recipientVarsGenerator($recipient)\n );\n }\n\n return $message;\n }",
"public function create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}",
"public function __construct($pmID, $recipientID, $row = null) {\n\t\tif ($pmID !== null && $recipientID !== null) {\n\t\t\t$sql = \"SELECT\t\t*\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_pm_to_user\n\t\t\t\tWHERE\t\tpmID = \".$pmID.\"\n\t\t\t\t\t\tAND recipientID = \".$recipientID;\n\t\t\t$row = WCF::getDB()->getFirstRow($sql);\n\t\t}\n\t\t\n\t\tparent::__construct($row);\n\t}",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function message(mixed $data = null)\n {\n $message = new Message((string) $data);\n\n return $message;\n }",
"abstract public function messageObject(BCTObject $to, array $message);",
"public function mailChatNewMessage(Request $request)\n {\n $user = new User(['firstname' => 'Max', 'lastname' => 'Mustermann']);\n $chat_message = new ChatMessage(['chat_id' => 1, 'message' => 'MESSAGE']);\n \n $mail = new Mail\\ChatNewMessage($user, $chat_message, \"TITLE\");\n \n return $mail;\n }",
"public function createMessage(string $typeName): MessageInterface;",
"public function __construct($message = null, \\Arkitecht\\FedEx\\Structs\\EMailRecipient $recipients = null)\n {\n $this\n ->setMessage($message)\n ->setRecipients($recipients);\n }",
"public function __construct($msg, $msg_to, $subject)\n {\n // All information regarding the message/email being sent\n $this->msg = $msg;\n $this->msg_to = $msg_to;\n $this->subject = $subject;\n }",
"public function __construct($message,$recipients,$sender,$id,$dataCoding=0x00)\n\t{\n\t\t$this->message = $message;\n\t\t$this->recipients = $recipients;\n\t\t$this->sender = $sender;\n\t\t$this->id = $id;\n\t\t$this->dataCoding = $dataCoding;\n\t}",
"public static function createThread($user_id)\n\t{\n\t\tif (!Input::has('subject')) {\n\t\t\tthrow new Exception('Your message must have a subject');\n\t\t}\n\n\t\t// set subject from input\n\t\t$subject = Input::get('subject');\n\n\t\t// make sure subject is not greater than 100 characters\n\t\tif (strlen($subject) > 100) {\n\t\t\tthrow new Exception('Please limit the subject of your message to 100 characters');\t\t\n\t\t}\n\n\t\t// make sure recipients of the thread were sent\n\t\tif(!is_array(Input::get('recipient'))) {\n\t\t\tthrow new Exception('There must be a recipient of your message');\n\t\t}\n\n\t\t// set recipients from input\n\t\t$recipients = Input::get('recipient');\n\n\t\t// loop through all the recipients and...\n\t\tforeach ($recipients as $recipient) {\n\t\t\t// make sure every recipient is numeric\n\t\t\tif (!is_numeric($recipient)) {\n\t\t\t\tthrow new Exception('Invalid recipient');\n\t\t\t}\n\t\t}\n\n\t\t// make sure message body was sent\n\t\tif (!Input::has('body')) {\n\t\t\tthrow new Exception('The body of your message may not be blank');\n\t\t}\n\n\t\t// set body from input\n\t\t$body = Input::get('body');\n\n\t\t// make sure body is not greater than 1024 characters\n\t\tif (strlen($body) > 1024) {\n\t\t\tthrow new Exception('Please limit the body of your message to 1024 characters (it currently has ' . strlen($body) . ')');\t\t\n\t\t}\n\n\t\t// create a transaction to wrap the creation of Thread, UsersThread, Message, and UsersMessage\n\t\tDB::transaction(function() use ($user_id, $subject, $recipients, $body)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// create new thread\n\t\t\t\t$thread = new Thread();\n\t\t\t\t$thread->subject = $subject;\n\t\t\t\t$thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create conversation');\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// create record of author in users_threads\n\t\t\t\t$author_thread = new UsersThread();\n\t\t\t\t$author_thread->user_id = $user_id;\n\t\t\t\t$author_thread->thread_id = $thread->id;\n\t\t\t\t$author_thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create authors connection to conversation');\n\t\t\t}\n\n\t\t\t// loop through all the recipients and...\n\t\t\tforeach ($recipients as $recipient) {\n\n\t\t\t\t// make sure the recipient is not the author\n\t\t\t\tif ($recipient != $user_id) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// create record of recipient in users_threads\n\t\t\t\t\t\t$recipient_thread = new UsersThread();\n\t\t\t\t\t\t$recipient_thread->user_id = $recipient;\n\t\t\t\t\t\t$recipient_thread->thread_id = $thread->id;\n\t\t\t\t\t\t$recipient_thread->save();\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tthrow new Exception('Could not create recipients connection to conversation');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create message (users threads caches are deleted in createMessage)\n\t\t\tMessagesService::createMessage($thread->id, $user_id, $recipients, $body);\t\t\t\n\t\t});\n\t}",
"public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }",
"public static function prepareMessageBirdMessage(\n $originator,\n array $recipients,\n $body,\n $typeDetails = [],\n $dataCoding = Message::DATACODING_PLAIN,\n $type = Message::TYPE_SMS\n ) {\n $message = new Message();\n $message->originator = $originator;\n $message->recipients = $recipients;\n $message->body = $body;\n $message->typeDetails = $typeDetails;\n $message->datacoding = $dataCoding;\n $message->type = $type;\n return $message;\n }",
"private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }",
"public function __construct(MessageSender $messageSender)\n {\n parent::__construct();\n $this->messageSender = $messageSender;\n }",
"static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}",
"public function create($messageId, $recipient , $originator , $message, $type = 'DEFAULT', $udh = null)\n {\n\n $params = [\n 'message_id' => $messageId,\n 'recipient' => $recipient,\n 'originator' => $originator,\n 'message' => $message,\n 'type' => $type,\n 'udh' => $udh,\n ];\n return $this->db->insert($this->table, $params);\n }",
"protected function seeEmailTo($recipient, Swift_Message $message = null)\n {\n $this->assertArrayHasKey(\n $recipient,\n $this->getEmail($message)->getTo(),\n \"No email was sent to $recipient.\"\n );\n\n return $this;\n }",
"public function initMessage() {}",
"protected function prepareMessage() {\n\n\t\tif (empty($this->messageTemplate)) {\n\t\t\tthrow new \\RuntimeException('Messenger: message template was not defined', 1354536584);\n\t\t}\n\n\t\tif (empty($this->to)) {\n\t\t\tthrow new \\RuntimeException('Messenger: no recipient was defined', 1354536585);\n\t\t}\n\n\t\t// Substitute markers\n\t\t$subject = $this->getContentRenderer()->render($this->messageTemplate->getSubject(), $this->markers);\n\t\t$body = $this->getContentRenderer()->render($this->messageTemplate->getBody(), $this->markers);\n\n\t\t// Parse Markdown only if necessary\n\t\tif ($this->messageTemplate->getTemplateEngine() === TemplateEngine::FLUID_AND_MARKDOWN) {\n\t\t\t$body = Markdown::defaultTransform($body);\n\t\t}\n\n\t\t$this->getMailMessage()->setTo($this->getTo())\n\t\t\t->setCc($this->getCc())\n\t\t\t->setBcc($this->getBcc())\n\t\t\t->setFrom($this->getSender())\n\t\t\t->setReplyTo($this->getReplyTo())\n\t\t\t->setSubject($subject)\n\t\t\t->setBody($body, 'text/html');\n\n\t\t// Attach plain text version if HTML tags are found in body\n\t\tif ($this->hasHtml($body)) {\n\t\t\t$text = Html2Text::getInstance()->convert($body);\n\t\t\t$this->getMailMessage()->addPart($text, 'text/plain');\n\t\t}\n\n\t\t// Handle attachment\n\t\tforeach ($this->attachments as $attachment) {\n\t\t\t$this->getMailMessage()->attach($attachment);\n\t\t}\n\t}",
"public function recipient($address = null)\n {\n return new Account([\"address\" => $address ?: $this->getAttribute(\"recipient\")]);\n }",
"public function __construct($user_id, $message)\n {\n //\n\n $this->user_id = $user_id;\n $this->message = $message;\n }",
"public function privateMessage( string $messageId ) : PrivateMessage\n\t{\n\t\treturn new PrivateMessage( $this->client, $messageId );\n\t}",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'body' => 'required|max:5000',\n 'user_id' => ['required', new NotSelfId(), 'exists:users,id'],\n ]);\n\n $message = Auth::user()->messages()->create([\n 'data' => [\n 'text' => request('body'),\n ],\n ]);\n\n Auth::user()->conversations()->attach($message, [\n 'contact_id' => $request->user_id,\n ]);\n\n if (!$this->isAuthUserBlockedToContact($request->user_id, Auth::user()->id)) {\n User::find($request->user_id)->conversations()->attach($message, [\n 'contact_id' => Auth::id(),\n ]);\n\n // broadcast the message to the other person\n event(new MessageCreated($message, $request->user_id, Auth::user()->id));\n }\n\n $message->owner = Auth::user();\n\n return new MessageResource($message);\n }",
"public function __construct(string $receiver = '', string $subject = '', string $message = '')\n {\n $this->receiver = $receiver;\n $this->subject = $subject;\n $this->message = $message;\n }",
"public function __construct($user, $message, $toAll = false)\n {\n if(!empty($user)){\n $this->user = $user;\n $this->token = sha1($user->id + config('messenger.token'));\n }\n $this->message = $message;\n $this->toAll = $toAll;\n }",
"public function message($to, $subject, $content)\n\t{\n\t\t$sender = Kohana::$config->load('mail.sender');\n\n\t\treturn Swift_Message::newInstance($subject, $content)\n\t\t\t->setFrom($sender['address'], $sender['name'])\n\t\t\t->setTo($to);\n\t}",
"public function __construct(string $to, string $body)\n {\n //\n $this->body = $body;\n $this->to = $to;\n }",
"public function getGeneratedMessage()\n {\n # Force the template to render\n (string) $this->prepareTemplate();\n\n $m = $this->template->__message;\n\n if (!$m->getFrom()) {\n trigger_error(\"You should add 'from' information.\", E_USER_WARNING);\n }\n\n if (!$m->getSubject()) {\n trigger_error(\"You should add 'subject'.\", E_USER_WARNING);\n }\n\n if (!$m->getHeader('To')) {\n trigger_error(\"You should add recipients.\", E_USER_WARNING);\n }\n\n foreach ($this->attachments as $attachment) {\n list($filename, $content, $type) = $attachment;\n $m->addAttachment($filename, $content, $type);\n }\n\n return $m;\n }",
"public function __construct($to) {\n $this->params['to'] = $to;\n }",
"public function addMessage(string $text, int $authorId, int $recipientId) : int\n {\n $stmt = $this->db->prepare(\"INSERT INTO messages (text, author, recipient) VALUES (?,?,?)\");\n $stmt->execute([$text, $authorId, $recipientId]);\n return intval($this->db->lastInsertId());\n }",
"public function __construct($message)\n {\n // $this->message = $message;\n }",
"function get_recipient_id() {\n\t\treturn $this->get_data( 'recipient' );\n\t}",
"public function __construct($message)\r\n {\r\n $this->message = $message;\r\n\r\n }",
"public function __construct($name, $message, $from_email)\n {\n $this->user_name = $name;\n $this->body_message = $message;\n $this->from_email = $from_email;\n }",
"public static function NewMessage($mailer,$to=null,$cc=null,$bcc=null,$subject=null)\n {\n $conf=Config::Get('mail');\n\n if (!$conf->mailers->{$mailer})\n throw new MailerException(\"Missing '{$mailer}' in mail configuration.\");\n\n $class=$conf->mailers->{$mailer}->class;\n if (!$class)\n throw new MailerException(\"Missing class in '{$mailer}' configuration.\");\n\n $components=explode('.',$class);\n\n if (count($components)==0)\n throw new MailerException(\"Invalid driver in '{$mailer}' configuration.\");\n\n if (count($components)==1)\n {\n $uses='sys.mail.'.$class.'.'.$class.'_email';\n $class=$class.'Email';\n }\n else\n {\n $uses=$class;\n $class=str_replace('_','',array_pop($components));\n }\n\n uses($uses);\n return new $class($conf->mailers->{$mailer},$to,$cc,$bcc,$subject);\n }",
"public function newAction(Request $request)\n {\n $userMessage = new UserMessage();\n $form = $this->createForm('Bo\\AdminBundle\\Form\\UserMessageType', $userMessage);\n $form->handleRequest($request);\n\n if($form->isSubmitted() && $form->isValid()){\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$coordinator = $this->getConnectedCoordinator(); \n\t\t\t$userMessage->setStudents($coordinator);\n\t\t\t$userMessage->setStype(\"coordinator\");\n\t\t\t$userMessage->setCategory(1);\n\t\t\t$to1 = $request->request->get('idrecipient1');\n\t\t\t$to2 = $request->request->get('idrecipient2');\t\t\t\n\t\t\tif($to1!=0){\n\t\t\t\t$userMessage->setIto1($to1);\n\t\t\t\t$oEmployee = $em->getRepository('BoAdminBundle:Employee')->find($to1);\n\t\t\t\tif($oEmployee) $userMessage->setSto1($oEmployee->getFirstname().\" \".$oEmployee->getName());\n\t\t\t} \n\t\t\tif($to2!=0){\n\t\t\t\t$userMessage->setIto2($to2);\n\t\t\t\t$oEmployee = $em->getRepository('BoAdminBundle:Employee')->find($to2);\n\t\t\t\tif($oEmployee) $userMessage->setSto2($oEmployee->getFirstname().\" \".$oEmployee->getName());\n\t\t\t} \n $em = $this->getDoctrine()->getManager();\n $em->persist($userMessage);\n $em->flush();\n return $this->redirectToRoute('coordinator_message_index');\n }\n return $this->render('BoHomeBundle:Message:new.html.twig', array(\n 'userMessage' => $userMessage,\n\t\t\t'recipients'=>$this->getRecipents($coordinator),\n 'form' => $form->createView(),\n\t\t\t'pm'=>\"admin\",\n\t\t\t'sm'=>\"message\",\n ));\n }",
"public function __construct($msg)\n {\n $this->message = $msg;\n }",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'from' => $model->to_user_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function __construct(string $to, string $subject, $body, ?string $cc, ?string $from, ?string $bcc)\n {\n $this->to = $to;\n $this->from = $from;\n $this->subject = $subject;\n $this->body = $body;\n $this->cc = $cc ?? \"\";\n $this->bcc = $bcc ?? \"\";\n }",
"function sendGenericMessage($recipientId) {\n}",
"public function __construct($message) {\n $this->message= $message;\n }",
"public function save_message($conv_id, $msg_to, $msg_body)\n {\n $message = new Message;\n $message->conversation_id = $conv_id;\n $message->user_id_from = Auth::user()->id;\n $message->user_id_to = $msg_to;\n $message->text = $msg_body;\n $message->save();\n }",
"function send_message($recipient=0, $body='', $subject='', $replyto=''){ \n\n\t$a = get_app();\n\n\tif(! $recipient) return -1;\n\t\n\tif(! strlen($subject))\n\t\t$subject = t('[no subject]');\n\n\t$me = q(\"SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1\",\n\t\tintval(local_user())\n\t);\n\t$contact = q(\"SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1\",\n\t\t\tintval($recipient),\n\t\t\tintval(local_user())\n\t);\n\n\tif(! (count($me) && (count($contact)))) {\n\t\treturn -2;\n\t}\n\n\t$hash = random_string();\n \t$uri = 'urn:X-dfrn:' . $a->get_baseurl() . ':' . local_user() . ':' . $hash ;\n\n\t$convid = 0;\n\t$reply = false;\n\n\t// look for any existing conversation structure\n\n\tif(strlen($replyto)) {\n\t\t$reply = true;\n\t\t$r = q(\"select convid from mail where uid = %d and ( uri = '%s' or `parent-uri` = '%s' ) limit 1\",\n\t\t\tintval(local_user()),\n\t\t\tdbesc($replyto),\n\t\t\tdbesc($replyto)\n\t\t);\n\t\tif(count($r))\n\t\t\t$convid = $r[0]['convid'];\n\t}\t\t\n\n\tif(! $convid) {\n\n\t\t// create a new conversation\n\n\t\t$conv_guid = get_guid();\n\n\t\t$recip_host = substr($contact[0]['url'],strpos($contact[0]['url'],'://')+3);\n\t\t$recip_host = substr($recip_host,0,strpos($recip_host,'/'));\n\n\t\t$recip_handle = (($contact[0]['addr']) ? $contact[0]['addr'] : $contact[0]['nick'] . '@' . $recip_host);\n\t\t$sender_handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);\n\n\t\t$handles = $recip_handle . ';' . $sender_handle;\n\n\t\t$r = q(\"insert into conv (uid,guid,creator,created,updated,subject,recips) values(%d, '%s', '%s', '%s', '%s', '%s', '%s') \",\n\t\t\tintval(local_user()),\n\t\t\tdbesc($conv_guid),\n\t\t\tdbesc($sender_handle),\n\t\t\tdbesc(datetime_convert()),\n\t\t\tdbesc(datetime_convert()),\n\t\t\tdbesc($subject),\n\t\t\tdbesc($handles)\n\t\t);\n\n\t\t$r = q(\"select * from conv where guid = '%s' and uid = %d limit 1\",\n\t\t\tdbesc($conv_guid),\n\t\t\tintval(local_user())\n\t\t);\n\t\tif(count($r))\n\t\t\t$convid = $r[0]['id'];\n\t}\n\n\tif(! $convid) {\n\t\tlogger('send message: conversation not found.');\n\t\treturn -4;\n\t}\n\n\tif(! strlen($replyto)) {\n\t\t$replyto = $uri;\n\t}\n\n\n\t$r = q(\"INSERT INTO `mail` ( `uid`, `guid`, `convid`, `from-name`, `from-photo`, `from-url`, \n\t\t`contact-id`, `title`, `body`, `seen`, `reply`, `replied`, `uri`, `parent-uri`, `created`)\n\t\tVALUES ( %d, '%s', %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d, '%s', '%s', '%s' )\",\n\t\tintval(local_user()),\n\t\tdbesc(get_guid()),\n\t\tintval($convid),\n\t\tdbesc($me[0]['name']),\n\t\tdbesc($me[0]['thumb']),\n\t\tdbesc($me[0]['url']),\n\t\tintval($recipient),\n\t\tdbesc($subject),\n\t\tdbesc($body),\n\t\t1,\n\t\tintval($reply),\n\t\t0,\n\t\tdbesc($uri),\n\t\tdbesc($replyto),\n\t\tdatetime_convert()\n\t);\n\n\n\t$r = q(\"SELECT * FROM `mail` WHERE `uri` = '%s' and `uid` = %d LIMIT 1\",\n\t\tdbesc($uri),\n\t\tintval(local_user())\n\t);\n\tif(count($r))\n\t\t$post_id = $r[0]['id'];\n\n\t/**\n\t *\n\t * When a photo was uploaded into the message using the (profile wall) ajax \n\t * uploader, The permissions are initially set to disallow anybody but the\n\t * owner from seeing it. This is because the permissions may not yet have been\n\t * set for the post. If it's private, the photo permissions should be set\n\t * appropriately. But we didn't know the final permissions on the post until\n\t * now. So now we'll look for links of uploaded messages that are in the\n\t * post and set them to the same permissions as the post itself.\n\t *\n\t */\n\n\t$match = null;\n\n\tif(preg_match_all(\"/\\[img\\](.*?)\\[\\/img\\]/\",$body,$match)) {\n\t\t$images = $match[1];\n\t\tif(count($images)) {\n\t\t\tforeach($images as $image) {\n\t\t\t\tif(! stristr($image,$a->get_baseurl() . '/photo/'))\n\t\t\t\t\tcontinue;\n\t\t\t\t$image_uri = substr($image,strrpos($image,'/') + 1);\n\t\t\t\t$image_uri = substr($image_uri,0, strpos($image_uri,'-'));\n\t\t\t\t$r = q(\"UPDATE `photo` SET `allow_cid` = '%s'\n\t\t\t\t\tWHERE `resource-id` = '%s' AND `album` = '%s' AND `uid` = %d \",\n\t\t\t\t\tdbesc('<' . $recipient . '>'),\n\t\t\t\t\tdbesc($image_uri),\n\t\t\t\t\tdbesc( t('Wall Photos')),\n\t\t\t\t\tintval(local_user())\n\t\t\t\t); \n\t\t\t}\n\t\t}\n\t}\n\t\n\tif($post_id) {\n\t\tproc_run('php',\"include/notifier.php\",\"mail\",\"$post_id\");\n\t\treturn intval($post_id);\n\t} else {\n\t\treturn -3;\n\t}\n\n}",
"public function testConstructor()\n {\n $cut = new Recipient();\n\n $this->assertNull($cut->getAmount());\n $this->assertNull($cut->getAddress());\n\n $cut = new Recipient('sdfwfjdsfg4wr23fecdsb', '100000');\n\n $this->assertEquals(100000, $cut->getAmount());\n $this->assertEquals('sdfwfjdsfg4wr23fecdsb', $cut->getAddress());\n }",
"public function createMimeMessage();",
"public function __construct( $roomId, $messageId)\n {\n $this->roomId=$roomId;\n $this->messageId=$messageId;\n }",
"public function createMessage(array $parameters = []);",
"public function sms(string $to, string $text, array $options = []): MessageInstance\n {\n $from = $options['from'] ?? null;\n\n $options = ArrayHelper::merge(\n [\n 'from' => $this->parseFrom($from),\n 'body' => $text\n ],\n $options\n );\n\n return $this->client\n ->messages\n ->create($to, $options);\n }",
"public static function createTestConversationMessage(UserProfile $conversationAuthor, UserProfile $messageAuthor) {\n\t\t$conversation = self::createTestConversation($conversationAuthor, $messageAuthor);\n\t\t\n\t\treturn (new ConversationMessageAction([], 'create', [\n\t\t\t'data' => [\n\t\t\t\t'conversationID' => $conversation->conversationID,\n\t\t\t\t'message' => 'Test Conversation Message Message',\n\t\t\t\t'time' => TIME_NOW,\n\t\t\t\t'userID' => $messageAuthor->userID,\n\t\t\t\t'username' => $messageAuthor->username\n\t\t\t],\n\t\t\t'conversation' => $conversation\n\t\t]))->executeAction()['returnValues'];\n\t}",
"public function __construct($messageId)\n {\n $this->messageId = $messageId;\n }",
"function __construct($phoneNumber, $message)\n {\n $this->phoneNumber = $phoneNumber;\n $this->message = $message;\n }",
"public function getFirstMessageObj()\r\n {\r\n $tMsg = new TicketMessage($this->messages[0]);\r\n \r\n if($tMsg->isValid())\r\n {\r\n throw new Exception(__METHOD__.\" unable to get ticket\");\r\n }\r\n \r\n return $tMsg;\r\n }"
] | [
"0.68792",
"0.6859934",
"0.6594861",
"0.6570423",
"0.63376594",
"0.630552",
"0.6239531",
"0.623134",
"0.6201808",
"0.61968935",
"0.6160824",
"0.61131245",
"0.60962445",
"0.602253",
"0.60148144",
"0.5954294",
"0.5927739",
"0.58924216",
"0.58911276",
"0.584131",
"0.58211166",
"0.58194566",
"0.5810036",
"0.5789048",
"0.5736654",
"0.5736397",
"0.5735819",
"0.5687539",
"0.5674586",
"0.5673896",
"0.5670589",
"0.56620455",
"0.5660897",
"0.5660224",
"0.5642161",
"0.56384224",
"0.56293726",
"0.5626644",
"0.5598171",
"0.559306",
"0.55905706",
"0.55755925",
"0.55733883",
"0.557078",
"0.5565771",
"0.55580544",
"0.5552665",
"0.5552665",
"0.5552665",
"0.5552665",
"0.5552665",
"0.55399245",
"0.5527337",
"0.55257726",
"0.5519057",
"0.5503448",
"0.5480228",
"0.54715884",
"0.5462176",
"0.54385173",
"0.5415583",
"0.5409163",
"0.5406112",
"0.5402645",
"0.53980446",
"0.53962636",
"0.53917694",
"0.5380788",
"0.5372073",
"0.53671324",
"0.5366651",
"0.5359522",
"0.5359182",
"0.5358494",
"0.5352159",
"0.5351916",
"0.53441674",
"0.53355896",
"0.5335435",
"0.5328555",
"0.5328504",
"0.5322353",
"0.5310734",
"0.53030354",
"0.53020805",
"0.5285759",
"0.5282693",
"0.52754533",
"0.5273347",
"0.5270338",
"0.52667594",
"0.52626514",
"0.52590525",
"0.5254202",
"0.5251755",
"0.52430826",
"0.5237456",
"0.5229524",
"0.52293783",
"0.5228857",
"0.5226593"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$tiket = Tiket::find($id);
if ($tiket->delete()) {
return response()->json(null, 204);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Displays the creation form | public function newAction()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return $this->form->render('mconsole::personal.form');\n }",
"public function create()\n {\n //\n return $this->render('create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create()\n\t{\n\t\t//\n\t\treturn view('Gallery/Admin/form');\n\t}",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n\t{\n\t\t$this->load->view('admin/header');\n\t\t$this->load->view('admin/create');\n\t\t\n\t}",
"public function createAction()\n {\n echo (new View('userCreate'))->render();\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function create()\n {\n return view('admin.creator.create');\n }",
"public function create() {\n\n\t\treturn view('/mailer/createform');\n\n\t}",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n $view = new View('verein_create');\n $view->title = 'Verein erfassen';\n $view->heading = 'Verein erfassen';\n $view->display();\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n \treturn view('sprzet_jednorazowy.create');\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }",
"public function create()\n {\n $this->title = __('admin.create_personal_information');\n\n //Page content definition\n $this->content = $this->getViewContent('personal_info.personal_info_form',\n [\n 'title' => $this->title\n ]\n );\n\n return $this->renderCurrentView();\n }",
"public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_historico_atleta_cameponato/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_historico_atleta_cameponato.create')\n;\n\t}",
"public function create()\n {\n //return view('marca.create');\n return 'Mostrando Formulario para crear Fabricantes';\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('uoms.create');\n\t}",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }",
"public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }",
"public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }",
"public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }",
"public function create()\n {\n return view ('Ce.create');\n }",
"public function create()\n {\n return view('biologicos.create');\n }",
"public function create()\n {\n return view('forms.cps.create');\n }",
"public function create()\n {\n return view('admin.create.create'); \n }",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n\t{\n\t\treturn View::make('ugd.create' );\n\t}",
"public function create()\n {\n //return view ('admin.user-table.new-user-form');\n }",
"public function create()\n\t{\n\t\t$this->layout->content = View::make('pns.create');\n\t}",
"public function create()\n\t{\n\t\t//\n return View::make('admin.cargo.create');\n\t}",
"public function create()\n\t{\n\t\treturn View::make('usp.koperasi.create')->with('page','Koperasi')\n\t\t->with('modul','Create');\n\t}",
"public function create()\n {\n return view('becasadmin.create');\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n\t{\n\t\treturn View::make('centrals.create');\n\t}",
"public function create()\r\n {\r\n return view('mpcs::create');\r\n }",
"public function createAction(){\n $action = \"new\";\n $actionText = \"Create Book\";\n // create empty book...\n $book = new Book();\n require_once('views/bookForm.php');\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view(\"{$this->nameFolder}/create\");\n }",
"public function create()\n {\n return view('backend.components.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('can_bos.create');\n\t}",
"public function create()\n {\n return view('forming');\n }",
"public function create()\n\t{\n\t\treturn view('stafs.create');\n\t}",
"public function actionCreate()\n {\n $this->isCreateView = true;\n $modelClass = $this->_getModelClass();\n $model = new $modelClass;\n return $this->_renderView($model);\n }",
"public function create()\n {\n\n return view('jipphy02tt01.create');\n }",
"public function create()\n {\n $template = (object) $this->template;\n $form = $this->form();\n return view('admin.disposisi.create', compact('template','form'));\n }",
"public function create()\n {\n return view('backend.xeploai_cd.create');\n }",
"public function create()\n\t{\t\n\t\t$modulos_list = Modulo::all()->lists('id', 'id');\n$professores_list = Professor::all()->lists('id', 'id');\n\n\t\t// load the create form (app/views/Turma/create.blade.php)\n\t\t$this->layout->content = View::make('Turma.create')\n->with('modulos_list', $modulos_list)\n->with('professores_list', $professores_list);\n\t}",
"public function create() {\n\t\t//\n\n\t\treturn view('laboratorio.nuevo');\n\t}",
"public function create()\n {\n $data['module'] = $this->module();\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }",
"public function create()\n {\n return view('guichets.create');\n }",
"public function create()\n {\n //esta vista es para crear un nuevo registro\n return view('wizard.create');\n }",
"public function action_create()\n {\n $this->action_edit(FALSE);\n }",
"public function create()\n\t{\n\n return View::make('admin.program.create');\n\n\t}",
"public function create()\n\t{\n\t\t$this->layout->content = View::make('user.create');\n\t}",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('admin.formation.create');\n }",
"public function create()\n {\n return view(\"tender.create\");\n }",
"public function create()\n {\n return view(\"crearefaccion\");\n }",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n\t\treturn view('kota.create');\n\t}",
"public function create()\n {\n //\n return View::make('admin.form_int_mun');\n }",
"public function create()\n {\n return view('backend::create');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('unitkerjas.create')->withTitle('Tambah Unit Kerja');\n\t}",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n return view($this->module.'.create');\n }",
"public function create()\n\t{\n\t\treturn view('ldcs.create');\n\t}",
"public function create() {\n return view(\"admin.genres.form\");\n }",
"function create()\n {\n \t$this->load->view('Admin/VFormUser');\n }",
"public function create()\n {\n return view('labarugi.create');\n }",
"public function getCreate()\n {\n\t\t$title = \"Novo Fornecedor\";\n // Show the page\n return view('admin.fornecedor.create_edit', compact('title'));\n }",
"public function create()\n {\n return view('laboratoire.create');\n }",
"public function create()\n\t{\n\t\treturn view('dapils.create');\n\t}",
"public function create()\n {\n return view('admin::create');\n }",
"public function create()\n {\n return view('admin::create');\n }",
"public function create()\n {\n return view('admin::create');\n }",
"public function create()\n {\n return view('admin::create');\n }"
] | [
"0.78857446",
"0.7817919",
"0.78172106",
"0.77591723",
"0.7750754",
"0.77156997",
"0.77073085",
"0.76961833",
"0.7693344",
"0.7662305",
"0.7655872",
"0.76406026",
"0.76406026",
"0.75848895",
"0.7582472",
"0.75794667",
"0.7558011",
"0.75542694",
"0.7540239",
"0.7507046",
"0.7506217",
"0.7480085",
"0.747375",
"0.74641836",
"0.74569243",
"0.74482125",
"0.74481755",
"0.74472725",
"0.7446553",
"0.7442466",
"0.74211895",
"0.74206984",
"0.7405774",
"0.7405611",
"0.73979926",
"0.7382818",
"0.73826635",
"0.73781466",
"0.7369202",
"0.73689765",
"0.73689765",
"0.73689765",
"0.73689765",
"0.73575866",
"0.7350169",
"0.73485756",
"0.73483753",
"0.7346548",
"0.7344358",
"0.733147",
"0.7329361",
"0.7314268",
"0.73106694",
"0.73103625",
"0.730364",
"0.7296631",
"0.7295594",
"0.72952586",
"0.72897893",
"0.72857326",
"0.72851574",
"0.72841966",
"0.72788364",
"0.7274601",
"0.72732085",
"0.72723925",
"0.72716415",
"0.7269892",
"0.7264972",
"0.72639006",
"0.7260629",
"0.7256837",
"0.72551394",
"0.72549605",
"0.7253078",
"0.72478634",
"0.7247599",
"0.7245214",
"0.7245214",
"0.7244214",
"0.7244069",
"0.7242662",
"0.72410107",
"0.7238974",
"0.72371745",
"0.72369206",
"0.72368854",
"0.723653",
"0.72364074",
"0.72356075",
"0.72346395",
"0.7233723",
"0.72320294",
"0.72311586",
"0.7229988",
"0.7228665",
"0.72285855",
"0.7225856",
"0.7225856",
"0.7225856",
"0.7225856"
] | 0.0 | -1 |
Creates a new tipocodigo | public function createAction()
{
if (!$this->request->isPost()) {
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'index'
]);
return;
}
$tipocodigo = new Tipocodigo();
$tipocodigo->Descripciontipo = $this->request->getPost("descripcionTipo");
$tipocodigo->Estadoregistro = $this->request->getPost("estadoRegistro");
$tipocodigo->LongitudCodigo = $this->request->getPost("longitudCodigo");
if (!$tipocodigo->save()) {
foreach ($tipocodigo->getMessages() as $message) {
$this->flash->error($message);
}
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'new'
]);
return;
}
$this->flash->success("Tipo de Código se Registró Satisfactoriamente");
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'index'
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function criarNovaConta($tipo){\n return new Conta($tipo);\n }",
"public function create($type)\n {\n //\n }",
"public function create()\n {\n //\n return view('especializacion_tipo.create');\n }",
"public function actionCreate($tipo)\n {\n $model = new Financeiro();\n\n if ($tipo == 1){\n $model->scenario = 'ContaPagar';\n }else if ($tipo == 2){\n $model->scenario = 'ContaReceber';\n }\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n if ($model->scenario == 'ContaPagar'){\n return $this->redirect(['index']);\n }else{\n return $this->redirect(['index-receber']);\n }\n\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"function Create($td_cod_tipo_denuncia,$de_descripcion,$de_contacto,$de_telefono,$de_nombre,$de_imagen){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"INSERT INTO denuncia (td_cod_tipo_denuncia,de_descripcion,de_contacto,de_telefono,de_nombre,de_fecha,de_imagen,de_estado) VALUES (?,?,?,?,?,now(),?,'Pendiente')\";\n\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($td_cod_tipo_denuncia,$de_descripcion,$de_contacto,$de_telefono,$de_nombre,$de_imagen));\n\n\t\tfloopets_BD::Disconnect();\n\t}",
"public function crear() {\n /**\n * guardamos la consulta en $sql\n * ejecutamos la consulta en php \n * asignamos el id del objeto = al ultimo id que añadimos a la bd, asi coincidiran el id objeto con tupla\n * lista de atributos a introducir valores de atributos a introducir\n * formato insertar datos INSERT INTO NombreTabla (NombreAtributo1, NombreAtributo2) VALUES (ValorAtributo1, ValorAtributo2)\n */\n // para acceder a una cosntante de la clase NombreClase::NOMBRECONSTANTE\n \n try {\n $sql=\"INSERT INTO \".Bebidas::TABLA[0].\" (nombre, descripcion, tipo, estado, foto) VALUES ('$this->nombre', '$this->descripcion', '$this->tipo', '$this->estado', '$this->foto')\";\n $this->conexion->query($sql);\n $this->__set(\"id_bebida\", $this->conexion->insert_id);\n } catch (Exception $ex) {\n echo 'error '.$ex;\n }\n \n }",
"public function nuevo($type = -1) {\r\n $oCorrelativo = ORM::factory('correlativo')\r\n ->where('id_tipo', '=', $type)\r\n ->find();\r\n $oCorrelativo->correlativo = $oCorrelativo->correlativo + 1;\r\n $oCorrelativo->save();\r\n $codigo = '000' . $oCorrelativo->correlativo;\r\n if ($type == -1)\r\n $tipo = 'I/';\r\n else\r\n $tipo = '';\r\n $codigo = $tipo . date('Y') . '-' . substr($codigo, -4);\r\n return $codigo;\r\n }",
"public function crear()\n {\n //\n }",
"public function createTrancheOld()\n {\n $uniqueId = str_replace(\".\",\"\",microtime(true)).rand(000,999);\n\n if($this->type == 1){\n\n TranchesPoidsPc::create([\n 'nom' => $this->minPoids.\" - \".$this->maxPoids,\n 'min_poids' => $this->minPoids,\n 'max_poids' => $this->maxPoids,\n 'uid' => \"PP\".$uniqueId,\n ]);\n\n\n\n }else{\n TranchesKgPc::create([\n 'nom' => $this->nom,\n 'uid' => \"KP\".$uniqueId,\n ]);\n\n }\n session()->flash('message', 'Tranche \"'.$this->nom. '\" a été crée ');\n\n\n\n $this->reset(['nom','minPoids','maxPoids']);\n\n $this->emit('saved');\n }",
"function criarMovimentacao() {\n $movimentacao = new Movimentacoes();\n $movimentacao->valor = $this->valor;\n $movimentacao->tipo = 'E';\n $movimentacao->faturas_id = $this->id;\n $movimentacao->contas_bancarias_id = $this->contas_bancarias_id;\n $movimentacao->save();\n }",
"public function crear() {\n\t\t$this->load->model('pais_model');\n\t\t$datos['body']['paises'] = $this->pais_model-> getAll($filtro=\"\");\n\t\t\n\t\tenmarcar($this, 'autor/crear', $datos);\n\t}",
"public function actionCreate($tipo_item, $id_projeto)\n {\n $model = new Item();\n $model->tipo_item = $tipo_item;\n $model->id_projeto = $id_projeto;\n\n $professores = User::find()->where(['professor' => 1, 'administrador' => 0])->orderBy('nome ASC')->all();\n $professores_nomes = ArrayHelper::map($professores, 'nome', 'nome');\n\n if ($model->tipo_item == 2){\n $model->natureza = 'Capital';\n }\n else{\n $model->natureza = 'Custeio';\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $this->mensagens('success', 'Item criado', 'Item criado com sucesso.');\n return $this->redirect(['index', 'id_projeto' => $model->id_projeto]);\n }\n\n return $this->render('create', [\n 'tipo_item' => $tipo_item,\n 'id_projeto' => $id_projeto,\n 'model' => $model,\n 'professores_nomes' => $professores_nomes,\n ]);\n }",
"public static function factory($tipo){\n if($tipo=='text')\n $campo=new CampoText();\n else if($tipo=='textarea')\n $campo=new CampoTextArea();\n else if($tipo=='select')\n $campo=new CampoSelect();\n else if($tipo=='radio')\n $campo=new CampoRadio();\n else if($tipo=='checkbox')\n $campo=new CampoCheckbox();\n else if($tipo=='file')\n $campo=new CampoFile();\n else if($tipo=='date')\n $campo=new CampoDate();\n else if($tipo=='instituciones_gob')\n $campo=new CampoInstitucionesGob();\n else if($tipo=='comunas')\n $campo=new CampoComunas();\n else if($tipo=='paises')\n $campo=new CampoPaises();\n else if($tipo=='moneda')\n $campo=new CampoMoneda();\n else if($tipo=='title')\n $campo=new CampoTitle();\n else if($tipo=='subtitle')\n $campo=new CampoSubtitle();\n else if($tipo=='paragraph')\n $campo=new CampoParagraph();\n else if($tipo=='documento')\n $campo=new CampoDocumento();\n else if($tipo=='javascript')\n $campo=new CampoJavascript();\n else if($tipo=='grid')\n $campo=new CampoGrid();\n else if($tipo=='agenda')\n $campo=new CampoAgenda();\n else if($tipo=='recaptcha')\n $campo=new CampoRecaptcha();\n else if($tipo=='maps')\n $campo=new CampoMaps();\n\n $campo->assignInheritanceValues();\n\n return $campo;\n }",
"public function create()\n {\n $aliquote = AliquoteIva::all();\n $gruppi = GruppiCliFor::all();\n $pagamenti = Pagamenti::all();\n\n $arrAliquote = [' ' => ' '];\n foreach ($aliquote as $aliquota){\n $arrAliquote = array_add($arrAliquote, $aliquota->Codice , $aliquota->Descrizione);\n }\n\n $arrGruppi = [' ' => ' '];\n foreach ($gruppi as $gruppo){\n $arrGruppi = array_add($arrGruppi, $gruppo->Codice, $gruppo->Descrizione);\n }\n\n $arrPagamenti = [' ' => ' '];\n foreach ($pagamenti as $pagamento){\n $arrPagamenti = array_add($arrPagamenti, $pagamento->Codice, $pagamento->Descrizione);\n }\n\n $arrNewCode = DB::table('anagrafe')->where('Tipo', 'C')->max('Codice');\n $newCode = 'C' . str_pad(strval(intval(substr($arrNewCode, 1))+1), 5, '0', STR_PAD_LEFT);\n\n $cliente = new Anagrafe();\n $cliente->Codice = $newCode;\n\n return view('clienti.create', [\n 'arrAliquote' => $arrAliquote,\n 'arrGruppi' => $arrGruppi,\n 'arrPagamenti' => $arrPagamenti,\n 'cliente' => $cliente]);\n }",
"public function create()\n\t{\n\t\t$tc = TipoComunicacion::all();//tc = tipo comunicaciones\n\t\t$this->layout->titulo = 'Crear Comunicaciones';\n $this->layout->nest(\n 'content',\n 'comunicaciones.create',\n array(\n \t'tipoComunicaciones' => $tc \n )\n );\n\t}",
"function insertarTipoVenta(){\n\t\t$this->procedimiento='vef.ft_tipo_venta_ime';\n\t\t$this->transaccion='VF_TIPVEN_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('codigo_relacion_contable','codigo_relacion_contable','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('tipo_base','tipo_base','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('id_plantilla','id_plantilla','integer');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function createCarte()\n {\n $this->utils->Restreindre($this->userConnecter->admin, $this->utils->Est_autoriser(9, $this->userConnecter->profil));\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $data['profession'] = $this->utils->professions();\n $data['typepiece'] = $this->utils->typepiece();\n $data['pays'] = $this->utils->listePays();\n $data['nationalites'] = $this->utils->nationalites();\n $data['regions'] = $this->utils->allRegionByPays();\n $paramsview = array('view' => 'compte/new-carte');\n $this->view($paramsview, $data);\n }",
"function crearProyecto($proyecto){\n //no implementado por no requerimiento del proyecto\n }",
"public function crear()\n {\n can('crear-tipoentrega');\n return view('tipoentrega.crear');\n }",
"function crear_cita($cita) {\n $this->db->insert('citas', $cita);\n }",
"public function crear()\n {\n\n try{\n $model = new \\App\\Models\\Pasientes();\n\n foreach ($_POST as $campo => $val){\n $model->$campo = $val;\n }\n\n $model::insert($model);\n $this->historico();\n\n }catch(\\Exception $e){\n\n $this->formularioCreacion(['_error' => $e]);\n\n }\n\n }",
"public function create()\n {\n return view('tipo-cuenta.create');\n }",
"public function nuevaCuenta($tipo) {\n $tipoCuenta = TipoCuenta::firstOrNew(['tip_cue_nombre' => $tipo]);\n $password = '';\n if ($tipoCuenta->id != '') {\n $cuenta = new Cuenta;\n $password = $this->generarPassword();\n $cuenta->cue_password = md5($password);\n $cuenta->persona_id = $this->id;\n $cuenta->save();\n\n $cuentaTipoCuenta = new CuentaTipoCuenta;\n $cuentaTipoCuenta->cue_tip_estado = 'activo';\n $cuentaTipoCuenta->cuenta_id = $cuenta->id;\n $cuentaTipoCuenta->tipocuenta_id = $tipoCuenta->id;\n $cuentaTipoCuenta->save();\n return $password;\n }\n\n return false;\n }",
"public function create()\n {\n //\n //$publico = Input::get('publico');\n $ambitos = \\App\\Ambito::lists('nombre','id');\n $procedimientos = \\App\\Procedimiento::lists('nombre','id');\n $ciclo = (object) ['fecha_ini' => \\Carbon\\Carbon::now(),'activo'=>1,'publico'=>1]; //se inicializan valores por defecto\n //$ciclo = (object) ['fecha_fin' => \\Carbon\\Carbon::now()];\n $activo = $this->request->get('activo');\n //dd($ciclo);\n return view('admin.ciclos.create',compact('ciclo','ambitos','activo','procedimientos'));\n }",
"public function create ($est){\r\n\r\n $sql = \"INSERT INTO ESTADO_USUARIO VALUES (\".$est->getCod_estado().\",\r\n '\".$est->getNom_estado().\"'\r\n );\";\r\n\r\n pg_Exec($this->conexion,$sql);\r\n }",
"public function create()\n {\n return view('tipo_ausentismos.create');\n }",
"public function create(){}",
"public function newconcitaAction()\r\n {\r\n //Metodo para consulta nueva con el id de cita\r\n $entity = new Consulta();\r\n \r\n $em = $this->getDoctrine()->getManager();\r\n \r\n //Recuperación del id\r\n $request = $this->getRequest();\r\n $cadena= $request->get('id');\r\n //$identidad= $request->get('identidad');\r\n //Obtener el id del parametro\r\n $idEntidad = substr($cadena, 1);\r\n $cita = $em->getRepository('DGPlusbelleBundle:Cita')->find($idEntidad);\r\n //var_dump($cadena);\r\n //var_dump($cita);\r\n $tratamiento = $cita->getTratamiento();\r\n \r\n $entity->setTratamiento($tratamiento);\r\n $idpaciente=$cita->getPaciente()->getId();\r\n \r\n //Busqueda del paciente\r\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($idpaciente);\r\n //Seteo del paciente en la entidad\r\n $entity->setPaciente($paciente);\r\n \r\n $form = $this->createCreateForm($entity,2,$cadena);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"public function addTipoServico($tipoServico){\r\n \r\n try {\r\n\r\n $this->validarDadosTipoServico($tipoServico);\r\n return $this->tipoServicoDAO->insert($tipoServico); \r\n \r\n } catch (DataException $e) {\r\n throw $e;\r\n }\r\n }",
"public function create(){\n\t\t//\n\t}",
"public function create(){\n\t\t//\n\t}",
"public function create(){\n\t\t//\n\t}",
"public function create(){\n\t\t//\n\t}",
"private function tbl_guiones_registro_tipo_formulario() {\r\n\t\t\t$this->guiones_registro_tipo = $this->esquema->createTable('GUIONES_REGISTRO_TIPO');\r\n\t\t\t$this->guiones_registro_tipo->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del tipo de guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_tipo->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del tipo de guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_tipo->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del tipo de Guion [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_tipo->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro_tipo->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}",
"public function create() {\n\n $model = new CursoModel();\n\n\n $data = (array) $this->request->getJson();\n\n\t\t$model->insert($data);\n\t\t\n\t\t$response = [\n 'status' => 201,\n 'error' => null,\n 'messages' => [\n 'success' => 'Curso criado com sucesso'\n ]\n\t ];\n\t \n return $this->respondCreated($response);\n\t\n\t}",
"public function create()\n {\n $dato = $this->gen_section();\n $this->genLog(\"Ingresó a crear nivel\"); \n return view('admin.tipocuenta.create',compact('dato'));\n }",
"public function crear($codigo, $nombres, $fecha, $matricula, $personasCargo, $descripcion, $asignaturasPerdidas) {\n\n $data = array(\n 'codigoEstudiante' => $codigo,\n 'nombres' => $nombres,\n 'fechaInscripcion' => $fecha,\n 'matriculaValor' => $matricula,\n 'personasCargo' => $personasCargo,\n 'descripcion' => $descripcion,\n 'nroAsigPerdidas' => $asignaturasPerdidas\n );\n $this->insert($data);\n }",
"public function crear()\n {\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t$this->crear_post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->crear_get();\n\t\t}\n }",
"public function createAction()\n {\n $entity = new Partido();\n $request = $this->getRequest();\n $form = $this->createForm(new PartidoType(), $entity);\n $form->bindRequest($request);\n\n if ( $form->isValid() ) {\n $entity->setResultadol(0); \n $entity->setResultadov(0);\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n return $this->redirect($this->generateUrl('partido_show', array('id' => $entity->getId()))); \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }",
"public function crear(){\n\t\t\t\t\t\t\t\t$calidad = new calidad($_POST['data']);\n\t\t\t\t\t\t $calidadMapper = new calidadMapper();\n\t\t\t\t\t\t var_dump($calidadMapper->crearcalidad($calidad));\n\t\t\t\t\t\t\t}",
"public function createAction() {\n $vehiculo = $this->container->get('security.context')->getToken()->getUser()->getVehiculo();\n\n $entity = new Gasolina();\n $request = $this->getRequest();\n $form = $this->createForm(new GasolinaType(), $entity);\n $form->bind($request);\n\n $entity->setVehiculo($vehiculo);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n // Anyado este codigo para actualizar la variable de sesion\n $consumoObject = $em->getRepository('TxinbometroBundle:Gasolina')->getConsumos($this->get('session')->get('vehiculo'));\n $this->get('session')->set('resumenConsumo', $consumoObject);\n\n return $this->redirect($this->generateUrl('txinbometro_gasolina_show', array('id' => $entity->getId())));\n }\n\n\n return $this->render('TxinbometroBundle:Gasolina:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"function tipoCota($cod,$desc){\r\n\t $fCot = new fachada_tipoCota();\r\n\t\t$oCot = $fCot->tipoCota($cod,$desc);\r\n\t\treturn $oCot;\r\n\t}",
"static public function ctrCrearTipoContacto(){\n\t\tif(isset($_POST[\"accionTipoContacto\"]) && $_POST[\"accionTipoContacto\"] == \"crear\"){\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fechaActual = $fecha.' '.$hora;\n\t\t\t$tabla = 'vtama_tipo_contacto';\n\t\t\t$codTipoContacto = maximoCodigoTabla($tabla,'cod_tipo_contacto','');\n\t\t\t$datos = array(\"cod_tipo_contacto\" => $codTipoContacto,\n\t\t\t\t\t\t \"dsc_tipo_contacto\" => ms_escape_string(trim($_POST[\"nombreTipoContacto\"])),\n\t\t\t\t\t\t \"cod_usr_registro\" => $_SESSION[\"cod_trabajador\"],\n\t\t\t\t\t\t \"fch_registro\" => $fechaActual\n\t\t\t\t\t\t);\n\t\t\t$respuesta = ModeloTipoContacto::mdlIngresarTipoContacto($tabla,$datos);\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}",
"public function create()\n {\n //\n return view('admin.complainttype.create');\n }",
"public function create(){\n $model = new CiudadesModel();\n $data['nombre'] = strtoupper($this -> request -> getVar('nombre'));\n $data['pais'] = strtoupper($this -> request -> getVar('pais'));\n $reglas = ['nombre'=>'required|min_length[3]|is_unique[ciudades.nombre]'];\n if(!$this->validate($reglas)){\n return $this->failValidationError(implode($this->validator->getErrors()));\n }\n if($data['pais']==''){\n $data['pais']=NULL;\n }\n $model ->save($data);\n $response = [\n 'status'=>201,\n 'error'=>false,\n 'message'=> \"Ciudad creada correctamente\",\n 'data'=>$data\n ];\n return $this -> respondCreated($response); \n }",
"public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $pelicula = new Peliculas();\n $pelicula->id = $this->request->getPost(\"id\");\n $pelicula->nombre = $this->request->getPost(\"nombre\");\n $pelicula->idGenero = $this->request->getPost(\"id_genero\");\n $pelicula->year = $this->request->getPost(\"year\");\n $pelicula->idIdioma = $this->request->getPost(\"id_idioma\");\n \n\n if (!$pelicula->save()) {\n foreach ($pelicula->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"pelicula was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n }",
"public static function crearTipo_documento($tipo_documento){\n \n if (is_null($tipo_documento->getId_tipo_documento())) {\n $query = \"INSERT INTO tipo_documento(nombre,estado) VALUES (:nombre,:estado)\";\n } else {\n $query = \"UPDATE tipo_documento SET nombre=:nombre,estado=:estado WHERE id_tipo_documento=:id_tipo_documento\";\n }\n \n \n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $nombre = $tipo_documento->getNombre();\n $estado = $tipo_documento->getEstado();\n\n if (!is_null($tipo_documento->getId_tipo_documento())) {\n $id_tipo_documento = $tipo_documento->getId_tipo_documento();\n $resultado->bindParam(\":id_tipo_documento\", $id_tipo_documento);\n } \n \n $resultado->bindParam(\":nombre\", $nombre);\n $resultado->bindParam(\":estado\", $estado);\n \n if ($resultado->execute()) {\n return true;\n \n }\n\n return false;\n \n}",
"public function create()\n { \n return view('tipoorden.create', ['titulo' => 'Formulario de Crear', 'titulo_pagina' => 'Crear Tipo de Orden']);\n }",
"public function insertTipobeca() {\n $atributos = array($this->nOMBRE, $this->vALOR);\n //descomentarear la línea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->cODIGO , $this->nOMBRE , $this->vALOR );\n\n return $this->conexionTipobeca->insertarRegistro($atributos);\n }",
"public function actionCreate($id_projeto)\n {\n $model = new Orcamento();\n $model->id_projeto = $id_projeto;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $this->mensagens('success', 'Orçamento criado', 'Orçamento criado com sucesso.');\n return $this->redirect(['orcamento/index', 'id_projeto' => $model->id_projeto]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function crear() {\n $caracteristicas_pantalla = new caracteristicas_pantalla($_POST['data']);\n $caracteristicas_pantallaMapper = new caracteristicas_pantallaMapper();\n return $caracteristicas_pantallaMapper->crearcaracteristicas_pantalla($caracteristicas_pantalla);\n }",
"public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}",
"function create($user)\n {\n global $conf;\n\n $this->statut=(int) $this->statut;\n\n $sql = \"INSERT INTO \".MAIN_DB_PREFIX.\"adherent_type (\";\n $sql.= \"libelle\";\n $sql.= \", entity\";\n $sql.= \") VALUES (\";\n $sql.= \"'\".$this->db->escape($this->libelle).\"'\";\n $sql.= \", \".$conf->entity;\n $sql.= \")\";\n\n dol_syslog(\"Adherent_type::create\", LOG_DEBUG);\n $result = $this->db->query($sql);\n if ($result)\n {\n $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.\"adherent_type\");\n return $this->update($user);\n }\n else\n {\n $this->error=$this->db->error().' sql='.$sql;\n return -1;\n }\n }",
"public function create($id) //pasamos el id del cliente\n {\n \n }",
"public function newAction()\n {\n $entity = new Incapacidad();\n \n $em = $this->getDoctrine()->getManager();\n $request = $this->getRequest();\n $cadena= $request->get('id');\n $idEntidad = substr($cadena, 1);\n\n if($idEntidad!=0){\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($idEntidad);\n $entity->setPaciente($paciente);\n }\n else{\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->findAll();\n }\n \n \n \n $form = $this->createCreateForm($entity);\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function createCategoriaModel($tabla) {\r\n\t\t\r\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla (titulo) VALUES (:titulo)\"); \r\n\r\n\t\t//variables de apoyo\r\n\t\t$titulo = \"ARTESANIAS\"; \r\n\r\n\t\t$stmt->bindParam(\":titulo\",$titulo, PDO::PARAM_STR);\r\n\r\n\t\tif ($stmt->execute()) {\r\n\t\t\techo \"registro exitoso\"; \r\n\t\t}else{\r\n\t\t\techo \"no se pudo hacer el registro\"; \r\n\t\t}\r\n\t}",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create()\n {\n //\n\t\t\n }",
"public function actionCreateCode()\n {\n $model = new PromotionCode();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->code = strtoupper($model->code);\n $model->created_at = time();\n $model->save();\n\n if ($model->type === \"Free Product(s)\") {\n $model->refresh();\n return $this->redirect([\"promotions/update-code?id=$model->id\"]);\n }\n\n return $this->redirect(['promotions/codes']);\n } else {\n return $this->render('code/create', [\n 'model' => $model,\n ]);\n }\n }",
"function crear($datos){\t\t\r\n\t\t//Se guardan sus datos en un array asociativo, el cual cada id o key tiene que tener el mismo nombre de la columna de la tabla en la bd. Sino se hace asi se genera error\r\n\t\t$array = array(\r\n\t\t\t'name' => $datos[\"nombre\"],\r\n\t\t\t'idUsuario' => $datos[\"idUsuario\"],\r\n\t\t\t'hora_inicio' => $datos[\"horainicio\"],\r\n\t\t\t'hora_final' => $datos[\"horafinal\"]);\r\n\r\n\t\t$this->db->set('date_create', 'CURDATE()', FALSE);\r\n\t\t$this->db->set('time_create', 'curTime()', FALSE);\r\n\t\t$this->db->insert('turnos_laborales', $array);//Se llama a la funcion de insertar datos y se le pasa el array asociativo\t\r\n\t}",
"public function store(TipoRequest $request)\n {\n Tipo::create($request->all());\n return redirect()->route('tipos.index');\n }",
"public function create()\n {\n $data=$this->getFormData();\n list($specialty, $niv) = $data;\n return view('pages.classe.create',compact('specialty','niv'));\n }",
"public function create()\n {\n $getRow = Anggota::orderBy('id', 'DESC')->get();\n $rowCount = $getRow->count();\n\n $lastId = $getRow->first();\n $kode = \"AG00001\";\n\n if ($rowCount > 0) {\n if ($lastId->id < 9) {\n $kode = \"AG0000\".''.($lastId->id + 1);\n } else if ($lastId->id < 99) {\n $kode = \"AG000\".''.($lastId->id + 1);\n } else if ($lastId->id < 999) {\n $kode = \"AG00\".''.($lastId->id + 1);\n } else if ($lastId->id < 9999) {\n $kode = \"AG0\".''.($lastId->id + 1);\n } else {\n $kode = \"AG\".''.($lastId->id + 1);\n }\n }\n return view('anggota.create', compact('kode'));\n }",
"public function create(array $data)\n {\n // return NovoAgendamento::create([\n // 'email_requisitante' => $data['email_requisitante'],\n // 'data_visita' => $data['data_visita'],\n // 'hora_visita' => $data['hora_visita'],\n // 'observacao' => $data['observacao']\n // ]);\n }",
"public function creaCliente()\n {\n $id=null; // id del cliente, esto es lo que se debe guardar en la DB\n $this->cliente = $this->pasarela->customer()->create([\n 'firstName' => 'Mike',\n 'lastName' => 'Jones', \n 'company' => 'Jones Co.',\n 'email' => '[email protected]',\n 'phone' => '281.330.8004',\n 'fax' => '419.555.1235',\n 'website' => 'http://example.com'\n ]);\n $this->cliente=$this->cliente->customer->id; // asi es como se obtiene el id del cliente\n // se guarda en la DB\n $c=new Cliente();\n $c->token=$this->cliente;\n $c->save();\n }",
"public function Crear()\n {\n $this->visit('/deposito/articulo/')\n ->see('Listado de Articulos')\n ->click('Nuevo')\n ->seePageIs('/deposito/articulo/create')\n ->see('Nuevo Artículo')\n ->type('CodigoArticulo','codigo')\n ->type('NombreArticulo','nombre')\n ->type('DescripcionArticulo','descripcion')\n ->type('path/imagen','imagen')\n ->select('0' or '1','perecedero')\n ->see('Guardar')\n ->see('Cancelar')\n ->press('Guardar')\n ->seePageIs('/deposito/articulo/')\n ->see('CodigoArticulo')\n ->see('categoria')\n ->see('imagen')\n ->see('Editar')\n ->see('Eliminar');\n }",
"public function create()\n {\n \n //\n }",
"public function createNew();",
"public function actionCreate()\n {\n $model = new Ocorrencia();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t$this->updateOcorrenciaQueixa($_POST['Ocorrencia']['idQueixas'], $model->id);\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function crear($data)\n {\n try{\n $sql = \"INSERT INTO pedidos (estado,cliente,fecha) \n VALUES (?, ?, ?)\";\n\n $this->pdo->prepare($sql)\n ->execute(\n \tarray(\n \t\t$data->__GET('estado'), \n \t\t$data->__GET('cliente'), \n \t\t$data->__GET('fecha'),\n \t\t)\n \t);\n } catch (Exception $e) \n {\n \tdie($e->getMessage());\n }\n }",
"public function create()\n {\n //s\n }",
"public function create(){\n\t}",
"function guardar($nuevo)\n{ \n\t// En caso de que sea tipo usuario\n\tif (get_class($nuevo)=='Usuario') {\n\t\tnewUsuario($nuevo);\n\t}else if (get_class($nuevo)=='Producto') {\n\t\t// En caso de que sea tipo producto\n\t\tnewProducto($nuevo);\n\t}else if (get_class($nuevo)=='Venta') {\n\t\t// En caso de que sea tipo venta\n\t\tnewVenta($nuevo);\n\t}else{\n\t\techo \"<script type='javascript'>alert('Error al selecionar tipo.');<script>\";\n\t}\n}",
"public function store(Requests\\CreateCicloRequest $request)\n {\n //\n //$userID = Auth::user()->id;\n $data = $request->all();\n $activo = Input::get('activo');\n $publico = Input::get('publico');\n\n\n //dd($data);\n $ciclo = new Ciclo($data);\n if(empty($activo))\n $ciclo->activo = false;\n if(empty($publico))\n $ciclo->publico = false;\n\n\n $ciclo->save();\n //se crean las entregas para el ciclo\n $actividades = $ciclo->actividades()->get();\n foreach($actividades as $actividad)\n {\n $entrega = new Entrega();\n $entrega->actividad_id = $actividad->id;\n $entrega->ciclo_id = $ciclo->id;\n $entrega->save();\n }\n\n return redirect()->route('admin.ciclos.index');\n }",
"public function run(ProcedimentoTecnico $procedimentoTecnico)\n {\n $procedimentoTecnico->create([\n 'fk_tecnico_saude'=>2,\n 'fk_procedimento'=>2\n\n ]\n );\n\n $procedimentoTecnico->create([\n 'fk_tecnico_saude'=>1,\n 'fk_procedimento'=>1\n\n ]\n );\n\n }",
"public function create()\n {\n //\n return view('admin.nom.prefcontrtypes.create');\n }",
"public function create($input)\n\t{\n\n\n\t $data = array(\n 'id_centro' => $input['id_centro'],\n 'id_director' => $input['id_director'],\n 'id_deposito' => $input['id_deposito'],\n 'fecha_registro' => date('Y-m-d'),\n 'estatus' => 'Pendiente',\n 'created_on' => now(),\n 'updated_on' => now()\n\n\n );\n\n\n return $this->insert($data);\n }",
"public function create()\n {\n $proveedores = DB::table('proveedores')\n ->where('estado', '=', 1)\n ->select('id', 'codprov', 'razons')\n ->get();\n //busca el id del primer proveedor activo\n $idProvActivo = DB::table('proveedores')\n ->select('id')\n ->take(1)\n ->where('estado', '=', 1)\n ->first();\n //guarda id en variable que se usará como parámetro\n $param = $idProvActivo->id;\n //selecciona por defecto los items del proveedor activo cargado\n $categorias=DB::table('categorias as c')\n ->join('proveedores as p', 'c.idprov', 'p.id')\n ->select('c.id', 'c.codcate', 'c.nomcate')\n ->where('c.estado', '=', 1)\n ->where('c.idprov', '=', $param)\n ->orderby('c.codcate', 'ASC')\n ->get();\n //devuelve datos\n return view('maestros.articulo.create', [\n \"proveedores\" => $proveedores,\n \"categorias\" => $categorias\n ]\n );\n }",
"public function crear($datos)\r\n {\r\n try\r\n {\r\n // remplazar por el nombre de la tabla y los campos correspondientes\r\n //se deben poner signos de interrogacion segun la cantidad de campos que tenga la tabla\r\n $consulta = \"INSERT INTO xxnombretabla (xcampo1 , xcampo2, etc..) VALUES (?,?,etc..)\";\r\n $objeto = $this->PDO->prepare($consulata);\r\n //se debe llenar el array con los atributos de la clase en orden segun corresponda y coincida con los de la tabla\r\n $objeto->execute(array( $datos->__GET('xid:clase'),$datos->__GET('xatributo2:clase'),$datos->__GET('xatributo3:clase')));\r\n\r\n } catch (Exception $e) {\r\n die($e->getMessage());\r\n }\r\n\r\n }",
"public function crear( $app, $modelo, $transaccion, $vista, $tabla = null, $item_sugerencia_cliente = null )\n { \n if ( is_null($tabla) )\n {\n $tabla = '';\n }\n\n if ( is_null($tabla) )\n {\n $item_sugerencia_cliente = '';\n }\n \n $lista_campos = ModeloController::get_campos_modelo($modelo,'','create');\n $cantidad_campos = count($lista_campos);\n\n $lista_campos = ModeloController::personalizar_campos($transaccion->id, $transaccion, $lista_campos, $cantidad_campos, 'create', null);\n\n $modelo_controller = new ModeloController;\n $acciones = $modelo_controller->acciones_basicas_modelo( $modelo, '' );\n \n $form_create = [\n 'url' => $acciones->store,\n 'campos' => $lista_campos\n ];\n\n $id_transaccion = 8;// 8 = Recaudo cartera\n\n $msj_resolucion_facturacion = '';\n switch ( $transaccion->id )\n {\n case 25: // Factura compras\n $motivos = TesoMotivo::opciones_campo_select_tipo_transaccion( 'Pago proveedores' );\n break;\n case 48: // Doc. Soporte en adquisiciones no obligados a facturas (Compras)\n $motivos = TesoMotivo::opciones_campo_select_tipo_transaccion( 'Pago proveedores' );\n break;\n case 23: // Factura ventas\n $motivos = TesoMotivo::opciones_campo_select_tipo_transaccion( 'Recaudo cartera' );\n break;\n \n default:\n $motivos = TesoMotivo::opciones_campo_select_tipo_transaccion( 'Recaudo cartera' );\n break;\n }\n \n $medios_recaudo = TesoMedioRecaudo::opciones_campo_select();\n $cajas = TesoCaja::opciones_campo_select();\n $cuentas_bancarias = TesoCuentaBancaria::opciones_campo_select();\n\n $miga_pan = $this->get_array_miga_pan( $app, $modelo, 'Crear: '.$transaccion->descripcion );\n \n return view( $vista, compact( 'form_create','miga_pan','tabla','id_transaccion','motivos','medios_recaudo','cajas','cuentas_bancarias', 'item_sugerencia_cliente', 'msj_resolucion_facturacion' ) );\n }",
"public function crearusuario($codigo,$nombre,$precio,$cantidad){\r\n//Preparamos la conexion a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n//Preparamos la sentencia con parametros:\r\n\t$sql=\"insert into usuario (codigo,nombre,precio,cantidad) values(?,?,?,?)\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos y pasamos los parametros:\r\n\ttry{\r\n\t\t$consulta->execute(array($codigo,$nombre,$precio,$cantidad));\r\n\t} catch (PDOException $e){\r\n\t\tDatabase::disconnect();\r\n\t\tthrow new Exception($e->getMessage());\r\n\t}\r\n\tDatabase::disconnect();\r\n}",
"public function create(){\n\n //\n }",
"public function createAction()\n {\n $entity = new Titeur();\n $request = $this->getRequest();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->set('titeur_id', $entity->getId());\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfant_new'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }",
"public function create()\n {\n //\n $acceso_usuario = new SysAccesoUsuarioModel();\n if($acceso_usuario->getAccesoValido(6, Auth::user()->fkid_perfil)){\n $art_tiposarticulos = new ArtTipoArticuloModel();\n $tiposarticulos = $art_tiposarticulos->getTiposArticulos();\n $aprobaciones = ArtAprobacionModel::all();\n return view('tiposarticulos.create', compact('tiposarticulos', 'aprobaciones')); \n }\n else{\n return redirect('home');\n }\n }",
"public function create( $value, $type = 'standard' );",
"public function actionCrear() {\n $model = new Factura();\n $atributos_viejos = $model->attributes;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n StaticMembers::RegistrarTraza($model, $atributos_viejos, 'crear', $model->numero);\n Yii::$app->session->setFlash('success', 'Elemento creado correctamente', false);\n return $this->redirect(['inicio', 'id' => $model->id, 'id_devolucion' => $model->id_devolucion]);\n } else {\n return $this->render('crear', ['model' => $model,]);\n }\n }",
"public function executeNew(sfWebRequest $request)\n {\n $cuestionario = new ContenidoTipoCuestionario();\n $cuestionario->setContenido_id($request->getParameter('contenido_id'));\n $this->form = new ContenidoTipoCuestionarioForm($cuestionario);\n }",
"public function create()\n {\n //\n }",
"public function create(Request $request)\n {\n TypesUtilisateur::create();\n }",
"public function createAction()\n {\n $entity = new Categoria();\n $request = $this->getRequest();\n $form = $this->createForm(new CategoriaType(), $entity);\n $form->bindRequest($request);\n \n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n $this->get(\"session\")->setFlash('success',\"Categoria registrada.\");\n return $this->redirect($this->generateUrl('categoriaHome'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }"
] | [
"0.675842",
"0.6720038",
"0.6648065",
"0.6618183",
"0.64298964",
"0.6349711",
"0.63433063",
"0.6314298",
"0.62908506",
"0.62894315",
"0.6286094",
"0.62650263",
"0.6212332",
"0.6148976",
"0.6126903",
"0.61113286",
"0.61090475",
"0.6106455",
"0.6077487",
"0.604345",
"0.6025252",
"0.60244036",
"0.60149056",
"0.59676576",
"0.59584653",
"0.5958015",
"0.59517914",
"0.5950205",
"0.59488755",
"0.59468424",
"0.59468424",
"0.59468424",
"0.59468424",
"0.5940843",
"0.5931226",
"0.59301835",
"0.5919941",
"0.5908425",
"0.59008324",
"0.5895423",
"0.5893834",
"0.5892185",
"0.58915687",
"0.5888997",
"0.5885135",
"0.58770424",
"0.5871818",
"0.58703226",
"0.58691615",
"0.5859608",
"0.5854431",
"0.58543634",
"0.5850654",
"0.58495796",
"0.583923",
"0.5838101",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.5837006",
"0.58338666",
"0.5830085",
"0.5824087",
"0.58218586",
"0.5812671",
"0.5812285",
"0.58111477",
"0.5809667",
"0.580722",
"0.58066356",
"0.5803994",
"0.580034",
"0.5799832",
"0.5799239",
"0.57979834",
"0.5796934",
"0.57941264",
"0.57934904",
"0.5787401",
"0.57856023",
"0.5782313",
"0.5780202",
"0.5774884",
"0.5773418",
"0.57733434",
"0.5770403",
"0.5768108",
"0.576804",
"0.57649034",
"0.5755885",
"0.5753608",
"0.57502764",
"0.57431877"
] | 0.74170166 | 0 |
Saves a tipocodigo edited | public function saveAction()
{
if (!$this->request->isPost()) {
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'index'
]);
return;
}
$idTipoCodigo = $this->request->getPost("idTipoCodigo");
$tipocodigo = Tipocodigo::findFirstByidTipoCodigo($idTipoCodigo);
if (!$tipocodigo) {
$this->flash->error("Tipo de Código no Existe " . $idTipoCodigo);
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'index'
]);
return;
}
$tipocodigo->Descripciontipo = $this->request->getPost("descripcionTipo");
$tipocodigo->LongitudCodigo = $this->request->getPost("longitudCodigo");
$tipocodigo->Estadoregistro = $this->request->getPost("estadoRegistro");
if (!$tipocodigo->save()) {
foreach ($tipocodigo->getMessages() as $message) {
$this->flash->error($message);
}
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'edit',
'params' => [$tipocodigo->idTipoCodigo]
]);
return;
}
$this->flash->success("Tipo de código se Actualizó Satisfactoriamente");
$this->dispatcher->forward([
'controller' => "tipocodigo",
'action' => 'index'
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Tipo_documento $tipo_documento)\n {\n //\n }",
"function act_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}",
"public function editar($tipo, $id){\n\t\tif ($tipo == \"Expediente\") {\n\t\t\t$paciente = Paciente::find($id);\n\t\t\t$pacienteAnalisis = new PacienteAnalisis;\n\t\t\t$analisis = $tipo;\n\t\t}\n\t\t// Cuando se llama de un analisis\n\t\telse{\n\t\t\t$pacienteAnalisis = PacienteAnalisis::find($id);\n\t\t\t$paciente = Paciente::find($pacienteAnalisis->paciente_id);\n\t\t\t$analisis = $pacienteAnalisis->analisis;\n\t\t}\n\n\t\t$paciente->accion = \"Editar\";\n\n\t\treturn view('dashboard.views.expedientes.crear', compact('paciente', 'pacienteAnalisis', 'analisis'));\n\t}",
"public function edit(TipoAusencia $tipoAusencia)\n {\n //\n }",
"public function editar()\n\t{\n\t\t$estado = new Estado();\n\t\t$estado->idestado = $_POST['idestado'];\n\t\t$estado->nombre = $_POST['nombreeditar'];\n\t\t$estado->poblacion_hombres = $_POST['poblacionHeditar'];\n\t\t$estado->poblacion_mujeres = $_POST['poblacionMeditar'];\n\t\t$estado->poblacion_total = $_POST['poblacionTeditar'];\n\t\t$estado->edad_promedio = $_POST['edadPeditar'];\n\t\t$estado->update();\n\t\t//redireccionamos a la vista agregarEstado\n\t\theader(\"location: index.php?controller=Direccion&action=agregarEstado\");\n\t}",
"public function edit(TipoProductos $tipoProductos)\n {\n //\n }",
"public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }",
"function act_tipo_salida(){\n\t\t$u= new Tipo_salida();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Salida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}",
"public function edit(TipoBien $tipoBien)\n {\n //\n }",
"public function Editar(){\n \n // Istancia a classe \"Funcionario\" do arquivo \"funcionario_class\".\n $funcionario = new Funcionario();\n $endereco = new Endereco();\n \n // Pega o id do registro e os demais dados para fazer uma atualização do mesmo.\n // Variáevis do funcionário.\n $funcionario->idFuncionario = $_GET['id'];\n $funcionario->nome = $_POST['txt_nome'];\n $funcionario->sobrenome = $_POST['txt_sobrenome'];\n $funcionario->rg = $_POST['txt_rg'];\n $funcionario->cpf = $_POST['txt_cpf'];\n $funcionario->usuario = $_POST['txt_usuario'];\n $funcionario->senha = $_POST['txt_senha'];\n $funcionario->idNivelFuncionario = $_POST['cbx_nivelFuncionario'];\n $funcionario->idEndereco = $_GET['idEnd'];\n // Variáveis do endereço do funcionário.\n $endereco->bairro = $_POST['txt_bairro'];\n $endereco->logradouro = $_POST['txt_logradouro'];\n $endereco->cep = $_POST['txt_cep'];\n $endereco->cidade = $_POST['cbx_cidade'];\n $endereco->idEndereco = $_GET['idEnd'];\n \n // Chama o metodo para atualizar o endereço do funcionário.\n $sucess = $endereco::Update($endereco);\n \n // Chama o metodo para atualizar o funcionário apenas se a atualização do endereço dele foi bem sucedida.\n if($sucess == 1){\n $funcionario::Update($funcionario);\n }\n \n }",
"public function edit(anteproyecto $anteproyecto)\n {\n //\n }",
"public function editar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n \n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $data = [\n 'especialidadToEditId' => trim($_POST['especialidadToEditId']),\n 'especialidadToEditNombre' => trim($_POST['especialidadToEditNombre'])\n ];\n \n // Validar carga de especialidadToEditId\n if(empty($data['especialidadToEditId'])){\n $data['especialidadToEdit_error'] = 'No se ha seleccionado la especialidad a editar';\n }\n\n // Validar carga de especialidadToEditId\n if(empty($data['especialidadToEditNombre'])){\n $data['especialidadToEdit_error'] = 'No se permite editar a un título vacío';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['especialidadToEdit_error'])){\n // Crear especialidad\n if($this->especialidadModel->actualizarEspecialidad($data)){\n flash('especialidad_success', 'Especialidad editada exitosamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['especialidadToEdit_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }",
"function saveEditArticulo(){\n\t\t$r = $this->ar->updateArticulo($this->id,$this->nombre,$this->descripcion);\n\t\tif($r=='true'){\n\t\t\t$msg = ARTICULO_EDITADO;\n\t\t}else{\n\t\t\t$msg = ERROR_EDIT_ARTICULO;\n\t\t}\n\t\treturn $msg;\t\n\t}",
"public function editar(){\n\t\t\n\t\t$this->form_validation->set_rules('resposta', 'RESPOSTA', 'trim');\n\t\tif ($this->form_validation->run()==TRUE):\n\t\t$dados = elements(array('resposta'), $this->input->post());\n\t\t$this->Comentarios->do_update($dados, array('id_comentario'=>$this->input->post('idcomentario')));\n\t\tendif;\n\t\tset_tema('titulo', 'Resposta de Comentário');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'editar'));\n\t\tload_template();\n\t}",
"public function editar() {\n\t\t$POST = array();\n\n\t\t\t##apagando indice de tokenrequest pois ele não existe na tabela de categorias\n\t\tunset($this->request->data['TokenRequest']);\t\n\n\t\t$POST = array('UsuarioCliente'=>$this->request->data);\t\n\t\tif ($this->UsuarioCliente->save($POST)) \n\t\t{\n\t\t\t$this->Message = 'Usuario editado com sucesso';\n\t\t\t$this->Return = true;\t\n\t\t} \n\n\t\telse \n\t\t{\n\t\t\t$this->Message = 'Ocorreu um erro na edição de seu Usuario.';\n\t\t\t$this->Return = false;\t\n\t\t}\n\n\t\t$this->EncodeReturn();\t\n\t}",
"function main_save($type='edit')\n\t{\n\t\t$id = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($this->ipsclass->input['cf_title'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"You must enter a field title.\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// check-da-motcha\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif( !$id )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"Could not resolve the field id\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$content = \"\";\n\t\t\n\t\tif ( $_POST['cf_content'] != \"\")\n\t\t{\n\t\t\t$content = $this->func->method_format_content_for_save( $_POST['cf_content'] );\n\t\t}\n\t\t\n\t\t$db_string = array( 'cf_title' => $this->ipsclass->input['cf_title'],\n\t\t\t\t\t\t 'cf_desc' => $this->ipsclass->input['cf_desc'],\n\t\t\t\t\t\t 'cf_content' => $this->ipsclass->txt_stripslashes($content),\n\t\t\t\t\t\t 'cf_type' => $this->ipsclass->input['cf_type'],\n\t\t\t\t\t\t 'cf_not_null' => $this->ipsclass->input['cf_not_null'],\n\t\t\t\t\t\t 'cf_max_input' => $this->ipsclass->input['cf_max_input'],\n\t\t\t\t\t\t 'cf_input_format' => $this->ipsclass->input['cf_input_format'],\n\t\t\t\t\t\t 'cf_topic'\t\t => $this->ipsclass->input['cf_topic'],\n\t\t\t\t\t\t 'cf_search'\t\t => $this->ipsclass->input['cf_search'],\n\t\t\t\t\t\t );\n\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->DB->do_update( 'downloads_cfields', $db_string, 'cf_id=' . $id );\n\t\t\t\n\t\t\t$this->rebuild_cache();\n\t\t\t\n\t\t\t$this->ipsclass->main_msg = \"Custom Field Edited\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'MAX(cf_position) as newpos',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from' => 'downloads_cfields' ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\t\t\t\n\t\t\t$max = $this->ipsclass->DB->fetch_row();\n\t\t\t\n\t\t\t$db_string['cf_position'] = $max['newpos']+1;\n\t\t\t\n\t\t\t$this->ipsclass->DB->do_insert( 'downloads_cfields', $db_string );\n\t\t\t\n\t\t\t$id = $this->ipsclass->DB->get_insert_id();\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_add_field( 'downloads_ccontent', \"field_{$id}\", 'text' );\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_optimize_table( 'downloads_ccontent' );\n\t\t\t\n\t\t\t$this->rebuild_cache();\n\t\t\t\n\t\t\t$this->ipsclass->main_msg = \"Custom Field Added\";\n\t\t}\n\t\t\n\t\tif( is_array($this->ipsclass->input['cats_apply']) AND count($this->ipsclass->input['cats_apply']) )\n\t\t{\n\t\t\t$did_at_least_one = 0;\n\t\t\t\n\t\t\tforeach( $this->lib->cat_lookup as $cid => $cdata )\n\t\t\t{\n\t\t\t\t$cfields = explode( ',', $cdata['ccfields'] );\n\t\t\t\t\n\t\t\t\tif( !in_array( $id, $cfields ) )\n\t\t\t\t{\n\t\t\t\t\tif( in_array( $cid, $this->ipsclass->input['cats_apply'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push( $cfields, $id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'downloads_categories', array( 'ccfields' => implode( ',', $cfields ) ), 'cid=' . $cid );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$did_at_least_one = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( !in_array( $cid, $this->ipsclass->input['cats_apply'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_cfields = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $cfields as $fid )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $fid != $id )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_cfields[] = $fid;\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$this->ipsclass->DB->do_update( 'downloads_categories', array( 'ccfields' => implode( ',', $new_cfields ) ), 'cid=' . $cid );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$did_at_least_one = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( $did_at_least_one )\n\t\t\t{\n\t\t\t\t$this->lib->rebuild_cat_cache();\n\t\t\t}\n\t\t}\n\n\t\t$this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code.'&req=customfields' );\n\t}",
"public function editarAportante(){ \n if(isset($_POST[\"cedulaE\"]))\n {\n $aportante=new Aportante($this->adapter);\n $aportante->setAportanteID($_POST[\"idE\"]);\n $aportante->setCedula($_POST[\"cedulaE\"]);\n $aportante->setNames($_POST[\"namesE\"]);\n $aportante->setLastnames($_POST[\"lastnamesE\"]);\n $aportante->setPhoneHome($_POST[\"phoneHomeE\"]);\n\t\t\t$aportante->setPhoneMobile($_POST[\"phoneMobileE\"]);\n\t\t\t$aportante->setEmail($_POST[\"emailE\"]);\n $save=$aportante->update(); // Manda a actualizar la moto en el modelo\n } \n $this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }",
"public function edit(comentario $comentario)\n {\n //\n }",
"public function editar() {\n\t\t$POST = array();\n\n\t\tif(!empty($this->request->data['img']))\n\t\t{\t\t\t\t\t\n\t\t\t$this->request->data['img'] = $this->DIRUPLOAD.$this->request->data['img'];\t\t\t\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\t$imgAtual = $this->Produto->query(sprintf(\"Select img FROM produtos where id = %d\", $this->request->data['id']));\n\t\t\t$this->request->data['img'] = $imgAtual[0]['produtos']['img'];\n\t\t}\t\t\n\n\t\t##apagando indice de tokenrequest pois ele não existe na tabela de categorias\n\t\tunset($this->request->data['TokenRequest']);\t\t\t\n\n\t\t$POST = array('Produto'=>$this->request->data);\t\n\t\tif ($this->Produto->save($POST)) \n\t\t{\n\t\t\t$this->Message = 'Produto editado com sucesso';\n\t\t\t$this->Return = true;\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$this->Message = 'Ocorreu um erro na edição de seu produto.';\n\t\t\t$this->Return = false;\t\n\t\t}\n\n\t\t$this->EncodeReturn();\t\n\t}",
"function editar_salida_traspasos(){\n\t\t$varP=$_POST;\n\t\t$line=$this->uri->segment(4);\n\t\t$traspasos_id=$varP['traspaso_id'.$line];\n\t\t$pr= new Salida();\n\t\t$pr->get_by_id($varP['id'.$line]);\n\t\t$pr->usuario_id=$GLOBALS['usuarioid'];\n\t\t$pr->empresas_id=$GLOBALS['empresaid'];\n\t\t$pr->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$pr->cproductos_id=$varP['producto'.$line];\n\t\t$pr->cantidad=$varP['unidades'.$line];\n\t\t$pr->fecha=date(\"Y-m-d H:i:s\");\n\t\t$pr->trans_begin();\n\t\tif($pr->save()) {\n\t\t\tif($varP['id'.$line]==0){\n\t\t\t\t$ts= new Traspaso_salida();\n\t\t\t\t$ts->salidas_id=$pr->id;\n\t\t\t\t$ts->traspasos_id=$traspasos_id;\n\t\t\t\t$ts->trans_begin();\n\t\t\t\t$ts->save();\n\t\t\t\tif ($ts->trans_status() === FALSE) {\n\t\t\t\t\t// Transaction failed, rollback\n\t\t\t\t\t$ts->trans_rollback();\n\t\t\t\t\t$pr->trans_rollback();\n\t\t\t\t\t// Add error message\n\t\t\t\t\techo form_hidden('traspasos_id', \"$traspasos_id\"); echo \"Error: no guardado\";\n\t\t\t\t\t//\t\techo '<button type=\"submit\" style=\"display:none;\" id=\"boton1\">Intentar de nuevo</button><br/>';\n\t\t\t\t} else {\n\t\t\t\t\t$pr->trans_commit();\n\t\t\t\t\t$ts->trans_commit();\n\t\t\t\t}\n\t\t\t}\n\t\t\techo form_hidden('id'.$line, \"$pr->id\"); echo form_hidden('traspaso_id'.$line, \"$traspasos_id\"); echo \"<a href=\\\"javascript:borrar_detalle($line)\\\"><img src=\\\"\".base_url().\"images/trash1.png\\\" width=\\\"20px\\\" title=\\\"Borrar Detalle\\\"/></a><img src=\\\"\".base_url().\"images/ok.png\\\" width=\\\"20px\\\" title=\\\"Guardado\\\"/>\";\n\t\t} else {\n\t\t\t$pr->trans_rollback();\n\t\t\tshow_error(\"Error al Editar el Traspaso, regresar a la página anterior.\");\n\t\t}\n\t}",
"public function editar()\n {\n if (AuthHelper::obtenerUsuarixAdmin() == 2){\n\n $id = $_POST['pais'];\n $nombre = $_POST['name'];\n \n if (!empty($_POST['name'])) {\n \n //busco en la tabla de paises alguno que coincida con el nombre puesto por el usuario.\n $paisDb = $this->modelpaises->obtenerPais($nombre);\n //y si no se obtuvo un pais en la base de datos que coincida\n //con lo ingresado por el usuario ahi si lo agrego.\n if (empty($paisDb)) {\n \n $this->modelpaises->editar($id, $nombre);\n header(\"Location: \" . BASE_URL . 'home');\n } else\n $this->mostrarEditar($id, \"Ya existe un pais con ese nombre\");\n } else\n $this->mostrarEditar($id, \"Error,nombre vacio\");\n } else {\n $this->view->mostrarError(\"Acceso denegado\");\n }\n }",
"public function edit(ClasseEscola $classeEscola)\n {\n //\n }",
"function edit($tiporespuesta_id)\r\n { \r\n $data['sistema'] = $this->sistema;\r\n //if($this->acceso(115)){\r\n $data['page_title'] = \"Tipo Respuesta\";\r\n // check if the tipo_servicio exists before trying to edit it\r\n $data['tipo_respuesta'] = $this->Tipo_respuesta_model->get_tipo_respuesta($tiporespuesta_id);\r\n\r\n if(isset($data['tipo_respuesta']['tiporespuesta_id']))\r\n {\r\n $this->load->library('form_validation');\r\n $this->form_validation->set_rules('tiporespuesta_descripcion','Descripción es requerida','trim|required', array('required' => 'Este Campo no debe ser vacio'));\r\n\r\n if($this->form_validation->run()) \r\n {\r\n $params = array(\r\n 'tiporespuesta_descripcion' => $this->input->post('tiporespuesta_descripcion'),\r\n //'estado_id' => $this->input->post('estado_id'),\r\n );\r\n\r\n $this->Tipo_respuesta_model->update_tipo_respuesta($tiporespuesta_id,$params); \r\n redirect('tipo_respuesta/index');\r\n }\r\n else\r\n {\r\n /*$this->load->model('Estado_model');\r\n $data['all_estado'] = $this->Estado_model->get_all_estado_activo_inactivo();*/\r\n $data['_view'] = 'tipo_respuesta/edit';\r\n $this->load->view('layouts/main',$data);\r\n }\r\n }\r\n else\r\n show_error('Tipo respuesta que estas intentando editar no existe.');\r\n //}\r\n }",
"function alta_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}",
"public function edit(Comentario $comentario)\n {\n //\n }",
"function tipoedital($cod,$desc){\r\n\t\t$fTpEdital = new fachada_tipoedital();\r\n\t\t$oTipoEdital = $fTpEdital->tipoedital($cod,$desc);\r\n\t\treturn $oTipoEdital;\r\n\t}",
"public function edit(Type $type)\n {\n //\n }",
"public function edit(Type $type)\n {\n //\n }",
"public function edit(Type $type)\n {\n //\n }",
"public function saveType()\n {\n }",
"public function editar()\n {\n }",
"public function saveEntidad(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_entidades SET entidad = \"%s\" WHERE entidad_id = %d',\n $this->entidad,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_entidades(entidad) VALUES (\"%s\")',\n $this->usuario);\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }",
"protected function editar()\n {\n }",
"function alta_tipo_salida(){\n\t\t$u= new Tipo_salida();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Salida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}",
"public function actionEditPrecioUnitario()\r\n {\r\n Yii::import('booster.components.TbEditableSaver');\r\n $es = new TbEditableSaver('DetalleVenta');\r\n $es->scenario='update';\r\n// /$_cantidad= $es->value;\r\n $es->onBeforeUpdate= function($event) {\r\n\r\n $model=$this->loadModel(yii::app()->request->getParam('pk')); //obteniendo el Model de detalleCompra\r\n \r\n //incrementando el credito disponible para para el cliente\r\n Cliente::model()->actualizarCreditoDisponible($model, 0);\r\n \r\n $_precioUnitario= yii::app()->request->getParam('value');\r\n \r\n $_total= round($model->cantidad*$_precioUnitario,2);//calculando el subtotal\r\n $_subtotal= $_subtotal= Producto::model()->getSubtotal($_total); //round($_total/((int)Yii::app()->params['impuesto']*0.01+1),2); //calculando impuesto\r\n $_impuesto= round($_total-$_subtotal,2); //calculando total\r\n \r\n $event->sender->setAttribute('subtotal', $_subtotal);//Actualizando Cantidad\r\n $event->sender->setAttribute('impuesto', $_impuesto);//Actualizando impuesto\r\n $event->sender->setAttribute('total', $_total); //actualizando total\r\n \r\n };\r\n $es->onAfterUpdate=function($event){\r\n $model=$this->loadModel(yii::app()->request->getParam('pk'));\r\n //actualizando el credito disponible para el cliente.\r\n Cliente::model()->actualizarCreditoDisponible($model, 1);\r\n };\r\n \r\n $es->update();\r\n }",
"protected function _save_add_edit() {\n\t\t\t$this->Dossierpcg66->begin();\n\n\t\t\tif ( !Hash::get($this->request->data, 'Dossierpcg66.etatdossierpcg') ) {\n\t\t\t\t$this->request->data['Dossierpcg66']['etatdossierpcg'] = 'attaffect';\n\t\t\t}\n\n\t\t\t$saved = $this->Dossierpcg66->saveAll( $this->request->data, array( 'validate' => 'first', 'atomic' => false ) );\n\t\t\t$etatdossierpcg = Hash::get($this->viewVars, 'dossierpcg66.Dossierpcg66.etatdossierpcg');\n\t\t\t$etatFinal = in_array( $etatdossierpcg, array( 'annule', 'traite', 'decisionvalid', 'transmisop' ) );\n\t\t\t$id = $saved ? $this->Dossierpcg66->id : Hash::get($this->viewVars, 'dossierpcg66.Dossierpcg66.id');\n\t\t\t$decisiondefautinsertionep66_id = Hash::get(\n\t\t\t\t$this->viewVars, 'dossierpcg66.Dossierpcg66.decisiondefautinsertionep66_id'\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * INFO : Passe l'etat d'une EP Audition transformé en EP Parcours\n\t\t\t * en \"traité\" si EP Parcours n'est pas traité alors que le Dossierpcg est validé.\n\t\t\t * En pratique ça n'arrive jamais et je ne comprend pas l'utilité de ce processus...\n\t\t\t * Ne semble pas avoir de conséquences.\n\t\t\t */\n\t\t\tif ( $saved && $etatFinal && $decisiondefautinsertionep66_id ) {\n\t\t\t\t$saved = $this->Dossierpcg66->WebrsaDossierpcg66->updateEtatPassagecommissionep( $decisiondefautinsertionep66_id );\n\t\t\t}\n\n\t\t\tif( $saved && $this->_saveFichiers($id) ) {\n\t\t\t\t$this->Dossierpcg66->commit();\n\t\t\t\t$this->Jetons2->release( $this->viewVars['dossier_id'] );\n\t\t\t\t$this->Session->setFlash( 'Enregistrement effectué', 'flash/success' );\n\t\t\t\t$this->redirect( array( 'controller' => 'dossierspcgs66','action' => 'index', $this->viewVars['foyer_id'] ) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$id && $this->set('fichiers', $this->Fileuploader->fichiers( $id ));\n\t\t\t\t$this->Dossierpcg66->rollback();\n\t\t\t\t$this->Session->setFlash( 'Erreur lors de l\\'enregistrement', 'flash/error' );\n\t\t\t}\n\t\t}",
"public function edit(TipoAtributo $tipoAtributo)\n {\n //\n }",
"public function alterarTipoServico($tipoServico){\r\n \r\n try {\r\n \r\n $this->validarDadosTipoServico($tipoServico);\r\n return $this->tipoServicoDAO->update($tipoServico);\r\n } catch (DataException $e) {\r\n throw $e; \r\n } \r\n }",
"public function edit(Cobro $cobro)\n {\n //\n }",
"function Editar($id, $fecha_emision, $condicion_pago, $estado, $fecha_pago, $observaciones_pago, $tipo) {\n $fecha=explode(\"-\", $fecha_emision);\n $fecha_vencimiento=date(\"Y-m-d\",mktime(0,0,0,$fecha[1],$fecha[2]+$condicion_pago,$fecha[0]));\n $q=\"UPDATE \".self::$table.\"\nSET condicionpago='$condicion_pago', fechaemision='$fecha_emision',\nfechavencimiento='$fecha_vencimiento', estado='$estado', fecha_pago='$fecha_pago',\nobservaciones_pago='$observaciones_pago', tipo='$tipo'\nWHERE id=$id\";\n return DBManager::execute($q);\n }",
"public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }",
"public function edit(Procedencia $procedencia)\n {\n //\n }",
"public function saveNota(){\t\t \r\n\t\t$this->notas_model->saveNotas($_POST);\r\n\t}",
"function edit_save() {\n $user = $this->ion_auth->user()->row();\n $data['profil'] = $this->input->post('profil', true);\n $data['pengajaran'] = $this->input->post('pengajaran', true);\n $data['riset'] = $this->input->post('riset', true);\n $data['publikasi'] = $this->input->post('publikasi', true);\n $data['pengalaman'] = $this->input->post('pengalaman', true);\n $data['pendidikan'] = $this->input->post('pendidikan', true);\n $data['fname'] = $this->input->post('fname', true);\n $data['lname'] = $this->input->post('lname', true);\n //print_r($data['profil']);\n\n $this->model_portofolio->update_data_portofolio($user->id, 1, $data['profil']);\n $this->model_portofolio->update_data_portofolio($user->id, 2, $data['pengajaran']);\n $this->model_portofolio->update_data_portofolio($user->id, 3, $data['riset']);\n $this->model_portofolio->update_data_portofolio($user->id, 4, $data['publikasi']);\n $this->model_portofolio->update_data_portofolio($user->id, 5, $data['pengalaman']);\n $this->model_portofolio->update_data_portofolio($user->id, 6, $data['pendidikan']);\n $this->model_portofolio->update_name($user->id,$data['fname'],$data['lname']);\n //redirect('portofolio/user');\n }",
"public function editar($codigo)\n {\n echo \"<br>Editar:\".$codigo;\n $parametros = DB::table('parametros')->get();\n $items = DB::table('menus')->get();\n $infoCabecera_ = DB::table('cotizacioninternas')\n ->where('codigo',$codigo)\n ->get(); \n $infoCabecera = [\n 'codigo' => $infoCabecera_[0]->codigo,\n 'usuario' => $infoCabecera_[0]->usuario,\n 'total' => $infoCabecera_[0]->total,\n 'observaciones' => $infoCabecera_[0]->descripcion,\n 'nombre' => $infoCabecera_[0]->nombre];\n\n\n $carritoCotizacion = DB::table('cotizacioninternas_detalle')\n ->where('codigo',$codigo)\n ->get(); \n return view(\"admin.adminCotizacionInternoEditar\",compact('parametros','items','infoCabecera','carritoCotizacion')); \n \n \n }",
"public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $pelicula = Peliculas::findFirstByid($id);\n\n if (!$pelicula) {\n $this->flash->error(\"pelicula does not exist \" . $id);\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $pelicula->id = $this->request->getPost(\"id\");\n $pelicula->nombre = $this->request->getPost(\"nombre\");\n $pelicula->idGenero = $this->request->getPost(\"id_genero\");\n $pelicula->year = $this->request->getPost(\"year\");\n $pelicula->idIdioma = $this->request->getPost(\"id_idioma\");\n \n\n if (!$pelicula->save()) {\n\n foreach ($pelicula->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'edit',\n 'params' => [$pelicula->id]\n ]);\n\n return;\n }\n\n $this->flash->success(\"pelicula was updated successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n }",
"public function edita()\n\t {\t\n\t\t$id=$_REQUEST['id'];\n\t\t$car=$_REQUEST['car'];\n\t\t$nom=$_REQUEST['nom'];\n\t\t$cod=$_REQUEST['cod'];\n\t\t$niv=$_REQUEST['niv'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$cur_data=array();\n\t\t$cur_data['id_curso']=$id;\n\t\t$cur_data['id_carrera']=$car;\n\t\t$cur_data['nombre']=$nom;\n\t\t$cur_data['codigo']=$cod;\n\t\t$cur_data['nivel']=$niv;\n\t\t$cur_data['observacion']=$obs;\n\t\t$cur_data['estado']=$est;\n\t\t\n\t\tprint_r($cur_data);\n\t\t$curso=new cursos;\n\t\t$curso->edit($cur_data);\n\t\t$data1=$curso->lista();\n\t\t$this->principal();\n\t }",
"public function edit(Serologia $serologia)\n {\n //\n }",
"public function edit(Colectivo $colectivo)\n {\n //\n }",
"function act_tipo_pago(){\n\t\t$u= new Tipo_pago();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Pago.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}",
"private function save_aide($type='insert', $id=0)\n\t{\n\t\tif ($type == 'update') {\n\t\t\t$_POST['id'] = $id;\n\t\t}\n\n\t\t\n\t\t$this->form_validation->set_rules('aide_number','Numéro','max_length[4]');\n $this->form_validation->set_rules('aide_title','Titre','max_length[255]');\n\t\t$this->form_validation->set_rules('aide_slug','URL','max_length[255]');\n\t\t$this->form_validation->set_rules('aide_body','Texte','');\n\t\t$this->form_validation->set_rules('aide_created_on','Creee le','max_length[255]');\n\t\t$this->form_validation->set_rules('aide_modified_on','Modifiee le','max_length[255]');\n\t\t$this->form_validation->set_rules('aide_deleted','Supprimee le','max_length[1]');\n\t\t$this->form_validation->set_rules('aide_category_id','Categorie','max_length[11]');\n\n\t\tif ($this->form_validation->run() === FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// make sure we only pass in the fields we want\n\t\t\n\t\t$data = array();\n\t\t$data['number'] = $this->input->post('aide_number');\n $data['title'] = $this->input->post('aide_title');\n\t\t$data['slug'] = $this->input->post('aide_slug');\n\t\t$data['body'] = $this->input->post('aide_body');\n\t\t$data['created_on'] = $this->input->post('aide_created_on') ? $this->input->post('aide_created_on') : '0000-00-00 00:00:00';\n\t\t$data['modified_on'] = $this->input->post('aide_modified_on') ? $this->input->post('aide_modified_on') : '0000-00-00 00:00:00';\n\t\t$data['deleted'] = $this->input->post('aide_deleted');\n\t\t$data['category_id'] = $this->input->post('aide_category_id');\n\n\t\tif ($type == 'insert')\n\t\t{\n\t\t\t$id = $this->aide_model->insert($data);\n\n\t\t\tif (is_numeric($id))\n\t\t\t{\n\t\t\t\t$return = $id;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$return = FALSE;\n\t\t\t}\n\t\t}\n\t\telse if ($type == 'update')\n\t\t{\n\t\t\t$return = $this->aide_model->update($id, $data);\n\t\t}\n\n\t\treturn $return;\n\t}",
"public function edit(Tiempo $tiempo)\n {\n //\n }",
"public function Editar(){\n $ca = new Categoria();\n \n if(isset($_REQUEST['id'])){\n $ca = $this->model->Obtener($_REQUEST['id']);\n }\n \n require_once 'view/header.php';\n require_once 'view/categoria/editar.php';\n require_once 'view/footer.php';\n }",
"public function edita()\n\t {\t\n\t\t$car=$_REQUEST['car'];\n\t\t$per=$_REQUEST['per'];\n\t\t$logi=$_REQUEST['logi'];\n\t\t$pas=$_REQUEST['pas'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$user_data=array();\n\t\t$user_data['carnet']=$car;\n\t\t$user_data['login']=$logi;\n\t\t$user_data['password']=$pas;\n\t\t$user_data['estado']=$est;\n\t\t$user_data['observacion']=$obs;\n\t\t$user_data['perfil']=$per;\n\t\t\n\t\t//print_r($user_data);\n\t\t$usuario=new Usuarios;\n\t\t$usuario->edit($user_data);\n\t\t$data1=$usuario->lista();\n\t\t$this->principal();\n\t }",
"public function edit(Prueva $prueva)\n {\n //\n }",
"public function edit(tarefas_utente $tarefas_utente)\n {\n //\n }",
"public function edit(AntecedentesGinecologicos $antecedentesGinecologicos)\n {\n //\n }",
"public function edit(Produto $produto)\n {\n //\n }",
"private function save($id=NULL,$anime_id=NULL,$serie_id=NULL){\n $mateiral_nome = \"capitulo\";\n if(!empty($anime_id)){\n $multimidia_id = $this->Anime->getField($anime_id,'multimidia_id');\n }else if(!empty ($id)){\n $multimidia_id = $this->Anime->getField($this->Capitulo->getField($id,'anime_id'),'multimidia_id');\n }\n if(isset($multimidia_id)){\n $mateiral_nome = $this->Multimidia->getField($multimidia_id,'unidade');\n }\n if(!empty($this->request->data)){\n $save = $this->Capitulo->save($this->request->data);\n \n if($save!==FALSE){\n $this->Session->setFlash(\"O \".ucfirst($mateiral_nome).\" foi salvo com sucesso!\", 'alert', array(\n 'plugin' => 'TwitterBootstrap',\n 'class' => 'alert-success'\n ));\n $id = $this->Capitulo->getInsertID();\n $id = ((empty($id))?$this->request->data['Capitulo']['id']:$id); \n $this->redirect(array('controller' => $this->name, 'action' => 'edit' , $id ));\n }else{\n $this->Session->setFlash(\"Ocorreu um erro na tentativa de salvar o \".ucfirst($mateiral_nome).\", favor conferir os dados e tentar novamente!\", 'alert', array(\n 'plugin' => 'TwitterBootstrap',\n 'class' => 'alert-error'\n ));\n }\n \n }\n if($id != \"\"){\n $this->request->data = $this->Capitulo->find('first',array('conditions' => array($this->name.'.id' => $id)));\n if(empty($serie_id)){\n $serie_id = $this->Anime->getField($this->request->data['Capitulo']['anime_id'],'serie_id');\n }\n }else{\n if(!empty($anime_id)){\n $this->request->data['Capitulo']['anime_id'] = $anime_id;\n }\n if(empty($serie_id)){\n $serie_id = $this->Anime->getField($anime_id,'serie_id');\n }\n }\n if($id!=NULL)$this->page_title = $this->Capitulo->getField($id,'titulo');\n $fildset = (($id==NULL)?\"Novo \".ucfirst($mateiral_nome).\"\":\"Editar \".ucfirst($mateiral_nome).\"\");\n $campos = array(\n $fildset => array(\n 'id' => array('type'=>'hidden'),\n 'anime_id' => array('type'=>'hidden'),\n 'titulo' => array('required'=>TRUE),\n 'numero' => array('label'=>'Número'),\n )\n );\n $this->set(\n array(\n 'model'=>'Capitulo',\n 'campos' => $campos\n )\n );\n if(!empty($serie_id)){\n $this->set($this->Menus->MenuSerieADMIN($serie_id));\n }\n if(!empty($this->request->data['Capitulo']['anime_id'])){\n $this->set($this->Menus->MenuEpisodiosADMIN($this->request->data['Capitulo']['anime_id']));\n $this->set($this->Menus->MenuTopADMIN('anime',$this->request->data['Capitulo']['anime_id']));\n }\n }",
"public function save()\n {\n if (empty($this->id))\n {\n $sql =\n \"INSERT INTO rozvrhova_akcia (zaciatok, koniec, id_semester)\n\t\t\t\t VALUES (\".\n DateConvert::SKDateTime2DBTimestamp(\"$1\").\", \".\n DateConvert::SKDateTime2DBTimestamp(\"$2\").\",\n\t\t\t\t$3)\";\n $params = array($this->zaciatok, $this->koniec, $this->id_semester);\n }else\n {\n // save after edit\n $sql =\n \"UPDATE rozvrhova_akcia SET\n\t\t\t\t zaciatok=\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\",\n\t\t\t\t koniec=\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\",\n\t\t\t\t id_semester=$3\n\t\t\t\t WHERE id=$4\";\n $params = array($this->zaciatok, $this->koniec, $this->id_semester, $this->id);\n }\n $this->dbh->query($sql, $params);\n }",
"public function edit(Emploi $emploi)\n {\n //\n }",
"public function EditarTipoDocumento($_id_TD, $_descripcionTD,$estadoTD){\n\t\t$sql = \"CALL SP_Validar_CampoTipoDocumento (?,?)\";\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->bindValue(1,$_descripcionTD,PDO::PARAM_STR);\n\t\t$query->bindValue(2,$estadoTD,PDO::PARAM_INT);\n\t\t$query->execute();\n\t\tif($query->fetchColumn()==0){\n\n\t\t\t$sql = \"CALL sp_Actualizar_TipoDocumento (?,?,?)\";\n\t\t\t$query = $this->db->prepare($sql);\t\t\n\t\t\t$query->bindValue(1,$_id_TD, PDO::PARAM_INT);\n\t\t\t$query->bindValue(2,$_descripcionTD, PDO::PARAM_STR);\n\t\t\t$query->bindValue(3,$estadoTD, PDO::PARAM_INT);\n\t\t\t$query->execute();\t\t\n\t\t\t$ComlAfecTD = $query->rowCount();\n\n\t\t\treturn $ComlAfecTD;\n\n\t\t}\n\t\telse\n\t\t{ //si ya El campo ya existe en la base de datos el dato lo redirecciono para mostrar el mensaje\n\t\t\techo \"El campo ya existe en la base de datos \";\n\t\t}\n\t\t\n\t}",
"public function edit(Trabajo $trabajo)\n {\n //\n }",
"function editar_producto(){\t\t\n\t\t$this->accion=\"Editando Datos del Producto\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$this->asignar_valores();\n\t\t\t$this->fecha=$this->convertir_fecha($this->fecha);\n\t\t\t$sql=\"UPDATE producto SET nombre_pro='$this->nombre', categoria_pro='$this->categoria', prioridad_pro='$this->prioridad', detal_pro='$this->detal', mayor_pro='$this->mayor', limite_pro='$this->limite', descripcion_pro='$this->descripcion', claves_pro='$this->claves', marca_pro='$this->marca',hotel_pro='$this->hotel',principal_pro='$this->principal' WHERE id_pro='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/producto/\");\n\t\t}else{\n\t\t $this->mostrar_producto();\n\t\t $sql=\"SELECT * FROM categoria ORDER BY prioridad_cat ASC\";\n\t\t $consulta=mysql_query($sql) or die(mysql_error());\n\t\t while ($resultado = mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=\"si\";\n\t\t\t\t$this->listado[] = $resultado;\n\t\t }\n\t\t}\n\t}",
"public function edit(PavaneType $pavaneType)\n {\n //\n }",
"public function edit(Mascota $mascota)\n {\n //\n }",
"function put($id_tipo_elemento, $data)\n { \n\t $unidad_gestion = $this->_get_ug();\n\t $sistema = $this->_get_sistema();\n\n $spec = $this->get_modelo('TipoElementoAct');\n \n\t rest_validador::validar($data, $spec, true);\n\t $modelo = rest_hidratador::deshidratar_fila($data, $spec);\n \n $modelo['unidad_gestion'] = $unidad_gestion;\n\t\t$modelo['sistema'] = $sistema;\n\n\t\treturn $this->modelo_act->crear_o_actualizar_tipo_elemento($id_tipo_elemento, $modelo);\n }",
"public function edit($id_cliente){}",
"public\n function edit(Estado $estado)\n {\n //\n }",
"function editar_pr_factura_inventario(){\n\n\t\t $u = new entrada();\n $u->usuario_id = $GLOBALS['usuarioid'];\n $u->empresas_id = $GLOBALS['empresaid'];\n\t$precio=$_POST['costo_unitario'];\n\t$producto_id=$_POST['cproductos_id'];\n $u->fecha = date(\"Y-m-d H:i:s\");\n $related = $u->from_array($_POST);\n\t $f = new Pr_factura();\n $f->get_by_id($u->pr_facturas_id);\n $u->espacios_fisicos_id = $f->espacios_fisicos_id;\n $u->lote_id = $f->lote_id;\n $u->costo_total = ($u->cantidad * $u->costo_unitario);\n\t$u->existencia = $u->cantidad;\n $u->cproveedores_id = $f->cproveedores_id;\n $u->fecha = date(\"Y-m-d H:i:s\");\n if ($u->id == 0)\n unset($u->id);\n if ($u->save($related)) {\n$this->db->query(\"update cproductos set precio_compra='$precio' where id=$producto_id\");\n echo $u->id;\n } else\n echo 0; \n \n\t}",
"public function editarinternoAction()\n {\n $id = (int)$this->_request->getParam('id', 0); /* El Id del registro que se va a editar */\n $tipo = (int)$this->_request->getParam('tipo', 1); /* si no llega el parámetro sigifica que es Documento Personal (1)*/\n\n /* Traigo el formulario*/\n $form = $this->_form->getFrmEditaInterno($tipo);\n \n if($tipo == 1){ /* si es documento personal */\n $form->setAction($this->view->baseUrlController . '/editarinterno/id/'. $id .'/');\n } else { /* Es documento jefatural */\n $form->setAction($this->view->baseUrlController . '/editarinterno/id/'. $id .'/tipo/0');\n }\n \n\n if ($this->_request->isPost()) { /* Si se ha submiteado el formulario, se procede a guardar los datos */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Recibo los datos del formulario por _POST */\n $formData = $this->_request->getPost();\n\n /* Lleno el formulario con los datos recibidos por _POST */\n $form->populate($formData); \n\n /* Verifico valores que llegan desde el formulario */\n $referencia = $form->referencia->getValue();\n if ($referencia == ''){\n $referencia = null;\n }\n\n $expediente_id = $form->expediente_id->getValue();\n if ($expediente_id == ''){\n $expediente_id = 0;\n }\n \n /* Recibo datos para la tabla destinos */\n $dependencia_iddestino = $form->dependencia_iddestino->getValue();\n \n if($dependencia_iddestino) {\n \n $listNameOptions = $form->getElement('dependencia_iddestino')->getMultiOptions();\n $paraDestino = $listNameOptions[$form->getValue('dependencia_iddestino')]; \n \n } else {\n \n $dependencia_iddestino = null;\n $paraDestino = $form->para_destino->getValue(); \n }\n \n $idDestino = $form->id_destino->getValue(); \n $cargoDestino = $form->cargo_destino->getValue();\n $dependenciaDestino = $form->dependencia_destino->getValue();\n \n /* Fin de Recibo datos... */\n \n if($tipo == 1){ /* si es documento personal */\n \n $data = array('id' => $id,\n 'dependencia_id' => $form->dependencia_id->getValue(), \n 'tipo_documento_id' => $form->tipo_documento_id->getValue(),\n 'expediente_id' => $expediente_id, \n 'numero' => $form->numero->getValue(), \n 'asunto' => $form->asunto->getValue(),\n 'referencia' => $referencia,\n 'cuerpo' => $form->cuerpo->getValue()\n );\n\n } else { /* Si es documento jefatural */\n\n $data = array('id' => $id,\n 'dependencia_id' => $form->dependencia_id->getValue(), /* queda en proceso en la oficina donde está esperando ser firmado */ \n 'tipo_documento_id' => $form->tipo_documento_id->getValue(),\n 'expediente_id' => $expediente_id, \n 'asunto' => $form->asunto->getValue(),\n 'referencia' => $referencia,\n 'cuerpo' => $form->cuerpo->getValue()\n );\n \n }\n \n try {\n /* Actualizo mi objeto */\n $this->_modelo->save($data);\n \n /* Guardo los datos correspondientes para la tabla destinos */\n $modelDestino = new Gidoc_Model_DestinoMapper();\n\n /* Grabo el destino */\n $dataDestino = array('id' => $idDestino,\n 'dependencia_iddestino' => $dependencia_iddestino, \n 'para' => $paraDestino,\n 'cargo' => $cargoDestino,\n 'dependencia' => $dependenciaDestino\n );\n \n $modelDestino->save($dataDestino);\n \n /**/\n\n } catch(Exception $ex) {\n // throw new Exception(\"Error al Editar el registro\". $ex->getMessage()); \n \n /* Para mostrar el error en el Flash Messenger y mantener los datos del formulario */\n $texto = $ex->getMessage();\n \n $texto .= \"\n <div style='width:100%; text-align: center;' >\n <a href='#' onclick=$('#msgFlash').fadeOut('slow') >Cerrar</a>\n </div>\n \";\n \n $this->_helper->FlashMessenger(array('error' => $texto)); \n \n $form->populate($formData);\n $this->view->tipo = $tipo; \n $this->view->form = $form;\n return $this->render();\n /* */\n }\n \n $this->_helper->redirector('poratender', 'documentos', 'gidoc'); \n \n } else { /* Se llama al formulario */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Obtengo el objeto de la tabla Documento */\n $obj = $this->_modelo->getById($id);\n\n /* Paso los campos del objeto a un array */\n $arrayData = $obj->toArray();\n\n /* Obtengo el objeto de la tabla Destinos */\n $modelDestino = new Gidoc_Model_DestinoMapper();\n $objDestino = $modelDestino->getByDocumentoId($id);\n \n /* Paso los campos al arrayData */\n $arrayData['id_destino'] = $objDestino->id;\n $arrayData['dependencia_iddestino'] = \"$objDestino->dependencia_iddestino\"; \n $arrayData['para_destino'] = $objDestino->para;\n $arrayData['cargo_destino'] = $objDestino->cargo;\n $arrayData['dependencia_destino'] = $objDestino->dependencia;\n \n /* Creo variable para poder ocultar el botón guardar, si el que edita no es el dueño del registro */\n $this->view->usua_idregistro = $arrayData['usuario_id'];\n\n /* Variables para poder subir archivos */\n $this->view->id = $id;\n /* Para el Grid archivos */\n /* Configuración del jqgrid */\n $this->view->archivos_colNames = \"'Archivo',''\";\n $this->view->archivos_colModel = \"{name:'descripcion', index:'descripcion', width:50},\n {name:'opcion', index:'opcion', width:10}\";\n $this->view->archivos_sortName = \"descripcion\"; /* Nombre del campo de la tabla por la que debe ser ordenado al cargar los datos. Generalmente es el pk de la tabla */\n \n /* Fin: Variables para poder subir archivos */\n \n /* LLeno los campos del formulario con los datos del array */\n $form->populate($arrayData);\n $this->view->tipo = $tipo;\n $this->view->form = $form;\n $this->view->documento = $obj; \n $this->render('editarinterno');\n }\n }",
"public function edit(Comida $comida)\n {\n //\n }",
"public function modificarEstadoDocumetoCodigoAsociado($codigo,$estado){\n $filter->COMPGUI_FlagEstado = $estado;\n $where = array(\"CPP_Codigo\" => $codigo);\n $this->db->where($where);\n $this->db->update('cji_comprobante_guiarem', (array) $filter);\n }",
"function saveEditTabla($tabla, $id_elemento, $campos, $valores) {\r\n $r = $this->dt->saveEditTabla($tabla, $id_elemento, $campos, $valores);\r\n if ($r == 'true') {\r\n $msg = TABLA_EDITADO;\r\n } else {\r\n $msg = ERROR_EDIT_TABLA;\r\n }\r\n\r\n return $msg;\r\n }",
"function saveEditTabla($tabla, $id_elemento, $campos, $valores) {\n $r = $this->dt->saveEditTabla($tabla, $id_elemento, $campos, $valores);\n if ($r == 'true') {\n $msg = TABLA_EDITADO;\n } else {\n $msg = ERROR_EDIT_TABLA;\n }\n\n return $msg;\n }",
"public function editar(Request $request){\n\n $editarRol = Tb_rol::findOrFail($request->id);\n\n $editareditarRol->id = $request->id;\n $editareditarRol->name = $request->name;\n\n $editarLibro->save();\n }",
"function modificarTipoVenta(){\n\t\t$this->procedimiento='vef.ft_tipo_venta_ime';\n\t\t$this->transaccion='VF_TIPVEN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_venta','id_tipo_venta','int4');\n\t\t$this->setParametro('codigo_relacion_contable','codigo_relacion_contable','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('tipo_base','tipo_base','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('id_plantilla','id_plantilla','integer');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function edit(Paquete $paquete)\n {\n //\n }",
"function editar_temporada_producto(){\t\t\n\t\t$this->accion=\"Editar Temporada\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\"){\n\t\t\t$temporada=$_GET['id'];\n\t\t\t$this->asignar_valores2();\n\t\t\t$this->desde=$this->convertir_fecha($this->desde);\n\t\t\t$this->hasta=$this->convertir_fecha($this->hasta);\n\t\t\t\n\t\t\t$sql=\"UPDATE temporadas2 SET activa='$this->mostrar', orden='$this->prioridad', fecha_inicio='$this->desde', fecha_fin='$this->hasta', texto_alternativo='$this->alternativo', titulo_adicional='$this->titulo', precio_pax_adic='$this->paxadicional', edadNinosDesde1='$this->desde_a', edadNinosHasta1='$this->hasta_a', precio_ninos='$this->precio_a', edadNinosDesde2='$this->desde_b', edadNinosHasta2='$this->hasta_b', precio_ninos2='$this->precio_b' WHERE id='$temporada'\";\n\t\t\t\n\t\t\t$id=$this->id;\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/producto/detalle.php?id=$id#next\");\n\t\t\texit();\n\t\t}else{\n\t\t\t$this->mostrar_temporada();\n\t\t}\n\t}",
"public function save () {\n // Atualiza\n // @ verifico se o atributo \"id_emprestimo\" existe neste objeto.\n // lembrando que este atributo é apagado se criamos um novo emprestimo.\n if ( isset($this->id_emprestimo) ) {\n $this->db->update('emprestimos', $this, array('id_emprestimo' => $this->id_emprestimo));\n }\n\n // Salva\n else {\n $this->db->insert('emprestimos', $this);\n }\n }",
"public function edit(Registro $registro)\n {\n //\n }",
"public function editar($id_cliente, $nome, $email, $endereco, $bairro, $cep, $cpf, $fone) {\n\n //$nome = $_POST[\"txt_nome\"]; // assim já pega os dados mas\n // por questão de segurança recomenda-se usar strip_tags para quebrar as tags e ficar mais seguro\n // usa-se o issset para verificar se o dado existe, senão retorna null\n $id_cliente = isset($_POST[\"id_cliente\"]) ? strip_tags(filter_input(INPUT_POST, \"id_cliente\")) : NULL; // usado para a edição do cliente\n $nome = isset($_POST[\"txt_nome\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_nome\")) : NULL; // usado para a edição e inserção do cliente\n $email = isset($_POST[\"txt_email\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_email\")) : NULL; // usado para a edição e inserção do cliente\n $endereco = isset($_POST[\"txt_endereco\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_endereco\")) : NULL; // usado para a edição e inserção do cliente\n $bairro = isset($_POST[\"txt_bairro\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_bairro\")) : NULL; // usado para a edição e inserção do cliente\n $cep = isset($_POST[\"txt_cep\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cep\")) : NULL; // usado para a edição e inserção do cliente\n $cpf = isset($_POST[\"txt_cpf\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cpf\")) : NULL; // usado para a edição e inserção do cliente\n $fone = isset($_POST[\"txt_fone\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_fone\")) : NULL; // usado para a edição e inserção do cliente\n\n $sql = \"UPDATE cliente SET nome = :nome, email = :email, endereco = :endereco, bairro = :bairro, cep = :cep, cpf = :cpf, fone = :fone WHERE id_cliente = :id_cliente\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":nome\", $nome); // comando para inserir\n $qry->bindValue(\":email\", $email); // comando para inserir\n $qry->bindValue(\":endereco\", $endereco); // comando para inserir\n $qry->bindValue(\":bairro\", $bairro); // comando para inserir\n $qry->bindValue(\":cep\", $cep); // comando para inserir\n $qry->bindValue(\":cpf\", $cpf); // comando para inserir\n $qry->bindValue(\":fone\", $fone); // comando para inserir\n $qry->bindValue(\":id_cliente\", $id_cliente); // comando para inserir\n $qry->execute(); // comando para executar\n }",
"public function edit(Polo $polo)\n {\n //\n }",
"public function actualizarEquipo($codigo,$Nombre,$Procedencia,$Altura,$Peso,$Posicion,$Nombre_equipo){\n if($this->error==false)\n {\n $insert_sql=\"UPDATE jugadores SET Nombre='\".$Nombre.\"',Procedencia='\".$Procedencia.\"',Altura='\".$Altura.\"',Peso=\".$Peso.\",Posicion='\".$Posicion.\"',Nombre_equipo='\".$Nombre_equipo.\"' WHERE Codigo='\".$codigo.\"'\";\n\n //$insert_sql=\"UPDATE jugadores SET codigo='\".$codigo.\"',Nombre=' \".$Nombre.\" ',Procedencia=' \".$Procedencia.\" ',Altura=' \".$Altura.\" ',Peso=' \".$Peso.\" ',Posicion=' \".$Posicion.\",Nombre_equipo=' \".$Nombre_equipo.\" ' WHERE codigo=\" .$codigo.\"\";\n \n if (!$this->conexion->query($insert_sql)) {\n\n echo \"Falló la insercion de la tabla: (\" . $this->conexion->errno . \") \" . $this->conexion->error;\n return false;\n }\n return true;\n }else{\n return false;\n }\n }",
"public function _editar($id_tipo_operaciones,$tipo_operacion,$estado)\n {\n $sql=\" UPDATE tbl_tipo_operaciones SET tipo_operacion ='$tipo_operacion', estado='$estado'\n WHERE id_tipo_operaciones='$id_tipo_operaciones'\";\n return ejecutarConsulta($sql);\n\n }",
"function editar_operador(){\t\t\n\t\t$this->accion=\"Editando Datos del Operador\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$this->asignar_valores();\n\t\t\t$sql=\"UPDATE operador SET cantidad_op='$this->cantidad', nombre_op='$this->nombre', apellido_op='$this->apellido', cedula_op='$this->cedula' WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/operador/\");\n\t\t}else{\n\t\t\t\n\t\t\t$this->mostrar_operador();\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public function Editar($idMotorista){\n $motorista = new Motorista();\n\n require_once('trata_imagem.php');\n\n // echo $idOnibus;\n\n // iniciado variaveis\n $diretorio_completo=Null;\n $MovUpload=false;\n $imagem_file=Null;\n $foto=\"nada\";\n\n //pegando a foto\n if (!empty($_FILES['imagem']['name'])) {\n $imagem_file = true;\n $diretorio_completo=salvarFoto($_FILES['imagem'],'arquivo');\n if ($diretorio_completo == \"Erro\") {\n $MovUpload=false;\n }else {\n $MovUpload=true;\n }\n }else {\n $imagem_file = false;\n }\n\n if ($imagem_file == true && $MovUpload==true) {\n $foto =$diretorio_completo;\n }else {\n $foto=\"nada\";\n }\n $motorista->id = $idMotorista;\n $motorista->imagem=$diretorio_completo;\n $motorista->imagem = $foto;\n $motorista->nome = $_POST['txtNome'];\n $motorista->email = $_POST['txtEmail'];\n $motorista->data_nasc = $_POST['txtDataNasc'];\n $motorista->sexo = $_POST['rdoSexo'];\n $motorista->telefone = $_POST['txtTelefone'];\n $motorista->celular = $_POST['txtCelular'];\n $motorista->cpf = $_POST['txtCPF'];\n $motorista->rg = $_POST['txtRG'];\n $motorista->cnh = $_POST['txtcnh'];\n $motorista->ativar = $_POST['chkAtivo'];\n if(isset($_POST['ativo'])){\n $motorista->ativo = '1';\n }else{\n $motorista->ativo = '0';\n }\n\n $motorista::Update($motorista);\n\n }",
"public function editarAction()\n {\n $id = (int)$this->_request->getParam('id', 0);\n\n /* Traigo el formulario*/\n $form = $this->_form->getFrmEdita();\n $form->setAction($this->view->baseUrlController . '/editar/id/'. $id .'/');\n\n if ($this->_request->isPost()) { /* Si se ha submiteado el formulario, se procede a guardar los datos */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Recibo los datos del formulario por _POST */\n $formData = $this->_request->getPost();\n\n /* Lleno el formulario con los datos recibidos por _POST */\n $form->populate($formData); \n\n /* Verifico valores que llegan desde el formulario */\n $numero = $form->numero->getValue();\n if ($numero == ''){\n $numero = 0;\n }\n \n \n $expediente_id = $form->expediente_id->getValue();\n if ($expediente_id == ''){\n $expediente_id = 0;\n }\n \n $procedimiento_id = $form->procedimiento_id->getValue();\n if ($procedimiento_id == ''){\n $procedimiento_id = NULL;\n }\n \n \n /* Creo mi objeto */\n $data = array('id' => $id,\n 'expediente_id' => $expediente_id, \n 'dependencia_id' => $form->dependencia_id->getValue(),\n 'firma' => $form->firma->getValue(),\n 'cargo' => $form->cargo->getValue(),\n 'tipo_documento_id' => $form->tipo_documento_id->getValue(),\n 'fecha_documento' => $form->fecha_documento->getValue(),\n 'numero' => $numero,\n 'siglas' => $form->siglas->getValue(),\n 'asunto' => $form->asunto->getValue(),\n 'anexos' => $form->anexos->getValue(), \n 'procedimiento_id' => $procedimiento_id, \n 'dependencia_registra_id' => $form->dependencia_registra_id->getValue(), \n 'usuario_id' => $this->_usuario->id \n );\n\n try {\n /* Actualizo mi objeto */\n $this->_modelo->save($data);\n } catch(Exception $ex) {\n // echo 'error|'.$ex->getMessage();\n \n /* Para mostrar el error en el Flash Messenger y mantener los datos del formulario */\n $this->_helper->FlashMessenger(array('error' => $ex->getMessage())); \n \n $form->populate($formData);\n $this->view->form = $form;\n return $this->render('editar');\n /* */\n \n }\n\n $this->_helper->redirector('poratender', 'documentos', 'gidoc'); \n \n } else { /* Se llama al formulario */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Obtengo el objeto de la tabla Documento */\n $obj = $this->_modelo->getById($id);\n\n if (null === $obj) {\n //$this->_redirect('/');\n }\n /* Paso los campos del objeto a un array */\n $arrayData = $obj->toArray();\n\n $date = new Zend_Date($arrayData['fecha_documento'], Zend_Date:: ISO_8601);\n\t $fecha = $date->toString('dd/MM/yyyy');\n\t $arrayData['fecha_documento'] = $fecha;\n \n if($arrayData['procedimiento_id'] == null ){\n $arrayData['procedimiento_id'] = ''; \n }\n \n /* Creo variable para poder ocultar el botón guardar, si el que edita no es el dueño del registro */\n $this->view->usua_idregistro = $arrayData['usuario_id'];\n\n /* Variables para poder subir archivos */\n $this->view->id = $id;\n /* Para el Grid archivos */\n /* Configuración del jqgrid */\n $this->view->archivos_colNames = \"'Archivo',''\";\n $this->view->archivos_colModel = \"{name:'descripcion', index:'descripcion', width:50},\n {name:'opcion', index:'opcion', width:10}\";\n $this->view->archivos_sortName = \"descripcion\"; /* Nombre del campo de la tabla por la que debe ser ordenado al cargar los datos. Generalmente es el pk de la tabla */\n \n /* Fin: Variables para poder subir archivos */\n \n /* LLeno los campos del formulario con los datos del array */\n $form->populate($arrayData);\n $this->view->form = $form;\n //$this->_helper->layout->disableLayout();\n $this->render('editar'); \n\n }\n }",
"public function type_movie_save($type_movie_id = null) {\n // por el metodo de HTTP\n\n $vdata[\"name\"] = \"\";\n\n if ($type_movie_id != null) {\n $type_movie = $this->Type_movie->find($type_movie_id);\n\n if (is_object($type_movie)) {\n $vdata[\"name\"] = $type_movie->name;\n }\n }\n\n if ($this->input->server(\"REQUEST_METHOD\") == \"POST\") {\n\n // reglas de validacion\n $this->form_validation->set_rules('name', 'Nombre', 'required|min_length[3]');\n\n // obteniendo los datos del formulario\n $save[\"name\"] = $vdata[\"name\"] = $this->input->post(\"name\");\n\n //revisar reglas de validacion\n if ($this->form_validation->run() == FALSE) {\n \n } else {\n if ($type_movie_id == null)\n $type_movie_id = $this->Type_movie->insert($save);\n else\n $this->Type_movie->update($type_movie_id, $save);\n\n $this->session->set_flashdata(\"msj\", \"Tipo guardado\");\n $this->session->set_flashdata(\"type\", \"success\");\n\n redirect(\"/core/dashboard/type_movie_save/$type_movie_id\");\n }\n }\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/types_movie/save\", $vdata, TRUE);\n $view['title'] = \"Registrar tipos de películas\";\n $this->parser->parse('core/templates/body', $view);\n }",
"public function update(Request $request, EmpresaTipo $id)\n {\n \t$nombre = $request->get('nombre');\n\n \tif($nombre != $id->nombre){\n\n\t\t\t$request->validate([\n\t\t\t\t'nombre' => 'unique:App\\EmpresaTipo,nombre'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'unique' => 'Dato ingresado existente.'\n\t\t\t]);\n\t\t}\n\n\n\t\ttry {\n\t\t\t$id->nombre = $nombre;\n\t\t\t$id->activo = $request->get('estado');\n \t$id->save();\n\t\t\tsession()->flash('Guardando', 'Las actualizaciones fueron guardados');\n\n \treturn redirect()->route('editar-ug0299', ['id' => $id->id]);\n\t\t}catch (QueryException $e){\n\t\t\treturn redirect()->route('editar-ug0299', ['id' => $id->id])->withInput()->with('error', $e->errorInfo[2]);\n\t\t}\n }",
"public function edit(Articulo $articulo)\n {\n //\n }",
"public function edit(Articulo $articulo)\n {\n //\n }",
"function update_save() {\r\n //obtenemos los datos del expediente\r\n \r\n $exp_id = $_REQUEST [\"exp_id\"];\r\n $tra_id = $_REQUEST [\"tra_id\"];\r\n $cue_id = $_REQUEST [\"cue_id\"];\r\n //$ver_id = $_SESSION ['VER_ID'];\r\n $ser_id = 0;\r\n $usu_id = 0;\r\n $trc_id = 0;\r\n $exc_id = 0;\r\n $con_id = 0;\r\n $this->expediente = new tab_expediente ();\r\n $sql = \"SELECT * \r\n FROM tab_expediente\r\n WHERE exp_estado = 1 \r\n AND exp_id='$exp_id' \";\r\n $rows = $this->expediente->dbselectBySQL($sql);\r\n\r\n if (count($rows) == 1) {\r\n $ser_id = $rows [0]->getSer_id();\r\n }\r\n\r\n $expusuario = new Tab_expusuario ();\r\n $sql = \"SELECT * \r\n FROM tab_expusuario\r\n WHERE eus_estado = 1\r\n AND exp_id='\" . $exp_id . \"' \";\r\n $rows_eus = $expusuario->dbselectBySQL($sql);\r\n if (count($rows_eus) >= 1) {\r\n $usu_id = $rows_eus [0]->getUsu_id();\r\n }\r\n\r\n $this->tramitecuerpos = new tab_tramitecuerpos ();\r\n $sql = \"SELECT * \r\n FROM tab_tramitecuerpos \r\n WHERE tra_id=\" . $tra_id . \" and cue_id=\" . $cue_id . \" \";\r\n $rows = $this->tramitecuerpos->dbselectBySQL($sql);\r\n if (count($rows) >= 1) {\r\n $trc_id = $rows [0]->getTrc_id();\r\n }\r\n\r\n $fil_id = $this->updateArchivo(); \r\n \r\n if (!empty($_REQUEST['fil_descripcion'])) {\r\n $this->palclave = new tab_palclave();\r\n $pac_nombre = trim($_REQUEST['fil_descripcion']);\r\n $array = explode(SEPARATOR_SEARCH, $pac_nombre);\r\n \r\n for($j=0;$j<count($array);$j++){\r\n if ($array[$j]!='') {\r\n $sql = \"select pac_id from tab_palclave where pac_estado = 1 AND fil_id='$fil_id' AND pac_nombre='\" . trim($array[$j]) . \"'\";\r\n $row = $this->palclave->dbSelectBySQL($sql);\r\n if (count($row) == 0) {\r\n $this->palclave->setFil_id($fil_id);\r\n $this->palclave->setPac_nombre(strtoupper(trim($array[$j])));\r\n $this->palclave->setPac_formulario('Documento');\r\n $this->palclave->setPac_estado(1);\r\n $this->palclave->insert();\r\n }\r\n }\r\n }\r\n \r\n } \r\n\r\n\r\n \r\n\r\n \r\n // ********************************\r\n // Save Tab_archivo_digital\r\n ///////////////Aumentado por freddy///////////////////////////////////////////////////////////////////////////////////////////\r\n //$seccion = VAR3;\r\n $arc = new archivo ();\r\n $tarchivo = new tab_archivo ();\r\n //\r\n $archivo_digital = new tab_archivo_digital();\r\n //\r\n $tarchivo->setRequest2Object($_REQUEST);\r\n //$exp_id = $_REQUEST ['exp_id'];\r\n //$fil_id = $_REQUEST ['fil_id'];\r\n $sql = \"SELECT *\r\n FROM tab_archivo\r\n WHERE fil_id = '$fil_id' \";\r\n $rows = $tarchivo->dbselectBySQL($sql);\r\n //$tarch = $rows [0];\r\n\r\n $archivo_type = $_FILES [\"archivo\"] [\"type\"];\r\n $archivo = $_FILES [\"archivo\"] [\"tmp_name\"];\r\n $archivo_size = $_FILES [\"archivo\"] [\"size\"];\r\n $archivo_name = $_FILES [\"archivo\"] [\"name\"];\r\n $nombre = basename($_FILES[\"archivo\"][\"name\"]);\r\n $nombreFichero = $_FILES [\"archivo\"] [\"name\"];\r\n\r\n $archivo_name_array = explode(\".\", $archivo_name);\r\n $archivo_ext = array_pop($archivo_name_array);\r\n $archivo_sin_ext = implode($archivo_name_array);\r\n //$archivo_name = $arc->generarNombre($archivo_sin_ext);\r\n $archivo_name = \"\";\r\n $archivo_cifrado = md5($archivo_name);\r\n $sis_tammax = 0;\r\n\r\n \r\n // Data Parameters\r\n $nombreDirectorio = \"\";\r\n $tsistema = new tab_sistema ();\r\n $sql = \"SELECT *\r\n FROM tab_sistema\";\r\n $rows2 = $tsistema->dbselectBySQL($sql);\r\n if (count($rows2) >= 1) {\r\n $sis_tipcarga = $rows2 [0]->sis_tipcarga;\r\n $sis_tammax = $rows2 [0]->sis_tammax;\r\n $nombreDirectorio = $rows2 [0]->sis_ruta;\r\n }\r\n\r\n\r\n // Verify size\r\n if ($archivo_size > $sis_tammax) {\r\n echo \"El tamaño del archivo supera el permitido\";\r\n } else {\r\n\r\n /* * *************************************************** */\r\n /* TYPE SAVE BD */\r\n /* * *************************************************** */\r\n $sis_tipcarga = 1;\r\n\r\n if ($sis_tipcarga == 1) {\r\n $error = false;\r\n $copiarFichero = false;\r\n if (is_uploaded_file($_FILES['archivo']['tmp_name'])) {\r\n //$nombreDirectorio = \"img/\";\r\n $nombreFichero = $_FILES['archivo']['name'];\r\n $copiarFichero = true;\r\n $nombreCompleto = $nombreDirectorio . $nombreFichero;\r\n if (is_file($nombreCompleto)) {\r\n $idUnico = time();\r\n $nombreFichero = $idUnico . \"-\" . $nombreFichero;\r\n }\r\n } else if ($_FILES['archivo']['error'] == UPLOAD_ERR_FORM_SIZE) {\r\n $maxsize = $_REQUEST['MAX_FILE_SIZE'];\r\n $errores[\"archivo\"] = \"El tamanio del fichero supera el limite permitido ($maxsize bytes)!\";\r\n $error = true;\r\n } else if ($_FILES['archivo']['name'] == \"\")\r\n $nombreFichero = '';\r\n else {\r\n $errores[\"archivo\"] = \"No se ha podido subir el fichero!\";\r\n $msm_guardado_archivo = 0;\r\n $error = true;\r\n }\r\n if ($error == false) {\r\n $link = $archivo_digital->connect();\r\n pg_query($link, \"begin\");\r\n// $sql = \"INSERT INTO tab_archivo_digital(fil_id, fil_nomoriginal, fil_nomcifrado, fil_tipo, fil_tamano, fil_extension, nombre, mime, size, archivo, fil_estado) \r\n// VALUES ($fil_id, '$nombreFichero', '$archivo_cifrado', '$archivo_type','$archivo_size' , '$archivo_ext' ,'$nombre', '$archivo_type', $archivo_size, '$nombreFichero', 1)\";\r\n $sql = \"UPDATE tab_archivo_digital \r\n SET fil_nomoriginal='$nombreFichero', fil_nomcifrado='$archivo_cifrado', fil_tipo='$archivo_type', fil_tamano='$archivo_size', fil_extension='$archivo_ext', nombre='$nombre', mime='$archivo_type', size=$archivo_size, archivo='$nombreFichero', fil_estado=1 \r\n WHERE fil_id = $fil_id \";\r\n pg_query($link, $sql) or die(pg_last_error($link));\r\n pg_query($link, \"commit\");\r\n if ($copiarFichero)\r\n move_uploaded_file($_FILES['archivo']['tmp_name'], $nombreDirectorio . $nombreFichero);\r\n $msm_guardado_archivo = 1; //\"Se subio correctamente el archivo\";\r\n }\r\n }\r\n else {\r\n $link = $archivo_digital->connect();\r\n $fp = fopen($archivo, \"rb\");\r\n $contenido = fread($fp, filesize($archivo));\r\n fclose($fp);\r\n pg_query($link, \"begin\");\r\n $oid = pg_lo_create($link);\r\n// $sql = \"INSERT INTO tab_archivo_digital(fil_id, fil_nomoriginal, fil_nomcifrado, fil_tipo, fil_tamano, fil_extensio, nombre, archivo_oid, mime, size, archivo) \r\n// VALUES ($fil_id, '$archivo_name', '$archivo_cifrado', '$archivo_type','$archivo_size' , '$archivo_ext', '$nombre', $oid, '$archivo_type', $archivo_size, '$nombreFichero')\";\r\n $sql = \"UPDATE tab_archivo_digital\r\n SET fil_nomoriginal='$archivo_name', fil_nomcifrado='$archivo_cifrado', fil_tipo='$archivo_type', fil_tamano='$archivo_size', fil_extension='$archivo_ext', nombre='$nombre', archivo_oid=$oid, mime='$archivo_type', size=$archivo_size, archivo='$nombreFichero', fil_estado=1 \r\n WHERE fil_id = $fil_id \";\r\n \r\n pg_query($link, $sql) or die(pg_last_error($link));\r\n $blob = pg_lo_open($link, $oid, \"w\");\r\n pg_lo_write($blob, $contenido);\r\n pg_lo_close($blob);\r\n pg_query($link, \"commit\");\r\n $msm_guardado_archivo = 1; //\"Se subio correctamente el archivo\"\r\n }\r\n\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n if ($ser_id != 0 && $usu_id != 0 && $trc_id != 0) {\r\n// if (isset($_REQUEST [\"con_id\"]) && $_REQUEST [\"con_id\"] != \"\") {\r\n// $con_id = $_REQUEST [\"con_id\"];\r\n// $suc_id = $_REQUEST [\"suc_id\"];\r\n// $expcontenedor = new tab_expcontenedor ();\r\n// $row_exc = $expcontenedor->dbselectBy3Field(\"suc_id\", $suc_id, \"exc_estado\", \"1\", \"exp_id\", $exp_id);\r\n//\r\n// if (count($row_exc) == 0) {\r\n// $exc_id = $this->saveContenedor($exp_id, $suc_id);\r\n// } else {\r\n// $exc_id = $row_exc [0]->exc_id;\r\n// }\r\n// } \r\n \r\n \r\n //$this->updateExpArchivo($fil_id, $exp_id, $tra_id, $cue_id);\r\n \r\n if ($_REQUEST ['accion'] == 'cargar') {\r\n //Header ( \"Location: \" . PATH_DOMAIN . \"/archivo/cargar/$exp_id/$fil_id/\" . VAR3 . \"/\" );\r\n\r\n header(\"location:\" . PATH_DOMAIN . \"/estrucDocumental/viewTree/\" . $exp_id . \"/\" . $msm_guardado_archivo . \"/$cue_id/\");\r\n } else {\r\n Header(\"Location: \" . PATH_DOMAIN . \"/archivo/digitalizar/$exp_id/$fil_id/\" . VAR3 . \"/\");\r\n }\r\n } else {\r\n header(\"location:\" . PATH_DOMAIN . \"/estrucDocumental/viewTree/\" . $exp_id . \"/\" . $msm_guardado_archivo . \"/$cue_id/\");\r\n }\r\n }\r\n \r\n }",
"public function editAction($id,$tipoEntidad)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AdministradorAdjBundle:Entidad')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Entidad entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\t\t\n if($this->getRequest()->isXmlHttpRequest())\n \treturn $this->render('AdministradorAdjBundle:Entidad:new_js.html.twig', array(\n \t\t\t'entity' => $entity,\n \t\t\t'form' => $editForm->createView(),\n \t\t\t'tipoEntidad' => $tipoEntidad,\n \t\t\t'ruta' => 'entidad_create',\n \t));\n else\n\t return $this->render('AdministradorAdjBundle:Entidad:new.html.twig', array(\n\t 'entity' => $entity,\n\t 'form' => $editForm->createView(),\n\t 'delete_form' => $deleteForm->createView(),\n\t \t'tipoEntidad' => $tipoEntidad,\n\t \t'ruta'\t\t => 'entidad_update',\n\t ));\n }",
"public function edit(Comprobante $comprobante)\n {\n //\n }",
"public function edit(Empresa $empresa)\n {\n \n }",
"public function edit(TypeThird $typeThird)\n {\n //\n }",
"public function edit(Empresa $empresa)\n {\n //\n }",
"public function edit(Venta $venta)\n {\n //\n }",
"public function edit(Venta $venta)\n {\n //\n }"
] | [
"0.7077196",
"0.6812285",
"0.6776362",
"0.6758007",
"0.67544836",
"0.6713235",
"0.6712935",
"0.6706755",
"0.666921",
"0.66616106",
"0.66503847",
"0.6551328",
"0.6528885",
"0.65214205",
"0.65082353",
"0.6494227",
"0.6463135",
"0.6456645",
"0.64333856",
"0.6409923",
"0.6402576",
"0.6394395",
"0.6383972",
"0.6379074",
"0.6368326",
"0.63299257",
"0.63250613",
"0.63250613",
"0.63250613",
"0.6324623",
"0.63140917",
"0.62990093",
"0.6293862",
"0.6293758",
"0.6286074",
"0.62835646",
"0.62734693",
"0.62692124",
"0.62644184",
"0.6263293",
"0.62545776",
"0.62490875",
"0.62451744",
"0.6233161",
"0.6230319",
"0.6209964",
"0.6207279",
"0.6197247",
"0.6190502",
"0.6182757",
"0.6169248",
"0.61691546",
"0.6159893",
"0.6131089",
"0.6112388",
"0.6107427",
"0.61072767",
"0.60949886",
"0.6086322",
"0.60844827",
"0.60836685",
"0.6077906",
"0.6073224",
"0.6071983",
"0.60712266",
"0.60696965",
"0.60695434",
"0.60579497",
"0.6050696",
"0.6048025",
"0.604779",
"0.6043354",
"0.60420394",
"0.60399365",
"0.6038946",
"0.603862",
"0.6034895",
"0.60337603",
"0.603249",
"0.60297376",
"0.60286915",
"0.6027771",
"0.6027486",
"0.6024517",
"0.6024271",
"0.60216886",
"0.60209906",
"0.6017791",
"0.60157686",
"0.6014959",
"0.6009908",
"0.6009908",
"0.60062855",
"0.59983224",
"0.5993582",
"0.5992004",
"0.5990575",
"0.59904283",
"0.59825283",
"0.59825283"
] | 0.7610511 | 0 |
Display a listing of the resource. | public function index()
{
$stadia = Stadium::orderBy('name', 'asc')->paginate(15);
return view('admin.stadium.index', compact('stadia'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('admin.stadium.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$validatedData = $request->validate([
'name' => 'required|max:255',
'city' => 'nullable|max:255'
]);
$input = $request->all();
Stadium::create($input);
return redirect(route('stadium.index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$stadium = Stadium::findOrFail($id);
return view ('admin/stadium/edit', compact('stadium'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$validatedData = $request->validate([
'name' => 'required|max:255',
'city' => 'nullable|max:255'
]);
$input = $request->all();
$stadium = Stadium::findOrFail($id);
$stadium->update($input);
return redirect(route('stadium.index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$stadium = Stadium::whereId($id);
$stadium->delete();
return redirect(route('stadium.index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$screenOne = DamageScreen::where('order', 0)->first();
$screenTwo = DamageScreen::where('order', 1)->first();
$status = DamageStatus::get();
return view('dashboard.screens.index')->with('screenOne', $screenOne)->with('screenTwo', $screenTwo)->with('status',$status);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.